diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-06-10 04:21:34 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-14 15:39:26 -0400 |
commit | 77a121c3a88eb00a4b5e753d083dbb7d49fefb0a (patch) | |
tree | d1c802c9133a149094b484cd4796faeb9d7201fb /net/mac80211/ibss.c | |
parent | 36b3a628a4e85d002ee8813ebd2a5caef6d3c1a7 (diff) |
mac80211: pull mgmt frame rx into rx handler
Some code is duplicated between ibss, mesh and
managed mode regarding the queueing of management
frames. Since all modes now use a common skb
queue and a common work function, we can pull
the queueing code into the rx handler directly
and remove the duplicated length checks etc.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 982690af1f61..bfd7286488c7 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -847,32 +847,6 @@ void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local) | |||
847 | mutex_unlock(&local->iflist_mtx); | 847 | mutex_unlock(&local->iflist_mtx); |
848 | } | 848 | } |
849 | 849 | ||
850 | ieee80211_rx_result | ||
851 | ieee80211_ibss_rx_mgmt(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) | ||
852 | { | ||
853 | struct ieee80211_local *local = sdata->local; | ||
854 | struct ieee80211_mgmt *mgmt; | ||
855 | u16 fc; | ||
856 | |||
857 | if (skb->len < 24) | ||
858 | return RX_DROP_MONITOR; | ||
859 | |||
860 | mgmt = (struct ieee80211_mgmt *) skb->data; | ||
861 | fc = le16_to_cpu(mgmt->frame_control); | ||
862 | |||
863 | switch (fc & IEEE80211_FCTL_STYPE) { | ||
864 | case IEEE80211_STYPE_PROBE_RESP: | ||
865 | case IEEE80211_STYPE_BEACON: | ||
866 | case IEEE80211_STYPE_PROBE_REQ: | ||
867 | case IEEE80211_STYPE_AUTH: | ||
868 | skb_queue_tail(&sdata->skb_queue, skb); | ||
869 | ieee80211_queue_work(&local->hw, &sdata->work); | ||
870 | return RX_QUEUED; | ||
871 | } | ||
872 | |||
873 | return RX_DROP_MONITOR; | ||
874 | } | ||
875 | |||
876 | int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, | 850 | int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, |
877 | struct cfg80211_ibss_params *params) | 851 | struct cfg80211_ibss_params *params) |
878 | { | 852 | { |