]> Git Repo - linux.git/commitdiff
Merge tag 'mac80211-next-for-davem-2018-03-29' of git://git.kernel.org/pub/scm/linux...
authorDavid S. Miller <[email protected]>
Thu, 29 Mar 2018 20:23:26 +0000 (16:23 -0400)
committerDavid S. Miller <[email protected]>
Thu, 29 Mar 2018 20:23:26 +0000 (16:23 -0400)
Johannes Berg says:

====================
We have a fair number of patches, but many of them are from the
first bullet here:
 * EAPoL-over-nl80211 from Denis - this will let us fix
   some long-standing issues with bridging, races with
   encryption and more
 * DFS offload support from the qtnfmac folks
 * regulatory database changes for the new ETSI adaptivity
   requirements
 * various other fixes and small enhancements
====================

Signed-off-by: David S. Miller <[email protected]>
1  2 
drivers/net/wireless/mac80211_hwsim.c
include/net/mac80211.h
net/mac80211/mlme.c

index a37f4b1d9d30a770463e10dcd116c3e13aaae0cf,d9527c7b50d47f1b004c8c7730278769782a8180..6afe896e5cb84f8833c69787cae2dbdaaa8de1e9
@@@ -2584,8 -2584,8 +2584,8 @@@ static int mac80211_hwsim_new_radio(str
                addr[4] = idx;
                memcpy(data->addresses[0].addr, addr, ETH_ALEN);
                /* Why need here second address ? */
-               data->addresses[1].addr[0] |= 0x40;
                memcpy(data->addresses[1].addr, addr, ETH_ALEN);
+               data->addresses[1].addr[0] |= 0x40;
                hw->wiphy->n_addresses = 2;
                hw->wiphy->addresses = data->addresses;
                /* possible address clash is checked at hash table insertion */
        mutex_init(&data->mutex);
  
        data->netgroup = hwsim_net_get_netgroup(net);
 +      data->wmediumd = hwsim_net_get_wmediumd(net);
  
        /* Enable frame retransmissions for lossy channels */
        hw->max_rates = 4;
@@@ -3529,8 -3528,12 +3529,12 @@@ static void __net_exit hwsim_exit_net(s
                list_del(&data->list);
                rhashtable_remove_fast(&hwsim_radios_rht, &data->rht,
                                       hwsim_rht_params);
-               INIT_WORK(&data->destroy_work, destroy_radio);
-               queue_work(hwsim_wq, &data->destroy_work);
+               hwsim_radios_generation++;
+               spin_unlock_bh(&hwsim_radio_lock);
+               mac80211_hwsim_del_radio(data,
+                                        wiphy_name(data->hw->wiphy),
+                                        NULL);
+               spin_lock_bh(&hwsim_radio_lock);
        }
        spin_unlock_bh(&hwsim_radio_lock);
  
@@@ -3542,6 -3545,7 +3546,6 @@@ static struct pernet_operations hwsim_n
        .exit = hwsim_exit_net,
        .id   = &hwsim_net_id,
        .size = sizeof(struct hwsim_net),
 -      .async = true,
  };
  
  static void hwsim_exit_netlink(void)
diff --combined include/net/mac80211.h
index 2449982daf753033d7d041b4fa75825f8f65ea7c,d39fd6838f41cadd2ecbcea8a94653acf361b8aa..d2279b2d61aa98ca4bee0f338f00dbca13f6b2cf
@@@ -302,6 -302,8 +302,8 @@@ struct ieee80211_vif_chanctx_switch 
   * @BSS_CHANGED_MU_GROUPS: VHT MU-MIMO group id or user position changed
   * @BSS_CHANGED_KEEP_ALIVE: keep alive options (idle period or protected
   *    keep alive) changed.
+  * @BSS_CHANGED_MCAST_RATE: Multicast Rate setting changed for this interface
+  *
   */
  enum ieee80211_bss_change {
        BSS_CHANGED_ASSOC               = 1<<0,
        BSS_CHANGED_OCB                 = 1<<22,
        BSS_CHANGED_MU_GROUPS           = 1<<23,
        BSS_CHANGED_KEEP_ALIVE          = 1<<24,
+       BSS_CHANGED_MCAST_RATE          = 1<<25,
  
        /* when adding here, make sure to change ieee80211_reconfig */
  };
@@@ -2077,9 -2080,6 +2080,9 @@@ struct ieee80211_txq 
   *    virtual interface might not be given air time for the transmission of
   *    the frame, as it is not synced with the AP/P2P GO yet, and thus the
   *    deauthentication frame might not be transmitted.
 + >
 + * @IEEE80211_HW_DOESNT_SUPPORT_QOS_NDP: The driver (or firmware) doesn't
 + *    support QoS NDP for AP probing - that's most likely a driver bug.
   *
   * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
   */
@@@ -2125,7 -2125,6 +2128,7 @@@ enum ieee80211_hw_flags 
        IEEE80211_HW_SUPPORTS_TX_FRAG,
        IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA,
        IEEE80211_HW_DEAUTH_NEED_MGD_TX_PREP,
 +      IEEE80211_HW_DOESNT_SUPPORT_QOS_NDP,
  
        /* keep last, obviously */
        NUM_IEEE80211_HW_FLAGS
diff --combined net/mac80211/mlme.c
index fe4aefb06d9f2295a5a2e9863fc2bb4770deec02,07b58d20e89c8be369ac75df2769212de3bcce0e..69449db7e283316197a4d900f6cd9159e3185ea5
@@@ -897,8 -897,7 +897,8 @@@ void ieee80211_send_nullfunc(struct iee
        struct ieee80211_hdr_3addr *nullfunc;
        struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
  
 -      skb = ieee80211_nullfunc_get(&local->hw, &sdata->vif, true);
 +      skb = ieee80211_nullfunc_get(&local->hw, &sdata->vif,
 +              !ieee80211_hw_check(&local->hw, DOESNT_SUPPORT_QOS_NDP));
        if (!skb)
                return;
  
@@@ -1787,12 -1786,14 +1787,14 @@@ static bool ieee80211_sta_wmm_params(st
                params[ac].acm = acm;
                params[ac].uapsd = uapsd;
  
-               if (params[ac].cw_min > params[ac].cw_max) {
+               if (params->cw_min == 0 ||
+                   params[ac].cw_min > params[ac].cw_max) {
                        sdata_info(sdata,
                                   "AP has invalid WMM params (CWmin/max=%d/%d for ACI %d), using defaults\n",
                                   params[ac].cw_min, params[ac].cw_max, aci);
                        return false;
                }
+               ieee80211_regulatory_limit_wmm_params(sdata, &params[ac], ac);
        }
  
        for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
@@@ -2011,8 -2012,6 +2013,6 @@@ static void ieee80211_set_disassoc(stru
  
        /* deauthenticate/disassociate now */
        if (tx || frame_buf) {
-               struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
                /*
                 * In multi channel scenarios guarantee that the virtual
                 * interface is granted immediate airtime to transmit the
@@@ -3307,82 -3306,14 +3307,14 @@@ static const u64 care_about_ies 
        (1ULL << WLAN_EID_HT_OPERATION) |
        (1ULL << WLAN_EID_EXT_CHANSWITCH_ANN);
  
- static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
-                                    struct ieee80211_mgmt *mgmt, size_t len,
-                                    struct ieee80211_rx_status *rx_status)
+ static void ieee80211_handle_beacon_sig(struct ieee80211_sub_if_data *sdata,
+                                       struct ieee80211_if_managed *ifmgd,
+                                       struct ieee80211_bss_conf *bss_conf,
+                                       struct ieee80211_local *local,
+                                       struct ieee80211_rx_status *rx_status)
  {
-       struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
-       struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
-       size_t baselen;
-       struct ieee802_11_elems elems;
-       struct ieee80211_local *local = sdata->local;
-       struct ieee80211_chanctx_conf *chanctx_conf;
-       struct ieee80211_channel *chan;
-       struct sta_info *sta;
-       u32 changed = 0;
-       bool erp_valid;
-       u8 erp_value = 0;
-       u32 ncrc;
-       u8 *bssid;
-       u8 deauth_buf[IEEE80211_DEAUTH_FRAME_LEN];
-       sdata_assert_lock(sdata);
-       /* Process beacon from the current BSS */
-       baselen = (u8 *) mgmt->u.beacon.variable - (u8 *) mgmt;
-       if (baselen > len)
-               return;
-       rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
-       if (!chanctx_conf) {
-               rcu_read_unlock();
-               return;
-       }
-       if (rx_status->freq != chanctx_conf->def.chan->center_freq) {
-               rcu_read_unlock();
-               return;
-       }
-       chan = chanctx_conf->def.chan;
-       rcu_read_unlock();
-       if (ifmgd->assoc_data && ifmgd->assoc_data->need_beacon &&
-           ether_addr_equal(mgmt->bssid, ifmgd->assoc_data->bss->bssid)) {
-               ieee802_11_parse_elems(mgmt->u.beacon.variable,
-                                      len - baselen, false, &elems);
-               ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems);
-               if (elems.tim && !elems.parse_error) {
-                       const struct ieee80211_tim_ie *tim_ie = elems.tim;
-                       ifmgd->dtim_period = tim_ie->dtim_period;
-               }
-               ifmgd->have_beacon = true;
-               ifmgd->assoc_data->need_beacon = false;
-               if (ieee80211_hw_check(&local->hw, TIMING_BEACON_ONLY)) {
-                       sdata->vif.bss_conf.sync_tsf =
-                               le64_to_cpu(mgmt->u.beacon.timestamp);
-                       sdata->vif.bss_conf.sync_device_ts =
-                               rx_status->device_timestamp;
-                       if (elems.tim)
-                               sdata->vif.bss_conf.sync_dtim_count =
-                                       elems.tim->dtim_count;
-                       else
-                               sdata->vif.bss_conf.sync_dtim_count = 0;
-               }
-               /* continue assoc process */
-               ifmgd->assoc_data->timeout = jiffies;
-               ifmgd->assoc_data->timeout_started = true;
-               run_again(sdata, ifmgd->assoc_data->timeout);
-               return;
-       }
-       if (!ifmgd->associated ||
-           !ether_addr_equal(mgmt->bssid, ifmgd->associated->bssid))
-               return;
-       bssid = ifmgd->associated->bssid;
        /* Track average RSSI from the Beacon frames of the current AP */
        if (ifmgd->flags & IEEE80211_STA_RESET_SIGNAL_AVE) {
                ifmgd->flags &= ~IEEE80211_STA_RESET_SIGNAL_AVE;
                ewma_beacon_signal_init(&ifmgd->ave_beacon_signal);
                                sig, GFP_KERNEL);
                }
        }
+ }
+ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
+                                    struct ieee80211_mgmt *mgmt, size_t len,
+                                    struct ieee80211_rx_status *rx_status)
+ {
+       struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+       struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
+       size_t baselen;
+       struct ieee802_11_elems elems;
+       struct ieee80211_local *local = sdata->local;
+       struct ieee80211_chanctx_conf *chanctx_conf;
+       struct ieee80211_channel *chan;
+       struct sta_info *sta;
+       u32 changed = 0;
+       bool erp_valid;
+       u8 erp_value = 0;
+       u32 ncrc;
+       u8 *bssid;
+       u8 deauth_buf[IEEE80211_DEAUTH_FRAME_LEN];
+       sdata_assert_lock(sdata);
+       /* Process beacon from the current BSS */
+       baselen = (u8 *) mgmt->u.beacon.variable - (u8 *) mgmt;
+       if (baselen > len)
+               return;
+       rcu_read_lock();
+       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       if (!chanctx_conf) {
+               rcu_read_unlock();
+               return;
+       }
+       if (rx_status->freq != chanctx_conf->def.chan->center_freq) {
+               rcu_read_unlock();
+               return;
+       }
+       chan = chanctx_conf->def.chan;
+       rcu_read_unlock();
+       if (ifmgd->assoc_data && ifmgd->assoc_data->need_beacon &&
+           ether_addr_equal(mgmt->bssid, ifmgd->assoc_data->bss->bssid)) {
+               ieee802_11_parse_elems(mgmt->u.beacon.variable,
+                                      len - baselen, false, &elems);
+               ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems);
+               if (elems.tim && !elems.parse_error) {
+                       const struct ieee80211_tim_ie *tim_ie = elems.tim;
+                       ifmgd->dtim_period = tim_ie->dtim_period;
+               }
+               ifmgd->have_beacon = true;
+               ifmgd->assoc_data->need_beacon = false;
+               if (ieee80211_hw_check(&local->hw, TIMING_BEACON_ONLY)) {
+                       sdata->vif.bss_conf.sync_tsf =
+                               le64_to_cpu(mgmt->u.beacon.timestamp);
+                       sdata->vif.bss_conf.sync_device_ts =
+                               rx_status->device_timestamp;
+                       if (elems.tim)
+                               sdata->vif.bss_conf.sync_dtim_count =
+                                       elems.tim->dtim_count;
+                       else
+                               sdata->vif.bss_conf.sync_dtim_count = 0;
+               }
+               /* continue assoc process */
+               ifmgd->assoc_data->timeout = jiffies;
+               ifmgd->assoc_data->timeout_started = true;
+               run_again(sdata, ifmgd->assoc_data->timeout);
+               return;
+       }
+       if (!ifmgd->associated ||
+           !ether_addr_equal(mgmt->bssid, ifmgd->associated->bssid))
+               return;
+       bssid = ifmgd->associated->bssid;
+       if (!(rx_status->flag & RX_FLAG_NO_SIGNAL_VAL))
+               ieee80211_handle_beacon_sig(sdata, ifmgd, bss_conf,
+                                           local, rx_status);
  
        if (ifmgd->flags & IEEE80211_STA_CONNECTION_POLL) {
                mlme_dbg_ratelimited(sdata,
@@@ -4845,6 -4856,8 +4857,8 @@@ int ieee80211_mgd_assoc(struct ieee8021
  
        sdata->control_port_protocol = req->crypto.control_port_ethertype;
        sdata->control_port_no_encrypt = req->crypto.control_port_no_encrypt;
+       sdata->control_port_over_nl80211 =
+                                       req->crypto.control_port_over_nl80211;
        sdata->encrypt_headroom = ieee80211_cs_headroom(local, &req->crypto,
                                                        sdata->vif.type);
  
This page took 0.124364 seconds and 4 git commands to generate.