]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/mwifiex/cfg80211.c
cfg80211: Convert del_station() callback to use a param struct
[karo-tx-linux.git] / drivers / net / wireless / mwifiex / cfg80211.c
index c4723b0f5757eba4f1db0b6b3f98bf9f82e38a4a..71e29c7055de3d29a00559861d391a1700a54536 100644 (file)
@@ -1239,7 +1239,7 @@ static int mwifiex_cfg80211_change_beacon(struct wiphy *wiphy,
  */
 static int
 mwifiex_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
-                            const u8 *mac)
+                            struct station_del_parameters *params)
 {
        struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
        struct mwifiex_sta_node *sta_node;
@@ -1248,7 +1248,7 @@ mwifiex_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
        if (list_empty(&priv->sta_list) || !priv->bss_started)
                return 0;
 
-       if (!mac || is_broadcast_ether_addr(mac)) {
+       if (!params->mac || is_broadcast_ether_addr(params->mac)) {
                wiphy_dbg(wiphy, "%s: NULL/broadcast mac address\n", __func__);
                list_for_each_entry(sta_node, &priv->sta_list, list) {
                        if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_STA_DEAUTH,
@@ -1258,9 +1258,10 @@ mwifiex_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
                        mwifiex_uap_del_sta_data(priv, sta_node);
                }
        } else {
-               wiphy_dbg(wiphy, "%s: mac address %pM\n", __func__, mac);
+               wiphy_dbg(wiphy, "%s: mac address %pM\n", __func__,
+                         params->mac);
                spin_lock_irqsave(&priv->sta_list_spinlock, flags);
-               sta_node = mwifiex_get_sta_entry(priv, mac);
+               sta_node = mwifiex_get_sta_entry(priv, params->mac);
                spin_unlock_irqrestore(&priv->sta_list_spinlock, flags);
                if (sta_node) {
                        if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_STA_DEAUTH,
@@ -1936,13 +1937,6 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
 
        wiphy_dbg(wiphy, "info: received scan request on %s\n", dev->name);
 
-       if ((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) &&
-           atomic_read(&priv->wmm.tx_pkts_queued) >=
-           MWIFIEX_MIN_TX_PENDING_TO_CANCEL_SCAN) {
-               dev_dbg(priv->adapter->dev, "scan rejected due to traffic\n");
-               return -EBUSY;
-       }
-
        /* Block scan request if scan operation or scan cleanup when interface
         * is disabled is in process
         */
@@ -1981,7 +1975,7 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
                user_scan_cfg->chan_list[i].chan_number = chan->hw_value;
                user_scan_cfg->chan_list[i].radio_type = chan->band;
 
-               if (chan->flags & IEEE80211_CHAN_NO_IR)
+               if ((chan->flags & IEEE80211_CHAN_NO_IR) || !request->n_ssids)
                        user_scan_cfg->chan_list[i].scan_type =
                                                MWIFIEX_SCAN_TYPE_PASSIVE;
                else
@@ -1991,6 +1985,11 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
                user_scan_cfg->chan_list[i].scan_time = 0;
        }
 
+       if (priv->adapter->scan_chan_gap_enabled &&
+           mwifiex_is_any_intf_active(priv))
+               user_scan_cfg->scan_chan_gap =
+                                             priv->adapter->scan_chan_gap_time;
+
        ret = mwifiex_scan_networks(priv, user_scan_cfg);
        kfree(user_scan_cfg);
        if (ret) {
@@ -2915,7 +2914,6 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
 
        wiphy->features |= NL80211_FEATURE_HT_IBSS |
                           NL80211_FEATURE_INACTIVITY_TIMER |
-                          NL80211_FEATURE_LOW_PRIORITY_SCAN |
                           NL80211_FEATURE_NEED_OBSS_SCAN;
 
        /* Reserve space for mwifiex specific private data for BSS */