aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-01-20 07:55:24 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-06 14:50:37 -0500
commit7852e36186d2a1983c215836d7e3d7b8927c930d (patch)
tree191ab7c06b1ab871b95c1d732e9ca67482dbce9d /net/mac80211/sta_info.h
parenta4ec45a421b80bc36fd37578accf081f32527a7f (diff)
mac80211: remove dummy STA support
The dummy STA support was added because I didn't want to change the driver API at the time. Now that we have state transitions triggering station add/remove in the driver, we only call add once a station reaches ASSOCIATED, so we can remove the dummy station stuff again. While at it, tighten the RX check and accept only port control (EAP) frames from the AP station if it's not associated yet -- in other cases there's no race. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/sta_info.h')
-rw-r--r--net/mac80211/sta_info.h30
1 files changed, 1 insertions, 29 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 2ee808860007..03f249bc2766 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -265,8 +265,6 @@ struct sta_ampdu_mlme {
265 * @dead: set to true when sta is unlinked 265 * @dead: set to true when sta is unlinked
266 * @uploaded: set to true when sta is uploaded to the driver 266 * @uploaded: set to true when sta is uploaded to the driver
267 * @lost_packets: number of consecutive lost packets 267 * @lost_packets: number of consecutive lost packets
268 * @dummy: indicate a dummy station created for receiving
269 * EAP frames before association
270 * @sta: station information we share with the driver 268 * @sta: station information we share with the driver
271 * @sta_state: duplicates information about station state (for debug) 269 * @sta_state: duplicates information about station state (for debug)
272 * @beacon_loss_count: number of times beacon loss has triggered 270 * @beacon_loss_count: number of times beacon loss has triggered
@@ -364,9 +362,6 @@ struct sta_info {
364 unsigned int lost_packets; 362 unsigned int lost_packets;
365 unsigned int beacon_loss_count; 363 unsigned int beacon_loss_count;
366 364
367 /* should be right in front of sta to be in the same cache line */
368 bool dummy;
369
370 /* keep last! */ 365 /* keep last! */
371 struct ieee80211_sta sta; 366 struct ieee80211_sta sta;
372}; 367};
@@ -468,15 +463,9 @@ rcu_dereference_protected_tid_tx(struct sta_info *sta, int tid)
468struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata, 463struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata,
469 const u8 *addr); 464 const u8 *addr);
470 465
471struct sta_info *sta_info_get_rx(struct ieee80211_sub_if_data *sdata,
472 const u8 *addr);
473
474struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata, 466struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
475 const u8 *addr); 467 const u8 *addr);
476 468
477struct sta_info *sta_info_get_bss_rx(struct ieee80211_sub_if_data *sdata,
478 const u8 *addr);
479
480static inline 469static inline
481void for_each_sta_info_type_check(struct ieee80211_local *local, 470void for_each_sta_info_type_check(struct ieee80211_local *local,
482 const u8 *addr, 471 const u8 *addr,
@@ -485,23 +474,7 @@ void for_each_sta_info_type_check(struct ieee80211_local *local,
485{ 474{
486} 475}
487 476
488#define for_each_sta_info(local, _addr, _sta, nxt) \ 477#define for_each_sta_info(local, _addr, _sta, nxt) \
489 for ( /* initialise loop */ \
490 _sta = rcu_dereference(local->sta_hash[STA_HASH(_addr)]),\
491 nxt = _sta ? rcu_dereference(_sta->hnext) : NULL; \
492 /* typecheck */ \
493 for_each_sta_info_type_check(local, (_addr), _sta, nxt),\
494 /* continue condition */ \
495 _sta; \
496 /* advance loop */ \
497 _sta = nxt, \
498 nxt = _sta ? rcu_dereference(_sta->hnext) : NULL \
499 ) \
500 /* run code only if address matches and it's not a dummy sta */ \
501 if (memcmp(_sta->sta.addr, (_addr), ETH_ALEN) == 0 && \
502 !_sta->dummy)
503
504#define for_each_sta_info_rx(local, _addr, _sta, nxt) \
505 for ( /* initialise loop */ \ 478 for ( /* initialise loop */ \
506 _sta = rcu_dereference(local->sta_hash[STA_HASH(_addr)]),\ 479 _sta = rcu_dereference(local->sta_hash[STA_HASH(_addr)]),\
507 nxt = _sta ? rcu_dereference(_sta->hnext) : NULL; \ 480 nxt = _sta ? rcu_dereference(_sta->hnext) : NULL; \
@@ -540,7 +513,6 @@ void sta_info_free(struct ieee80211_local *local, struct sta_info *sta);
540 */ 513 */
541int sta_info_insert(struct sta_info *sta); 514int sta_info_insert(struct sta_info *sta);
542int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU); 515int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU);
543int sta_info_reinsert(struct sta_info *sta);
544 516
545int __must_check __sta_info_destroy(struct sta_info *sta); 517int __must_check __sta_info_destroy(struct sta_info *sta);
546int sta_info_destroy_addr(struct ieee80211_sub_if_data *sdata, 518int sta_info_destroy_addr(struct ieee80211_sub_if_data *sdata,