aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 583b34686a26..74479c2d12d4 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -806,11 +806,12 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
806{ 806{
807 struct ieee80211_bss *bss = (void *)cbss->priv; 807 struct ieee80211_bss *bss = (void *)cbss->priv;
808 struct ieee80211_local *local = sdata->local; 808 struct ieee80211_local *local = sdata->local;
809 struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
809 810
810 bss_info_changed |= BSS_CHANGED_ASSOC; 811 bss_info_changed |= BSS_CHANGED_ASSOC;
811 /* set timing information */ 812 /* set timing information */
812 sdata->vif.bss_conf.beacon_int = cbss->beacon_interval; 813 bss_conf->beacon_int = cbss->beacon_interval;
813 sdata->vif.bss_conf.timestamp = cbss->tsf; 814 bss_conf->timestamp = cbss->tsf;
814 815
815 bss_info_changed |= BSS_CHANGED_BEACON_INT; 816 bss_info_changed |= BSS_CHANGED_BEACON_INT;
816 bss_info_changed |= ieee80211_handle_bss_capability(sdata, 817 bss_info_changed |= ieee80211_handle_bss_capability(sdata,
@@ -835,7 +836,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
835 836
836 ieee80211_led_assoc(local, 1); 837 ieee80211_led_assoc(local, 1);
837 838
838 sdata->vif.bss_conf.assoc = 1; 839 bss_conf->assoc = 1;
839 /* 840 /*
840 * For now just always ask the driver to update the basic rateset 841 * For now just always ask the driver to update the basic rateset
841 * when we have associated, we aren't checking whether it actually 842 * when we have associated, we aren't checking whether it actually
@@ -848,9 +849,15 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
848 849
849 /* Tell the driver to monitor connection quality (if supported) */ 850 /* Tell the driver to monitor connection quality (if supported) */
850 if ((local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI) && 851 if ((local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI) &&
851 sdata->vif.bss_conf.cqm_rssi_thold) 852 bss_conf->cqm_rssi_thold)
852 bss_info_changed |= BSS_CHANGED_CQM; 853 bss_info_changed |= BSS_CHANGED_CQM;
853 854
855 /* Enable ARP filtering */
856 if (bss_conf->arp_filter_enabled != sdata->arp_filter_state) {
857 bss_conf->arp_filter_enabled = sdata->arp_filter_state;
858 bss_info_changed |= BSS_CHANGED_ARP_FILTER;
859 }
860
854 ieee80211_bss_info_change_notify(sdata, bss_info_changed); 861 ieee80211_bss_info_change_notify(sdata, bss_info_changed);
855 862
856 mutex_lock(&local->iflist_mtx); 863 mutex_lock(&local->iflist_mtx);
@@ -932,6 +939,12 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
932 939
933 ieee80211_hw_config(local, config_changed); 940 ieee80211_hw_config(local, config_changed);
934 941
942 /* Disable ARP filtering */
943 if (sdata->vif.bss_conf.arp_filter_enabled) {
944 sdata->vif.bss_conf.arp_filter_enabled = false;
945 changed |= BSS_CHANGED_ARP_FILTER;
946 }
947
935 /* The BSSID (not really interesting) and HT changed */ 948 /* The BSSID (not really interesting) and HT changed */
936 changed |= BSS_CHANGED_BSSID | BSS_CHANGED_HT; 949 changed |= BSS_CHANGED_BSSID | BSS_CHANGED_HT;
937 ieee80211_bss_info_change_notify(sdata, changed); 950 ieee80211_bss_info_change_notify(sdata, changed);
@@ -2018,18 +2031,9 @@ static enum work_done_result ieee80211_assoc_done(struct ieee80211_work *wk,
2018 cfg80211_send_assoc_timeout(wk->sdata->dev, 2031 cfg80211_send_assoc_timeout(wk->sdata->dev,
2019 wk->filter_ta); 2032 wk->filter_ta);
2020 return WORK_DONE_DESTROY; 2033 return WORK_DONE_DESTROY;
2021 } else {
2022 mutex_unlock(&wk->sdata->u.mgd.mtx);
2023#ifdef CONFIG_INET
2024 /*
2025 * configure ARP filter IP addresses to the driver,
2026 * intentionally outside the mgd mutex.
2027 */
2028 rtnl_lock();
2029 ieee80211_set_arp_filter(wk->sdata);
2030 rtnl_unlock();
2031#endif
2032 } 2034 }
2035
2036 mutex_unlock(&wk->sdata->u.mgd.mtx);
2033 } 2037 }
2034 2038
2035 cfg80211_send_rx_assoc(wk->sdata->dev, skb->data, skb->len); 2039 cfg80211_send_rx_assoc(wk->sdata->dev, skb->data, skb->len);