aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorThomas Huehn <thomas@net.t-labs.tu-berlin.de>2012-07-23 15:33:42 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-31 10:18:39 -0400
commit36323f817af0376c78612cfdab714b0feb05fea5 (patch)
tree9821c1805175a79006799e458f1efa238af671f7 /include/net
parentab09587740fddf6b4116be7b6716ab47f34d2634 (diff)
mac80211: move TX station pointer and restructure TX
Remove the control.sta pointer from ieee80211_tx_info to free up sufficient space in the TX skb control buffer for the upcoming Transmit Power Control (TPC). Instead, the pointer is now on the stack in a new control struct that is passed as a function parameter to the drivers' tx method. Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: Felix Fietkau <nbd@openwrt.org> [reworded commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/mac80211.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index d67d3bbe21c1..8114f590f715 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -527,9 +527,6 @@ struct ieee80211_tx_rate {
527 * (2) driver internal use (if applicable) 527 * (2) driver internal use (if applicable)
528 * (3) TX status information - driver tells mac80211 what happened 528 * (3) TX status information - driver tells mac80211 what happened
529 * 529 *
530 * The TX control's sta pointer is only valid during the ->tx call,
531 * it may be NULL.
532 *
533 * @flags: transmit info flags, defined above 530 * @flags: transmit info flags, defined above
534 * @band: the band to transmit on (use for checking for races) 531 * @band: the band to transmit on (use for checking for races)
535 * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC 532 * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC
@@ -560,6 +557,7 @@ struct ieee80211_tx_info {
560 struct ieee80211_tx_rate rates[ 557 struct ieee80211_tx_rate rates[
561 IEEE80211_TX_MAX_RATES]; 558 IEEE80211_TX_MAX_RATES];
562 s8 rts_cts_rate_idx; 559 s8 rts_cts_rate_idx;
560 /* 3 bytes free */
563 }; 561 };
564 /* only needed before rate control */ 562 /* only needed before rate control */
565 unsigned long jiffies; 563 unsigned long jiffies;
@@ -567,7 +565,7 @@ struct ieee80211_tx_info {
567 /* NB: vif can be NULL for injected frames */ 565 /* NB: vif can be NULL for injected frames */
568 struct ieee80211_vif *vif; 566 struct ieee80211_vif *vif;
569 struct ieee80211_key_conf *hw_key; 567 struct ieee80211_key_conf *hw_key;
570 struct ieee80211_sta *sta; 568 /* 8 bytes free */
571 } control; 569 } control;
572 struct { 570 struct {
573 struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES]; 571 struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
@@ -1079,6 +1077,16 @@ enum sta_notify_cmd {
1079}; 1077};
1080 1078
1081/** 1079/**
1080 * struct ieee80211_tx_control - TX control data
1081 *
1082 * @sta: station table entry, this sta pointer may be NULL and
1083 * it is not allowed to copy the pointer, due to RCU.
1084 */
1085struct ieee80211_tx_control {
1086 struct ieee80211_sta *sta;
1087};
1088
1089/**
1082 * enum ieee80211_hw_flags - hardware flags 1090 * enum ieee80211_hw_flags - hardware flags
1083 * 1091 *
1084 * These flags are used to indicate hardware capabilities to 1092 * These flags are used to indicate hardware capabilities to
@@ -2269,7 +2277,9 @@ enum ieee80211_rate_control_changed {
2269 * The callback is optional and can (should!) sleep. 2277 * The callback is optional and can (should!) sleep.
2270 */ 2278 */
2271struct ieee80211_ops { 2279struct ieee80211_ops {
2272 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 2280 void (*tx)(struct ieee80211_hw *hw,
2281 struct ieee80211_tx_control *control,
2282 struct sk_buff *skb);
2273 int (*start)(struct ieee80211_hw *hw); 2283 int (*start)(struct ieee80211_hw *hw);
2274 void (*stop)(struct ieee80211_hw *hw); 2284 void (*stop)(struct ieee80211_hw *hw);
2275#ifdef CONFIG_PM 2285#ifdef CONFIG_PM