Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[cascardo/linux.git] / drivers / net / wireless / libertas / cfg.c
index 5046a00..698a1f7 100644 (file)
@@ -9,8 +9,6 @@
 #include <linux/sched.h>
 #include <linux/wait.h>
 #include <linux/slab.h>
-#include <linux/sched.h>
-#include <linux/wait.h>
 #include <linux/ieee80211.h>
 #include <net/cfg80211.h>
 #include <asm/unaligned.h>
@@ -619,7 +617,7 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
                                     print_ssid(ssid_buf, ssid, ssid_len),
                                     LBS_SCAN_RSSI_TO_MBM(rssi)/100);
 
-                       if (channel ||
+                       if (channel &&
                            !(channel->flags & IEEE80211_CHAN_DISABLED))
                                cfg80211_inform_bss(wiphy, channel,
                                        bssid, le64_to_cpu(*(__le64 *)tsfdesc),
@@ -700,8 +698,9 @@ static void lbs_scan_worker(struct work_struct *work)
 
        if (priv->scan_channel < priv->scan_req->n_channels) {
                cancel_delayed_work(&priv->scan_work);
-               queue_delayed_work(priv->work_thread, &priv->scan_work,
-                       msecs_to_jiffies(300));
+               if (!priv->stopping)
+                       queue_delayed_work(priv->work_thread, &priv->scan_work,
+                               msecs_to_jiffies(300));
        }
 
        /* This is the final data we are about to send */
@@ -1423,7 +1422,8 @@ static int lbs_cfg_disconnect(struct wiphy *wiphy, struct net_device *dev,
 
 static int lbs_cfg_set_default_key(struct wiphy *wiphy,
                                   struct net_device *netdev,
-                                  u8 key_index)
+                                  u8 key_index, bool unicast,
+                                  bool multicast)
 {
        struct lbs_private *priv = wiphy_priv(wiphy);
 
@@ -2061,7 +2061,7 @@ static void lbs_cfg_set_regulatory_hint(struct lbs_private *priv)
        };
 
        /* Section 5.17.2 */
-       static struct region_code_mapping regmap[] = {
+       static const struct region_code_mapping regmap[] = {
                {"US ", 0x10}, /* US FCC */
                {"CA ", 0x20}, /* Canada */
                {"EU ", 0x30}, /* ETSI   */