]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mac80211: send channel switch started notifications
authorLuciano Coelho <luciano.coelho@intel.com>
Fri, 7 Nov 2014 12:31:36 +0000 (14:31 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 10 Nov 2014 09:20:17 +0000 (10:20 +0100)
Send a channel switch notification to userspace when a channel switch
is requested or when we react to a remote CSA.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c
net/mac80211/mlme.c

index 76e794edd96026f77fb6ff1574529cb2b7bb8380..a43a14863ecba3f0fbb36d6645fcf053188ae260 100644 (file)
@@ -3195,6 +3195,9 @@ __ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
                ieee80211_stop_vif_queues(local, sdata,
                                          IEEE80211_QUEUE_STOP_REASON_CSA);
 
+       cfg80211_ch_switch_started_notify(sdata->dev, &sdata->csa_chandef,
+                                         params->count);
+
        if (changed) {
                ieee80211_bss_info_change_notify(sdata, changed);
                drv_channel_switch_beacon(sdata, &params->chandef);
index 213a420704a62f9dfecd25a7873fe25734a31ce7..947250077615e3c6a4801512370f9647a75ad482 100644 (file)
@@ -1205,6 +1205,9 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
                                          IEEE80211_QUEUE_STOP_REASON_CSA);
        mutex_unlock(&local->mtx);
 
+       cfg80211_ch_switch_started_notify(sdata->dev, &csa_ie.chandef,
+                                         csa_ie.count);
+
        if (local->ops->channel_switch) {
                /* use driver's channel switch callback */
                drv_channel_switch(local, sdata, &ch_switch);