Re: [ath9k-devel] [PATCH 2/2] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-17 Thread Johannes Berg
Ok first of all, please actually compile the tree after your changes. It
doesn't. When it does, please fix
 1) line length in the commit log should be  72 chars
 2) indentation in mac80211.h
 3) removal of an important comment in mac80211.h that I pointed out in
previous review

 The tx-path of all affected drivers is restructured to respect the chaneged
 layout of struct ieee80211_tx_info. List of modified drivers:
 ath9k

Please also remove the driver list. git can tell you the modified files
very easily.

johannes

___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH 2/2] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-14 Thread Arend van Spriel
On 07/13/2012 08:52 PM, Thomas Huehn wrote:
 The pointer control.sta is removed from ieee80211_tx_info to free up 
 sufficient
 memory in SKB_CB on the tx-path to enable new annotations per data packet e.g.
 support of upcoming Transmit Power Control (TPC).
 Now the control.sta pointer is put on the stack where it is passed as function
 parameter to the .tx equivalent (ieee80211_ops) of each affected wireless
 driver. Therefore a new structure ieee80211_tx_control is added to mac80211.h
 which holds the sta structure instead.
 
 ---
  .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--
 
 diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c 
 b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
 index 9e79d47..a7be68d 100644
 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
 +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
 @@ -264,7 +264,9 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, 
 u16 rate, bool is_br)
   }
  }
  
 -static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 +static void brcms_ops_tx(struct ieee80211_hw *hw,
 +  struct ieee80211_tx_control *control,
 +  struct sk_buff *skb)

Fix indent here (if it is not a mailer issue).

  {
   struct brcms_info *wl = hw-priv;
   struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
 @@ -276,7 +278,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, struct 
 sk_buff *skb)
   goto done;
   }
   brcms_c_sendpkt_mac80211(wl-wlc, skb, hw);
 - tx_info-rate_driver_data[0] = tx_info-control.sta;
 + tx_info-rate_driver_data[0] = control-sta;
   done:
   spin_unlock_bh(wl-lock);
  }

Gr. AvS

___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH 2/2] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-14 Thread Felix Fietkau
On 2012-07-14 12:10 PM, Arend van Spriel wrote:
 On 07/13/2012 08:52 PM, Thomas Huehn wrote:
 The pointer control.sta is removed from ieee80211_tx_info to free up 
 sufficient
 memory in SKB_CB on the tx-path to enable new annotations per data packet 
 e.g.
 support of upcoming Transmit Power Control (TPC).
 Now the control.sta pointer is put on the stack where it is passed as 
 function
 parameter to the .tx equivalent (ieee80211_ops) of each affected wireless
 driver. Therefore a new structure ieee80211_tx_control is added to mac80211.h
 which holds the sta structure instead.
 
 ---
  .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--
 
 diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c 
 b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
 index 9e79d47..a7be68d 100644
 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
 +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
 @@ -264,7 +264,9 @@ static void brcms_set_basic_rate(struct brcm_rateset 
 *rs, u16 rate, bool is_br)
  }
  }
  
 -static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 +static void brcms_ops_tx(struct ieee80211_hw *hw,
 + struct ieee80211_tx_control *control,
 + struct sk_buff *skb)
 
 Fix indent here (if it is not a mailer issue).
Indentation looks correct to me. The + in front of the 'static' moves
the rest of the line one character further to the right, whereas in the
other lines it's compensated by the tabstop.

- Felix
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH 2/2] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-14 Thread Arend van Spriel
On 07/14/2012 01:44 PM, Felix Fietkau wrote:
 On 2012-07-14 12:10 PM, Arend van Spriel wrote:
 On 07/13/2012 08:52 PM, Thomas Huehn wrote:
 The pointer control.sta is removed from ieee80211_tx_info to free up 
 sufficient
 memory in SKB_CB on the tx-path to enable new annotations per data packet 
 e.g.
 support of upcoming Transmit Power Control (TPC).
 Now the control.sta pointer is put on the stack where it is passed as 
 function
 parameter to the .tx equivalent (ieee80211_ops) of each affected wireless
 driver. Therefore a new structure ieee80211_tx_control is added to 
 mac80211.h
 which holds the sta structure instead.

 ---
  .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--

 diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c 
 b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
 index 9e79d47..a7be68d 100644
 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
 +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
 @@ -264,7 +264,9 @@ static void brcms_set_basic_rate(struct brcm_rateset 
 *rs, u16 rate, bool is_br)
 }
  }
  
 -static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 +static void brcms_ops_tx(struct ieee80211_hw *hw,
 +struct ieee80211_tx_control *control,
 +struct sk_buff *skb)

 Fix indent here (if it is not a mailer issue).
 Indentation looks correct to me. The + in front of the 'static' moves
 the rest of the line one character further to the right, whereas in the
 other lines it's compensated by the tabstop.
 
 - Felix
 

I see. I did not apply the patch to be sure.

Gr. AvS


___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH 2/2] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-14 Thread Luciano Coelho
On Fri, 2012-07-13 at 20:52 +0200, Thomas Huehn wrote:
 The pointer control.sta is removed from ieee80211_tx_info to free up 
 sufficient
 memory in SKB_CB on the tx-path to enable new annotations per data packet e.g.
 support of upcoming Transmit Power Control (TPC).
 Now the control.sta pointer is put on the stack where it is passed as function
 parameter to the .tx equivalent (ieee80211_ops) of each affected wireless
 driver. Therefore a new structure ieee80211_tx_control is added to mac80211.h
 which holds the sta structure instead.
 
 The tx-path of all affected drivers is restructured to respect the chaneged
 layout of struct ieee80211_tx_info. List of modified drivers:
 ath9k
 ath5k
 iwl3954
 iwl4965
 iwl-agn
 mwl8k
 carl9170
 ath9k-htc
 p54
 rt2x00
 rtl8180
 rtl8087
 hwsim
 b43
 b43legacy
 brcmsmac
 zd1211rw
 wl1251
 wlcore
 rtlwifi
 libertas_tf
 at76c50x-usb
 adm8211
 
 Signed-off-by: Thomas Huehn tho...@net.t-labs.tu-berlin.de
 Signed-off-by: Alina Friedrichsen x-al...@gmx.net
 Signed-off-by: Felix Fietkau n...@openwrt.org
 ---

For the TI drivers part (wl1251/wlcore):

Acked-by: Luciano Coelho coe...@ti.com

--
Luca.

___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


[ath9k-devel] [PATCH 2/2] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-13 Thread Thomas Huehn
The pointer control.sta is removed from ieee80211_tx_info to free up sufficient
memory in SKB_CB on the tx-path to enable new annotations per data packet e.g.
support of upcoming Transmit Power Control (TPC).
Now the control.sta pointer is put on the stack where it is passed as function
parameter to the .tx equivalent (ieee80211_ops) of each affected wireless
driver. Therefore a new structure ieee80211_tx_control is added to mac80211.h
which holds the sta structure instead.

The tx-path of all affected drivers is restructured to respect the chaneged
layout of struct ieee80211_tx_info. List of modified drivers:
ath9k
ath5k
iwl3954
iwl4965
iwl-agn
mwl8k
carl9170
ath9k-htc
p54
rt2x00
rtl8180
rtl8087
hwsim
b43
b43legacy
brcmsmac
zd1211rw
wl1251
wlcore
rtlwifi
libertas_tf
at76c50x-usb
adm8211

Signed-off-by: Thomas Huehn tho...@net.t-labs.tu-berlin.de
Signed-off-by: Alina Friedrichsen x-al...@gmx.net
Signed-off-by: Felix Fietkau n...@openwrt.org
---
restructure this patch to respect logical API evolutions. thx to Johannes Berg
add missing drivers that are effected as well. thx to Xose Vazquez Perez
---
 drivers/net/wireless/adm8211.c |  4 +++-
 drivers/net/wireless/at76c50x-usb.c|  4 +++-
 drivers/net/wireless/ath/ath5k/mac80211-ops.c  |  3 ++-
 drivers/net/wireless/ath/ath9k/ath9k.h |  1 +
 drivers/net/wireless/ath/ath9k/htc.h   |  1 +
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c|  2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c  |  6 +++--
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c  |  2 +-
 drivers/net/wireless/ath/ath9k/main.c  |  5 -
 drivers/net/wireless/ath/ath9k/xmit.c  |  9 
 drivers/net/wireless/ath/carl9170/carl9170.h   |  4 +++-
 drivers/net/wireless/ath/carl9170/tx.c | 16 ++---
 drivers/net/wireless/b43/main.c|  3 ++-
 drivers/net/wireless/b43legacy/main.c  |  1 +
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--
 drivers/net/wireless/iwlegacy/3945-mac.c   | 12 ++
 drivers/net/wireless/iwlegacy/4965-mac.c   | 26 +-
 drivers/net/wireless/iwlegacy/4965.h   |  8 +--
 drivers/net/wireless/iwlwifi/dvm/agn.h |  4 +++-
 drivers/net/wireless/iwlwifi/dvm/mac80211.c|  6 +++--
 drivers/net/wireless/iwlwifi/dvm/tx.c  | 16 +++--
 drivers/net/wireless/libertas_tf/main.c|  4 +++-
 drivers/net/wireless/mac80211_hwsim.c  |  8 ---
 drivers/net/wireless/mwl8k.c   | 17 --
 drivers/net/wireless/p54/lmac.h|  4 +++-
 drivers/net/wireless/p54/main.c|  2 +-
 drivers/net/wireless/p54/txrx.c| 15 -
 drivers/net/wireless/rt2x00/rt2x00.h   |  4 +++-
 drivers/net/wireless/rt2x00/rt2x00dev.c|  2 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c|  4 +++-
 drivers/net/wireless/rt2x00/rt2x00queue.c  | 20 +
 drivers/net/wireless/rtl818x/rtl8180/dev.c |  6 +++--
 drivers/net/wireless/rtl818x/rtl8187/dev.c |  6 +++--
 drivers/net/wireless/rtlwifi/core.c|  4 +++-
 drivers/net/wireless/ti/wl1251/main.c  |  4 +++-
 drivers/net/wireless/ti/wlcore/main.c  |  4 +++-
 drivers/net/wireless/zd1211rw/zd_mac.c |  6 +++--
 include/net/mac80211.h | 19 +++-
 net/mac80211/driver-ops.h  |  6 +++--
 net/mac80211/ieee80211_i.h |  2 ++
 net/mac80211/tx.c  | 13 ++-
 41 files changed, 186 insertions(+), 103 deletions(-)

diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index 0ac09a2..b661ce2 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1661,7 +1661,9 @@ static void adm8211_tx_raw(struct ieee80211_hw *dev, 
struct sk_buff *skb,
 }
 
 /* Put adm8211_tx_hdr on skb and transmit */
-static void adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void adm8211_tx(struct ieee80211_hw *dev,
+  struct ieee80211_tx_control *control,
+  struct sk_buff *skb)
 {
struct adm8211_tx_hdr *txhdr;
size_t payload_len, hdrlen;
diff --git a/drivers/net/wireless/at76c50x-usb.c 
b/drivers/net/wireless/at76c50x-usb.c
index efc162e..abb520d 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -1726,7 +1726,9 @@ static void at76_mac80211_tx_callback(struct urb *urb)
ieee80211_wake_queues(priv-hw);
 }
 
-static void at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void at76_mac80211_tx(struct ieee80211_hw *hw,
+struct ieee80211_tx_control *control,
+struct