aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/status.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-09-29 10:04:36 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-30 15:57:19 -0400
commitc2c98fdeb5c897499644eb247285c8e3dacc6450 (patch)
treeaaa9c0f8dd16ab896308470e21a0813041094670 /net/mac80211/status.c
parentdeeaee197b0fa694ba6c8f02cdb57b3be7115b4f (diff)
mac80211: optimise station flags
The flaglock in struct sta_info has long been something that I wanted to get rid of, this finally does the conversion to atomic bitops. The conversion itself is straight-forward in most places, a few things needed to change a bit since we can no longer use multiple bits at the same time. On x86-64, this is a fairly significant code size reduction: text data bss dec hex 427861 23648 1008 452517 6e7a5 before 425383 23648 976 450007 6ddd7 after Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r--net/mac80211/status.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index b5df9be4d043..864a9c3bcf46 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -96,7 +96,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
96 * packet. If the STA went to power save mode, this will happen 96 * packet. If the STA went to power save mode, this will happen
97 * when it wakes up for the next time. 97 * when it wakes up for the next time.
98 */ 98 */
99 set_sta_flags(sta, WLAN_STA_CLEAR_PS_FILT); 99 set_sta_flag(sta, WLAN_STA_CLEAR_PS_FILT);
100 100
101 /* 101 /*
102 * This code races in the following way: 102 * This code races in the following way:
@@ -132,7 +132,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
132 * changes before calling TX status events if ordering can be 132 * changes before calling TX status events if ordering can be
133 * unknown. 133 * unknown.
134 */ 134 */
135 if (test_sta_flags(sta, WLAN_STA_PS_STA) && 135 if (test_sta_flag(sta, WLAN_STA_PS_STA) &&
136 skb_queue_len(&sta->tx_filtered[ac]) < STA_MAX_TX_BUFFER) { 136 skb_queue_len(&sta->tx_filtered[ac]) < STA_MAX_TX_BUFFER) {
137 skb_queue_tail(&sta->tx_filtered[ac], skb); 137 skb_queue_tail(&sta->tx_filtered[ac], skb);
138 sta_info_recalc_tim(sta); 138 sta_info_recalc_tim(sta);
@@ -144,7 +144,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
144 return; 144 return;
145 } 145 }
146 146
147 if (!test_sta_flags(sta, WLAN_STA_PS_STA) && 147 if (!test_sta_flag(sta, WLAN_STA_PS_STA) &&
148 !(info->flags & IEEE80211_TX_INTFL_RETRIED)) { 148 !(info->flags & IEEE80211_TX_INTFL_RETRIED)) {
149 /* Software retry the packet once */ 149 /* Software retry the packet once */
150 info->flags |= IEEE80211_TX_INTFL_RETRIED; 150 info->flags |= IEEE80211_TX_INTFL_RETRIED;
@@ -157,7 +157,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
157 wiphy_debug(local->hw.wiphy, 157 wiphy_debug(local->hw.wiphy,
158 "dropped TX filtered frame, queue_len=%d PS=%d @%lu\n", 158 "dropped TX filtered frame, queue_len=%d PS=%d @%lu\n",
159 skb_queue_len(&sta->tx_filtered[ac]), 159 skb_queue_len(&sta->tx_filtered[ac]),
160 !!test_sta_flags(sta, WLAN_STA_PS_STA), jiffies); 160 !!test_sta_flag(sta, WLAN_STA_PS_STA), jiffies);
161#endif 161#endif
162 dev_kfree_skb(skb); 162 dev_kfree_skb(skb);
163} 163}
@@ -285,10 +285,10 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
285 continue; 285 continue;
286 286
287 if (info->flags & IEEE80211_TX_STATUS_EOSP) 287 if (info->flags & IEEE80211_TX_STATUS_EOSP)
288 clear_sta_flags(sta, WLAN_STA_SP); 288 clear_sta_flag(sta, WLAN_STA_SP);
289 289
290 acked = !!(info->flags & IEEE80211_TX_STAT_ACK); 290 acked = !!(info->flags & IEEE80211_TX_STAT_ACK);
291 if (!acked && test_sta_flags(sta, WLAN_STA_PS_STA)) { 291 if (!acked && test_sta_flag(sta, WLAN_STA_PS_STA)) {
292 /* 292 /*
293 * The STA is in power save mode, so assume 293 * The STA is in power save mode, so assume
294 * that this TX packet failed because of that. 294 * that this TX packet failed because of that.