]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'mac80211-next-for-john-2014-08-29' of git://git.kernel.org/pub/scm/linux...
authorJohn W. Linville <linville@tuxdriver.com>
Thu, 4 Sep 2014 17:41:33 +0000 (13:41 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 4 Sep 2014 17:41:33 +0000 (13:41 -0400)
Johannes Berg <johannes@sipsolutions.net> says:

"Not that much content this time. Some RCU cleanups, crypto
performance improvements, and various patches all over,
rather than listing them one might as well look into the
git log instead."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Conflicts:
drivers/net/wireless/ath/wil6210/wmi.c

1  2 
drivers/net/wireless/ath/wil6210/wmi.c
drivers/net/wireless/mwifiex/cfg80211.c
net/mac80211/chan.c
net/wireless/core.c

index 1b64823544ebc9d10a0d4a052849d7aa0510832d,960b66fc14301d468f4f064ae85f52261fa02fa9..b1aaaee997d515c92beb08e14ac8bcb611547cc6
@@@ -1,5 -1,5 +1,5 @@@
  /*
 - * Copyright (c) 2012 Qualcomm Atheros, Inc.
 + * Copyright (c) 2012-2014 Qualcomm Atheros, Inc.
   *
   * Permission to use, copy, modify, and/or distribute this software for any
   * purpose with or without fee is hereby granted, provided that the above
@@@ -14,7 -14,6 +14,7 @@@
   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   */
  
 +#include <linux/moduleparam.h>
  #include <linux/etherdevice.h>
  #include <linux/if_arp.h>
  
  #include "wmi.h"
  #include "trace.h"
  
 +static uint max_assoc_sta = 1;
 +module_param(max_assoc_sta, uint, S_IRUGO | S_IWUSR);
 +MODULE_PARM_DESC(max_assoc_sta, " Max number of stations associated to the AP");
 +
  /**
   * WMI event receiving - theory of operations
   *
@@@ -351,11 -346,11 +351,11 @@@ static void wmi_evt_rx_mgmt(struct wil6
                                    rx_mgmt_frame->bssid);
                        cfg80211_put_bss(wiphy, bss);
                } else {
-                       wil_err(wil, "cfg80211_inform_bss() failed\n");
+                       wil_err(wil, "cfg80211_inform_bss_frame() failed\n");
                }
        } else {
                cfg80211_rx_mgmt(wil->wdev, freq, signal,
-                                (void *)rx_mgmt_frame, d_len, 0, GFP_ATOMIC);
+                                (void *)rx_mgmt_frame, d_len, 0);
        }
  }
  
@@@ -487,6 -482,33 +487,6 @@@ static void wmi_evt_disconnect(struct w
        mutex_unlock(&wil->mutex);
  }
  
 -static void wmi_evt_notify(struct wil6210_priv *wil, int id, void *d, int len)
 -{
 -      struct wmi_notify_req_done_event *evt = d;
 -
 -      if (len < sizeof(*evt)) {
 -              wil_err(wil, "Short NOTIFY event\n");
 -              return;
 -      }
 -
 -      wil->stats.tsf = le64_to_cpu(evt->tsf);
 -      wil->stats.snr = le32_to_cpu(evt->snr_val);
 -      wil->stats.bf_mcs = le16_to_cpu(evt->bf_mcs);
 -      wil->stats.my_rx_sector = le16_to_cpu(evt->my_rx_sector);
 -      wil->stats.my_tx_sector = le16_to_cpu(evt->my_tx_sector);
 -      wil->stats.peer_rx_sector = le16_to_cpu(evt->other_rx_sector);
 -      wil->stats.peer_tx_sector = le16_to_cpu(evt->other_tx_sector);
 -      wil_dbg_wmi(wil, "Link status, MCS %d TSF 0x%016llx\n"
 -                  "BF status 0x%08x SNR 0x%08x SQI %d%%\n"
 -                  "Tx Tpt %d goodput %d Rx goodput %d\n"
 -                  "Sectors(rx:tx) my %d:%d peer %d:%d\n",
 -                  wil->stats.bf_mcs, wil->stats.tsf, evt->status,
 -                  wil->stats.snr, evt->sqi, le32_to_cpu(evt->tx_tpt),
 -                  le32_to_cpu(evt->tx_goodput), le32_to_cpu(evt->rx_goodput),
 -                  wil->stats.my_rx_sector, wil->stats.my_tx_sector,
 -                  wil->stats.peer_rx_sector, wil->stats.peer_tx_sector);
 -}
 -
  /*
   * Firmware reports EAPOL frame using WME event.
   * Reconstruct Ethernet frame and deliver it via normal Rx
@@@ -629,6 -651,7 +629,6 @@@ static const struct 
        {WMI_SCAN_COMPLETE_EVENTID,     wmi_evt_scan_complete},
        {WMI_CONNECT_EVENTID,           wmi_evt_connect},
        {WMI_DISCONNECT_EVENTID,        wmi_evt_disconnect},
 -      {WMI_NOTIFY_REQ_DONE_EVENTID,   wmi_evt_notify},
        {WMI_EAPOL_RX_EVENTID,          wmi_evt_eapol_rx},
        {WMI_DATA_PORT_OPEN_EVENTID,    wmi_evt_linkup},
        {WMI_WBE_LINKDOWN_EVENTID,      wmi_evt_linkdown},
@@@ -799,7 -822,7 +799,7 @@@ int wmi_pcp_start(struct wil6210_priv *
                .network_type = wmi_nettype,
                .disable_sec_offload = 1,
                .channel = chan - 1,
 -              .pcp_max_assoc_sta = WIL6210_MAX_CID,
 +              .pcp_max_assoc_sta = max_assoc_sta,
        };
        struct {
                struct wil6210_mbox_hdr_wmi wmi;
        if (!wil->secure_pcp)
                cmd.disable_sec = 1;
  
 +      if ((cmd.pcp_max_assoc_sta > WIL6210_MAX_CID) ||
 +          (cmd.pcp_max_assoc_sta <= 0)) {
 +              wil_info(wil,
 +                       "Requested connection limit %u, valid values are 1 - %d. Setting to %d\n",
 +                       max_assoc_sta, WIL6210_MAX_CID, WIL6210_MAX_CID);
 +              cmd.pcp_max_assoc_sta = WIL6210_MAX_CID;
 +      }
 +
        /*
         * Processing time may be huge, in case of secure AP it takes about
         * 3500ms for FW to start AP
index 2856f0ecb8fc98f1906b0e4913ede484bebe981b,15f994f3b4cea8d8e2c2c7ea482c0517e335b4d3..c4723b0f5757eba4f1db0b6b3f98bf9f82e38a4a
@@@ -246,7 -246,7 +246,7 @@@ mwifiex_cfg80211_remain_on_channel(stru
        }
  
        if (priv->roc_cfg.cookie) {
 -              wiphy_dbg(wiphy, "info: ongoing ROC, cookie = 0x%llu\n",
 +              wiphy_dbg(wiphy, "info: ongoing ROC, cookie = 0x%llx\n",
                          priv->roc_cfg.cookie);
                return -EBUSY;
        }
@@@ -1557,6 -1557,7 +1557,7 @@@ static int mwifiex_cfg80211_inform_ibss
                                                       band));
  
        bss = cfg80211_inform_bss(priv->wdev->wiphy, chan,
+                                 CFG80211_BSS_FTYPE_UNKNOWN,
                                  bss_info.bssid, 0, WLAN_CAPABILITY_IBSS,
                                  0, ie_buf, ie_len, 0, GFP_KERNEL);
        cfg80211_put_bss(priv->wdev->wiphy, bss);
diff --combined net/mac80211/chan.c
index 0375009ddc0db39fd5a365db8cb5e4122219d864,bd01a9f041bd92f4969dd9abf324d73ab2497ea6..0da6f3a027e7e9cf18163238c4017972c31d246a
@@@ -547,12 -547,12 +547,12 @@@ static void ieee80211_recalc_chanctx_ch
  
                compat = cfg80211_chandef_compatible(
                                &sdata->vif.bss_conf.chandef, compat);
-               if (!compat)
+               if (WARN_ON_ONCE(!compat))
                        break;
        }
        rcu_read_unlock();
  
-       if (WARN_ON_ONCE(!compat))
+       if (!compat)
                return;
  
        ieee80211_change_chanctx(local, ctx, compat);
@@@ -637,41 -637,6 +637,6 @@@ out
        return ret;
  }
  
- static void __ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata)
- {
-       struct ieee80211_local *local = sdata->local;
-       struct ieee80211_chanctx_conf *conf;
-       struct ieee80211_chanctx *ctx;
-       bool use_reserved_switch = false;
-       lockdep_assert_held(&local->chanctx_mtx);
-       conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
-                                        lockdep_is_held(&local->chanctx_mtx));
-       if (!conf)
-               return;
-       ctx = container_of(conf, struct ieee80211_chanctx, conf);
-       if (sdata->reserved_chanctx) {
-               if (sdata->reserved_chanctx->replace_state ==
-                   IEEE80211_CHANCTX_REPLACES_OTHER &&
-                   ieee80211_chanctx_num_reserved(local,
-                                                  sdata->reserved_chanctx) > 1)
-                       use_reserved_switch = true;
-               ieee80211_vif_unreserve_chanctx(sdata);
-       }
-       ieee80211_assign_vif_chanctx(sdata, NULL);
-       if (ieee80211_chanctx_refcount(local, ctx) == 0)
-               ieee80211_free_chanctx(local, ctx);
-       /* Unreserving may ready an in-place reservation. */
-       if (use_reserved_switch)
-               ieee80211_vif_use_reserved_switch(local);
- }
  void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local,
                                   struct ieee80211_chanctx *chanctx)
  {
        drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RX_CHAINS);
  }
  
- int ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata,
-                             const struct cfg80211_chan_def *chandef,
-                             enum ieee80211_chanctx_mode mode)
- {
-       struct ieee80211_local *local = sdata->local;
-       struct ieee80211_chanctx *ctx;
-       u8 radar_detect_width = 0;
-       int ret;
-       lockdep_assert_held(&local->mtx);
-       WARN_ON(sdata->dev && netif_carrier_ok(sdata->dev));
-       mutex_lock(&local->chanctx_mtx);
-       ret = cfg80211_chandef_dfs_required(local->hw.wiphy,
-                                           chandef,
-                                           sdata->wdev.iftype);
-       if (ret < 0)
-               goto out;
-       if (ret > 0)
-               radar_detect_width = BIT(chandef->width);
-       sdata->radar_required = ret;
-       ret = ieee80211_check_combinations(sdata, chandef, mode,
-                                          radar_detect_width);
-       if (ret < 0)
-               goto out;
-       __ieee80211_vif_release_channel(sdata);
-       ctx = ieee80211_find_chanctx(local, chandef, mode);
-       if (!ctx)
-               ctx = ieee80211_new_chanctx(local, chandef, mode);
-       if (IS_ERR(ctx)) {
-               ret = PTR_ERR(ctx);
-               goto out;
-       }
-       sdata->vif.bss_conf.chandef = *chandef;
-       ret = ieee80211_assign_vif_chanctx(sdata, ctx);
-       if (ret) {
-               /* if assign fails refcount stays the same */
-               if (ieee80211_chanctx_refcount(local, ctx) == 0)
-                       ieee80211_free_chanctx(local, ctx);
-               goto out;
-       }
-       ieee80211_recalc_smps_chanctx(local, ctx);
-       ieee80211_recalc_radar_chanctx(local, ctx);
-  out:
-       mutex_unlock(&local->chanctx_mtx);
-       return ret;
- }
  static void
  __ieee80211_vif_copy_chanctx_to_vlans(struct ieee80211_sub_if_data *sdata,
                                      bool clear)
@@@ -1267,8 -1175,7 +1175,7 @@@ err
        return err;
  }
  
- int
- ieee80211_vif_use_reserved_switch(struct ieee80211_local *local)
+ static int ieee80211_vif_use_reserved_switch(struct ieee80211_local *local)
  {
        struct ieee80211_sub_if_data *sdata, *sdata_tmp;
        struct ieee80211_chanctx *ctx, *ctx_tmp, *old_ctx;
  
                        list_del(&sdata->reserved_chanctx_list);
                        list_move(&sdata->assigned_chanctx_list,
 -                                &new_ctx->assigned_vifs);
 +                                &ctx->assigned_vifs);
                        sdata->reserved_chanctx = NULL;
  
                        ieee80211_vif_chanctx_reservation_complete(sdata);
        return err;
  }
  
+ static void __ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata)
+ {
+       struct ieee80211_local *local = sdata->local;
+       struct ieee80211_chanctx_conf *conf;
+       struct ieee80211_chanctx *ctx;
+       bool use_reserved_switch = false;
+       lockdep_assert_held(&local->chanctx_mtx);
+       conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
+                                        lockdep_is_held(&local->chanctx_mtx));
+       if (!conf)
+               return;
+       ctx = container_of(conf, struct ieee80211_chanctx, conf);
+       if (sdata->reserved_chanctx) {
+               if (sdata->reserved_chanctx->replace_state ==
+                   IEEE80211_CHANCTX_REPLACES_OTHER &&
+                   ieee80211_chanctx_num_reserved(local,
+                                                  sdata->reserved_chanctx) > 1)
+                       use_reserved_switch = true;
+               ieee80211_vif_unreserve_chanctx(sdata);
+       }
+       ieee80211_assign_vif_chanctx(sdata, NULL);
+       if (ieee80211_chanctx_refcount(local, ctx) == 0)
+               ieee80211_free_chanctx(local, ctx);
+       /* Unreserving may ready an in-place reservation. */
+       if (use_reserved_switch)
+               ieee80211_vif_use_reserved_switch(local);
+ }
+ int ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata,
+                             const struct cfg80211_chan_def *chandef,
+                             enum ieee80211_chanctx_mode mode)
+ {
+       struct ieee80211_local *local = sdata->local;
+       struct ieee80211_chanctx *ctx;
+       u8 radar_detect_width = 0;
+       int ret;
+       lockdep_assert_held(&local->mtx);
+       WARN_ON(sdata->dev && netif_carrier_ok(sdata->dev));
+       mutex_lock(&local->chanctx_mtx);
+       ret = cfg80211_chandef_dfs_required(local->hw.wiphy,
+                                           chandef,
+                                           sdata->wdev.iftype);
+       if (ret < 0)
+               goto out;
+       if (ret > 0)
+               radar_detect_width = BIT(chandef->width);
+       sdata->radar_required = ret;
+       ret = ieee80211_check_combinations(sdata, chandef, mode,
+                                          radar_detect_width);
+       if (ret < 0)
+               goto out;
+       __ieee80211_vif_release_channel(sdata);
+       ctx = ieee80211_find_chanctx(local, chandef, mode);
+       if (!ctx)
+               ctx = ieee80211_new_chanctx(local, chandef, mode);
+       if (IS_ERR(ctx)) {
+               ret = PTR_ERR(ctx);
+               goto out;
+       }
+       sdata->vif.bss_conf.chandef = *chandef;
+       ret = ieee80211_assign_vif_chanctx(sdata, ctx);
+       if (ret) {
+               /* if assign fails refcount stays the same */
+               if (ieee80211_chanctx_refcount(local, ctx) == 0)
+                       ieee80211_free_chanctx(local, ctx);
+               goto out;
+       }
+       ieee80211_recalc_smps_chanctx(local, ctx);
+       ieee80211_recalc_radar_chanctx(local, ctx);
+  out:
+       mutex_unlock(&local->chanctx_mtx);
+       return ret;
+ }
  int ieee80211_vif_use_reserved_context(struct ieee80211_sub_if_data *sdata)
  {
        struct ieee80211_local *local = sdata->local;
diff --combined net/wireless/core.c
index 682babde4aa5b00a70c50a1574f1f2233a0ed77b,a207eb116829b47c3dc3c122eb12092b6b906f1e..c6620aa679e079bcf6693ac92cf4760435212081
@@@ -492,12 -492,6 +492,6 @@@ int wiphy_register(struct wiphy *wiphy
        int i;
        u16 ifmodes = wiphy->interface_modes;
  
-       /*
-        * There are major locking problems in nl80211/mac80211 for CSA,
-        * disable for all drivers until this has been reworked.
-        */
-       wiphy->flags &= ~WIPHY_FLAG_HAS_CHANNEL_SWITCH;
  #ifdef CONFIG_PM
        if (WARN_ON(wiphy->wowlan &&
                    (wiphy->wowlan->flags & WIPHY_WOWLAN_GTK_REKEY_FAILURE) &&
        if (IS_ERR(rdev->wiphy.debugfsdir))
                rdev->wiphy.debugfsdir = NULL;
  
 +      cfg80211_debugfs_rdev_add(rdev);
 +      nl80211_notify_wiphy(rdev, NL80211_CMD_NEW_WIPHY);
 +
        if (wiphy->regulatory_flags & REGULATORY_CUSTOM_REG) {
                struct regulatory_request request;
  
                nl80211_send_reg_change_event(&request);
        }
  
 -      cfg80211_debugfs_rdev_add(rdev);
 -
        rdev->wiphy.registered = true;
        rtnl_unlock();
  
                return res;
        }
  
 -      nl80211_notify_wiphy(rdev, NL80211_CMD_NEW_WIPHY);
 -
        return 0;
  }
  EXPORT_SYMBOL(wiphy_register);