]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/mac80211/offchannel.c
Merge tag 'nfs-for-3.8-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[karo-tx-linux.git] / net / mac80211 / offchannel.c
index 2c84185dfdb0c2e9901d86b0903463061ddaaecf..a5379aea7d09d2410c70a3b467a1f336aa32dc43 100644 (file)
@@ -107,6 +107,9 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
 {
        struct ieee80211_sub_if_data *sdata;
 
+       if (WARN_ON(local->use_chanctx))
+               return;
+
        /*
         * notify the AP about us leaving the channel and stop all
         * STA interfaces.
@@ -145,6 +148,9 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,
 {
        struct ieee80211_sub_if_data *sdata;
 
+       if (WARN_ON(local->use_chanctx))
+               return;
+
        mutex_lock(&local->iflist_mtx);
        list_for_each_entry(sdata, &local->interfaces, list) {
                if (sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE)
@@ -193,13 +199,14 @@ void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc)
 
        if (roc->mgmt_tx_cookie) {
                if (!WARN_ON(!roc->frame)) {
-                       ieee80211_tx_skb(roc->sdata, roc->frame);
+                       ieee80211_tx_skb_tid_band(roc->sdata, roc->frame, 7,
+                                                 roc->chan->band);
                        roc->frame = NULL;
                }
        } else {
-               cfg80211_ready_on_channel(&roc->sdata->wdev, (unsigned long)roc,
-                                         roc->chan, roc->chan_type,
-                                         roc->req_duration, GFP_KERNEL);
+               cfg80211_ready_on_channel(&roc->sdata->wdev, roc->cookie,
+                                         roc->chan, roc->req_duration,
+                                         GFP_KERNEL);
        }
 
        roc->notified = true;
@@ -276,8 +283,7 @@ void ieee80211_start_next_roc(struct ieee80211_local *local)
                if (!duration)
                        duration = 10;
 
-               ret = drv_remain_on_channel(local, roc->chan,
-                                           roc->chan_type,
+               ret = drv_remain_on_channel(local, roc->sdata, roc->chan,
                                            duration);
 
                roc->started = true;
@@ -313,8 +319,7 @@ void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc)
 
        if (!roc->mgmt_tx_cookie)
                cfg80211_remain_on_channel_expired(&roc->sdata->wdev,
-                                                  (unsigned long)roc,
-                                                  roc->chan, roc->chan_type,
+                                                  roc->cookie, roc->chan,
                                                   GFP_KERNEL);
 
        list_for_each_entry_safe(dep, tmp, &roc->dependents, list)
@@ -353,7 +358,6 @@ void ieee80211_sw_roc_work(struct work_struct *work)
                ieee80211_recalc_idle(local);
 
                local->tmp_channel = roc->chan;
-               local->tmp_channel_type = roc->chan_type;
                ieee80211_hw_config(local, 0);
 
                /* tell userspace or send frame */