aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorAlexander Bondar <alexander.bondar@intel.com>2013-05-19 07:23:57 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-06-13 05:58:47 -0400
commit817cee767523769cbc5ac94e439cde0c21752cbc (patch)
treec49bde9751d118e39b948709b493280e50859ed1 /net/mac80211/mlme.c
parente562078a19226660299eeaf40a50752672214f11 (diff)
mac80211: track AP's beacon rate and give it to the driver
Track the AP's beacon rate in the scan BSS data and in the interface configuration to let the drivers know which rate the AP is using. This information may be used by drivers, in our case to let the firmware optimise beacon RX. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index ad9bb9e10cbb..87f2d4df31f8 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1779,8 +1779,10 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
1779 * probably just won't work at all. 1779 * probably just won't work at all.
1780 */ 1780 */
1781 bss_conf->dtim_period = sdata->u.mgd.dtim_period ?: 1; 1781 bss_conf->dtim_period = sdata->u.mgd.dtim_period ?: 1;
1782 bss_conf->beacon_rate = bss->beacon_rate;
1782 bss_info_changed |= BSS_CHANGED_BEACON_INFO; 1783 bss_info_changed |= BSS_CHANGED_BEACON_INFO;
1783 } else { 1784 } else {
1785 bss_conf->beacon_rate = NULL;
1784 bss_conf->dtim_period = 0; 1786 bss_conf->dtim_period = 0;
1785 } 1787 }
1786 1788
@@ -1903,6 +1905,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1903 del_timer_sync(&sdata->u.mgd.chswitch_timer); 1905 del_timer_sync(&sdata->u.mgd.chswitch_timer);
1904 1906
1905 sdata->vif.bss_conf.dtim_period = 0; 1907 sdata->vif.bss_conf.dtim_period = 0;
1908 sdata->vif.bss_conf.beacon_rate = NULL;
1909
1906 ifmgd->have_beacon = false; 1910 ifmgd->have_beacon = false;
1907 1911
1908 ifmgd->flags = 0; 1912 ifmgd->flags = 0;
@@ -2754,8 +2758,10 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
2754 2758
2755 bss = ieee80211_bss_info_update(local, rx_status, mgmt, len, elems, 2759 bss = ieee80211_bss_info_update(local, rx_status, mgmt, len, elems,
2756 channel); 2760 channel);
2757 if (bss) 2761 if (bss) {
2758 ieee80211_rx_bss_put(local, bss); 2762 ieee80211_rx_bss_put(local, bss);
2763 sdata->vif.bss_conf.beacon_rate = bss->beacon_rate;
2764 }
2759 2765
2760 if (!sdata->u.mgd.associated || 2766 if (!sdata->u.mgd.associated ||
2761 !ether_addr_equal(mgmt->bssid, sdata->u.mgd.associated->bssid)) 2767 !ether_addr_equal(mgmt->bssid, sdata->u.mgd.associated->bssid))