diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2008-04-09 19:56:15 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-16 15:59:56 -0400 |
commit | d18ef29f34eb33099d387a327abe139f3915a829 (patch) | |
tree | 18547f7c3a6f9e9c86249bcafbfe9e3cc4845db2 | |
parent | 8d0c7fad35538e02dff6fdb2d67943ae582819b3 (diff) |
mac80211: no BSS changes to driver from beacons processed during scanning
There is no need to send BSS changes to driver from beacons processed
during scanning. We are more interested in beacons from an AP with which
we are associated - these will still be used to send updates to driver as
the beacons are received without scanning.
This change·removes the requirement that bss_info_changed needs to be atomic.
The beacons received during scanning are processed from a tasklet, but if we
do not call bss_info_changed for these beacons there is no need for it to be
atomic. This function (bss_info_changed) is called either from workqueue or
ioctl in all other instances.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | include/net/mac80211.h | 3 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 16 |
2 files changed, 12 insertions, 7 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 079e7bd86c90..4a80d74975e8 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1020,8 +1020,7 @@ enum ieee80211_ampdu_mlme_action { | |||
1020 | * level driver (e.g. assoc/disassoc status, erp parameters). | 1020 | * level driver (e.g. assoc/disassoc status, erp parameters). |
1021 | * This function should not be used if no BSS has been set, unless | 1021 | * This function should not be used if no BSS has been set, unless |
1022 | * for association indication. The @changed parameter indicates which | 1022 | * for association indication. The @changed parameter indicates which |
1023 | * of the bss parameters has changed when a call is made. This callback | 1023 | * of the bss parameters has changed when a call is made. |
1024 | * has to be atomic. | ||
1025 | * | 1024 | * |
1026 | * @configure_filter: Configure the device's RX filter. | 1025 | * @configure_filter: Configure the device's RX filter. |
1027 | * See the section "Frame filtering" for more information. | 1026 | * See the section "Frame filtering" for more information. |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 83e8b497e6db..e3f2cb086588 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2797,6 +2797,17 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev, | |||
2797 | 2797 | ||
2798 | ieee802_11_parse_elems(mgmt->u.beacon.variable, len - baselen, &elems); | 2798 | ieee802_11_parse_elems(mgmt->u.beacon.variable, len - baselen, &elems); |
2799 | 2799 | ||
2800 | if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { | ||
2801 | ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param, | ||
2802 | elems.wmm_param_len); | ||
2803 | } | ||
2804 | |||
2805 | /* Do not send changes to driver if we are scanning. This removes | ||
2806 | * requirement that driver's bss_info_changed function needs to be | ||
2807 | * atomic. */ | ||
2808 | if (local->sta_sw_scanning || local->sta_hw_scanning) | ||
2809 | return; | ||
2810 | |||
2800 | if (elems.erp_info && elems.erp_info_len >= 1) | 2811 | if (elems.erp_info && elems.erp_info_len >= 1) |
2801 | changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]); | 2812 | changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]); |
2802 | else { | 2813 | else { |
@@ -2816,11 +2827,6 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev, | |||
2816 | &bss_info); | 2827 | &bss_info); |
2817 | } | 2828 | } |
2818 | 2829 | ||
2819 | if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { | ||
2820 | ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param, | ||
2821 | elems.wmm_param_len); | ||
2822 | } | ||
2823 | |||
2824 | ieee80211_bss_info_change_notify(sdata, changed); | 2830 | ieee80211_bss_info_change_notify(sdata, changed); |
2825 | } | 2831 | } |
2826 | 2832 | ||