]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/mac80211/cfg.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[karo-tx-linux.git] / net / mac80211 / cfg.c
index 3d1b091d9b2ece8d632537a443867939db80706b..4baa03b1c251b0691d45d4622b28d595d08dd076 100644 (file)
@@ -62,7 +62,7 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
 
        if (type == NL80211_IFTYPE_AP_VLAN &&
            params && params->use_4addr == 0)
-               rcu_assign_pointer(sdata->u.vlan.sta, NULL);
+               RCU_INIT_POINTER(sdata->u.vlan.sta, NULL);
        else if (type == NL80211_IFTYPE_STATION &&
                 params && params->use_4addr >= 0)
                sdata->u.mgd.use_4addr = params->use_4addr;
@@ -542,7 +542,7 @@ static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata,
 
        sdata->vif.bss_conf.dtim_period = new->dtim_period;
 
-       rcu_assign_pointer(sdata->u.ap.beacon, new);
+       RCU_INIT_POINTER(sdata->u.ap.beacon, new);
 
        synchronize_rcu();
 
@@ -594,7 +594,7 @@ static int ieee80211_del_beacon(struct wiphy *wiphy, struct net_device *dev)
        if (!old)
                return -ENOENT;
 
-       rcu_assign_pointer(sdata->u.ap.beacon, NULL);
+       RCU_INIT_POINTER(sdata->u.ap.beacon, NULL);
        synchronize_rcu();
        kfree(old);
 
@@ -697,6 +697,9 @@ static void sta_apply_parameters(struct ieee80211_local *local,
        }
        spin_unlock_irqrestore(&sta->flaglock, flags);
 
+       sta->sta.uapsd_queues = params->uapsd_queues;
+       sta->sta.max_sp = params->max_sp;
+
        /*
         * cfg80211 validates this (1-2007) and allows setting the AID
         * only when creating a new station entry
@@ -857,7 +860,7 @@ static int ieee80211_change_station(struct wiphy *wiphy,
                                return -EBUSY;
                        }
 
-                       rcu_assign_pointer(vlansdata->u.vlan.sta, sta);
+                       RCU_INIT_POINTER(vlansdata->u.vlan.sta, sta);
                }
 
                sta->sdata = vlansdata;
@@ -1137,6 +1140,22 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
                conf->dot11MeshHWMPRootMode = nconf->dot11MeshHWMPRootMode;
                ieee80211_mesh_root_setup(ifmsh);
        }
+       if (_chg_mesh_attr(NL80211_MESHCONF_GATE_ANNOUNCEMENTS, mask)) {
+               /* our current gate announcement implementation rides on root
+                * announcements, so require this ifmsh to also be a root node
+                * */
+               if (nconf->dot11MeshGateAnnouncementProtocol &&
+                   !conf->dot11MeshHWMPRootMode) {
+                       conf->dot11MeshHWMPRootMode = 1;
+                       ieee80211_mesh_root_setup(ifmsh);
+               }
+               conf->dot11MeshGateAnnouncementProtocol =
+                       nconf->dot11MeshGateAnnouncementProtocol;
+       }
+       if (_chg_mesh_attr(NL80211_MESHCONF_HWMP_RANN_INTERVAL, mask)) {
+               conf->dot11MeshHWMPRannInterval =
+                       nconf->dot11MeshHWMPRannInterval;
+       }
        return 0;
 }
 
@@ -1898,33 +1917,6 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
 
        *cookie = (unsigned long) skb;
 
-       if (is_offchan && local->ops->offchannel_tx) {
-               int ret;
-
-               IEEE80211_SKB_CB(skb)->band = chan->band;
-
-               mutex_lock(&local->mtx);
-
-               if (local->hw_offchan_tx_cookie) {
-                       mutex_unlock(&local->mtx);
-                       return -EBUSY;
-               }
-
-               /* TODO: bitrate control, TX processing? */
-               ret = drv_offchannel_tx(local, skb, chan, channel_type, wait);
-
-               if (ret == 0)
-                       local->hw_offchan_tx_cookie = *cookie;
-               mutex_unlock(&local->mtx);
-
-               /*
-                * Allow driver to return 1 to indicate it wants to have the
-                * frame transmitted with a remain_on_channel + regular TX.
-                */
-               if (ret != 1)
-                       return ret;
-       }
-
        if (is_offchan && local->ops->remain_on_channel) {
                unsigned int duration;
                int ret;
@@ -2011,18 +2003,6 @@ static int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,
 
        mutex_lock(&local->mtx);
 
-       if (local->ops->offchannel_tx_cancel_wait &&
-           local->hw_offchan_tx_cookie == cookie) {
-               ret = drv_offchannel_tx_cancel_wait(local);
-
-               if (!ret)
-                       local->hw_offchan_tx_cookie = 0;
-
-               mutex_unlock(&local->mtx);
-
-               return ret;
-       }
-
        if (local->ops->cancel_remain_on_channel) {
                cookie ^= 2;
                ret = ieee80211_cancel_remain_on_channel_hw(local, cookie);