These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / net / mac80211 / ibss.c
index a9c9d96..6a12b0f 100644 (file)
@@ -188,7 +188,7 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata,
                 * keep them at 0
                 */
                pos = ieee80211_ie_build_ht_oper(pos, &sband->ht_cap,
-                                                chandef, 0);
+                                                chandef, 0, false);
 
                /* add VHT capability and information IEs */
                if (chandef->width != NL80211_CHAN_WIDTH_20 &&
@@ -229,7 +229,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
        struct cfg80211_chan_def chandef;
        struct ieee80211_channel *chan;
        struct beacon_data *presp;
-       enum nl80211_bss_scan_width scan_width;
+       struct cfg80211_inform_bss bss_meta = {};
        bool have_higher_than_11mbit;
        bool radar_required;
        int err;
@@ -356,7 +356,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
        else
                sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;
 
-       ieee80211_set_wmm_default(sdata, true);
+       ieee80211_set_wmm_default(sdata, true, false);
 
        sdata->vif.bss_conf.ibss_joined = true;
        sdata->vif.bss_conf.ibss_creator = creator;
@@ -383,10 +383,11 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
        mod_timer(&ifibss->timer,
                  round_jiffies(jiffies + IEEE80211_IBSS_MERGE_INTERVAL));
 
-       scan_width = cfg80211_chandef_to_scan_width(&chandef);
-       bss = cfg80211_inform_bss_width_frame(local->hw.wiphy, chan,
-                                             scan_width, mgmt,
-                                             presp->head_len, 0, GFP_KERNEL);
+       bss_meta.chan = chan;
+       bss_meta.scan_width = cfg80211_chandef_to_scan_width(&chandef);
+       bss = cfg80211_inform_bss_frame_data(local->hw.wiphy, &bss_meta, mgmt,
+                                            presp->head_len, GFP_KERNEL);
+
        cfg80211_put_bss(local->hw.wiphy, bss);
        netif_carrier_on(sdata->dev);
        cfg80211_ibss_joined(sdata->dev, ifibss->bssid, chan, GFP_KERNEL);
@@ -646,7 +647,7 @@ ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, const u8 *bssid,
                return NULL;
        }
 
-       sta->last_rx = jiffies;
+       sta->rx_stats.last_rx = jiffies;
 
        /* make sure mandatory rates are always added */
        sband = local->hw.wiphy->bands[band];
@@ -668,7 +669,8 @@ static int ieee80211_sta_active_ibss(struct ieee80211_sub_if_data *sdata)
 
        list_for_each_entry_rcu(sta, &local->sta_list, list) {
                if (sta->sdata == sdata &&
-                   time_after(sta->last_rx + IEEE80211_IBSS_MERGE_INTERVAL,
+                   time_after(sta->rx_stats.last_rx +
+                              IEEE80211_IBSS_MERGE_INTERVAL,
                               jiffies)) {
                        active++;
                        break;
@@ -1032,8 +1034,11 @@ static void ieee80211_update_sta_info(struct ieee80211_sub_if_data *sdata,
                }
        }
 
-       if (sta && elems->wmm_info && local->hw.queues >= IEEE80211_NUM_ACS)
+       if (sta && !sta->sta.wme &&
+           elems->wmm_info && local->hw.queues >= IEEE80211_NUM_ACS) {
                sta->sta.wme = true;
+               ieee80211_check_fast_xmit(sta);
+       }
 
        if (sta && elems->ht_operation && elems->ht_cap_elem &&
            sdata->u.ibss.chandef.width != NL80211_CHAN_WIDTH_20_NOHT &&
@@ -1231,7 +1236,7 @@ void ieee80211_ibss_rx_no_sta(struct ieee80211_sub_if_data *sdata,
        if (!sta)
                return;
 
-       sta->last_rx = jiffies;
+       sta->rx_stats.last_rx = jiffies;
 
        /* make sure mandatory rates are always added */
        sband = local->hw.wiphy->bands[band];
@@ -1249,7 +1254,7 @@ static void ieee80211_ibss_sta_expire(struct ieee80211_sub_if_data *sdata)
        struct ieee80211_local *local = sdata->local;
        struct sta_info *sta, *tmp;
        unsigned long exp_time = IEEE80211_IBSS_INACTIVITY_LIMIT;
-       unsigned long exp_rsn_time = IEEE80211_IBSS_RSN_INACTIVITY_LIMIT;
+       unsigned long exp_rsn = IEEE80211_IBSS_RSN_INACTIVITY_LIMIT;
 
        mutex_lock(&local->sta_mtx);
 
@@ -1257,8 +1262,8 @@ static void ieee80211_ibss_sta_expire(struct ieee80211_sub_if_data *sdata)
                if (sdata != sta->sdata)
                        continue;
 
-               if (time_after(jiffies, sta->last_rx + exp_time) ||
-                   (time_after(jiffies, sta->last_rx + exp_rsn_time) &&
+               if (time_after(jiffies, sta->rx_stats.last_rx + exp_time) ||
+                   (time_after(jiffies, sta->rx_stats.last_rx + exp_rsn) &&
                     sta->sta_state != IEEE80211_STA_AUTHORIZED)) {
                        sta_dbg(sta->sdata, "expiring inactive %sSTA %pM\n",
                                sta->sta_state != IEEE80211_STA_AUTHORIZED ?
@@ -1727,7 +1732,6 @@ void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local)
                if (sdata->vif.type != NL80211_IFTYPE_ADHOC)
                        continue;
                sdata->u.ibss.last_scan_completed = jiffies;
-               ieee80211_queue_work(&local->hw, &sdata->work);
        }
        mutex_unlock(&local->iflist_mtx);
 }