aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-10-15 02:19:16 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-15 02:19:16 -0400
commitab55570d64d5409fa940e85dd8de2594b160f826 (patch)
tree4010f080f2631e046ee4b5dcb29c8df2cfb9ee7e
parenteef9d90dcde7bb4d029b67ed36457efc4970d5a2 (diff)
parent8713a7ccd88d93d9f8a72436088d6627c82490db (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
-rw-r--r--drivers/net/wireless/ath9k/main.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c2
-rw-r--r--drivers/net/wireless/libertas/cmd.c2
-rw-r--r--drivers/net/wireless/orinoco_cs.c5
-rw-r--r--drivers/net/wireless/p54/p54common.c1
-rw-r--r--drivers/net/wireless/p54/p54usb.c3
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c9
-rw-r--r--drivers/net/wireless/rtl8187_dev.c3
-rw-r--r--drivers/net/wireless/spectrum_cs.c5
-rw-r--r--include/net/mac80211.h3
-rw-r--r--net/mac80211/debugfs_netdev.c6
-rw-r--r--net/mac80211/debugfs_sta.c11
-rw-r--r--net/mac80211/ieee80211_i.h6
-rw-r--r--net/mac80211/mlme.c3
-rw-r--r--net/mac80211/scan.c3
-rw-r--r--net/mac80211/sta_info.c7
-rw-r--r--net/mac80211/sta_info.h1
-rw-r--r--net/mac80211/util.c8
-rw-r--r--net/mac80211/wext.c2
-rw-r--r--net/wireless/core.c5
21 files changed, 67 insertions, 32 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 74726990d59e..f05f584ab7bc 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -1640,6 +1640,11 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
1640 return ret; 1640 return ret;
1641} 1641}
1642 1642
1643static int ath9k_no_fragmentation(struct ieee80211_hw *hw, u32 value)
1644{
1645 return -EOPNOTSUPP;
1646}
1647
1643static struct ieee80211_ops ath9k_ops = { 1648static struct ieee80211_ops ath9k_ops = {
1644 .tx = ath9k_tx, 1649 .tx = ath9k_tx,
1645 .start = ath9k_start, 1650 .start = ath9k_start,
@@ -1664,7 +1669,8 @@ static struct ieee80211_ops ath9k_ops = {
1664 .get_tsf = ath9k_get_tsf, 1669 .get_tsf = ath9k_get_tsf,
1665 .reset_tsf = ath9k_reset_tsf, 1670 .reset_tsf = ath9k_reset_tsf,
1666 .tx_last_beacon = NULL, 1671 .tx_last_beacon = NULL,
1667 .ampdu_action = ath9k_ampdu_action 1672 .ampdu_action = ath9k_ampdu_action,
1673 .set_frag_threshold = ath9k_no_fragmentation,
1668}; 1674};
1669 1675
1670static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) 1676static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index f6003e7996af..5155b8a760a7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -833,12 +833,12 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
833 switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) { 833 switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) {
834 case CSR_HW_REV_TYPE_5100: 834 case CSR_HW_REV_TYPE_5100:
835 case CSR_HW_REV_TYPE_5300: 835 case CSR_HW_REV_TYPE_5300:
836 /* 5X00 wants in Celsius */ 836 case CSR_HW_REV_TYPE_5350:
837 /* 5X00 and 5350 wants in Celsius */
837 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD; 838 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
838 break; 839 break;
839 case CSR_HW_REV_TYPE_5150: 840 case CSR_HW_REV_TYPE_5150:
840 case CSR_HW_REV_TYPE_5350: 841 /* 5150 wants in Kelvin */
841 /* 5X50 wants in Kelvin */
842 priv->hw_params.ct_kill_threshold = 842 priv->hw_params.ct_kill_threshold =
843 CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD); 843 CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD);
844 break; 844 break;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 93944de923ca..e2a58e477036 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -2422,7 +2422,7 @@ static void rs_free_sta(void *priv_r, struct ieee80211_sta *sta,
2422 void *priv_sta) 2422 void *priv_sta)
2423{ 2423{
2424 struct iwl_lq_sta *lq_sta = priv_sta; 2424 struct iwl_lq_sta *lq_sta = priv_sta;
2425 struct iwl_priv *priv = priv_r; 2425 struct iwl_priv *priv __maybe_unused = priv_r;
2426 2426
2427 IWL_DEBUG_RATE("enter\n"); 2427 IWL_DEBUG_RATE("enter\n");
2428 kfree(lq_sta); 2428 kfree(lq_sta);
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index a912fb68c099..297696de2da0 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -823,7 +823,9 @@ int lbs_update_channel(struct lbs_private *priv)
823int lbs_set_channel(struct lbs_private *priv, u8 channel) 823int lbs_set_channel(struct lbs_private *priv, u8 channel)
824{ 824{
825 struct cmd_ds_802_11_rf_channel cmd; 825 struct cmd_ds_802_11_rf_channel cmd;
826#ifdef DEBUG
826 u8 old_channel = priv->curbssparams.channel; 827 u8 old_channel = priv->curbssparams.channel;
828#endif
827 int ret = 0; 829 int ret = 0;
828 830
829 lbs_deb_enter(LBS_DEB_CMD); 831 lbs_deb_enter(LBS_DEB_CMD);
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index 9eaa252c2430..65fd054e0172 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -403,6 +403,7 @@ static int orinoco_cs_resume(struct pcmcia_device *link)
403 struct orinoco_private *priv = netdev_priv(dev); 403 struct orinoco_private *priv = netdev_priv(dev);
404 struct orinoco_pccard *card = priv->card; 404 struct orinoco_pccard *card = priv->card;
405 int err = 0; 405 int err = 0;
406 unsigned long flags;
406 407
407 if (! test_bit(0, &card->hard_reset_in_progress)) { 408 if (! test_bit(0, &card->hard_reset_in_progress)) {
408 err = orinoco_reinit_firmware(dev); 409 err = orinoco_reinit_firmware(dev);
@@ -412,7 +413,7 @@ static int orinoco_cs_resume(struct pcmcia_device *link)
412 return -EIO; 413 return -EIO;
413 } 414 }
414 415
415 spin_lock(&priv->lock); 416 spin_lock_irqsave(&priv->lock, flags);
416 417
417 netif_device_attach(dev); 418 netif_device_attach(dev);
418 priv->hw_unavailable--; 419 priv->hw_unavailable--;
@@ -424,7 +425,7 @@ static int orinoco_cs_resume(struct pcmcia_device *link)
424 dev->name, err); 425 dev->name, err);
425 } 426 }
426 427
427 spin_unlock(&priv->lock); 428 spin_unlock_irqrestore(&priv->lock, flags);
428 } 429 }
429 430
430 return err; 431 return err;
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index 1994aa199d37..117c7d3a52b0 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -479,7 +479,6 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
479 printk(KERN_ERR "p54: eeprom parse failed!\n"); 479 printk(KERN_ERR "p54: eeprom parse failed!\n");
480 return err; 480 return err;
481} 481}
482EXPORT_SYMBOL_GPL(p54_parse_eeprom);
483 482
484static int p54_rssi_to_dbm(struct ieee80211_hw *dev, int rssi) 483static int p54_rssi_to_dbm(struct ieee80211_hw *dev, int rssi)
485{ 484{
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index 1912f5e9a0a9..75d749bccb0d 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -39,6 +39,7 @@ static struct usb_device_id p54u_table[] __devinitdata = {
39 {USB_DEVICE(0x0846, 0x4200)}, /* Netgear WG121 */ 39 {USB_DEVICE(0x0846, 0x4200)}, /* Netgear WG121 */
40 {USB_DEVICE(0x0846, 0x4210)}, /* Netgear WG121 the second ? */ 40 {USB_DEVICE(0x0846, 0x4210)}, /* Netgear WG121 the second ? */
41 {USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */ 41 {USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */
42 {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */
42 {USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */ 43 {USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */
43 {USB_DEVICE(0x124a, 0x4023)}, /* Shuttle PN15, Airvast WM168g, IOGear GWU513 */ 44 {USB_DEVICE(0x124a, 0x4023)}, /* Shuttle PN15, Airvast WM168g, IOGear GWU513 */
44 {USB_DEVICE(0x1915, 0x2234)}, /* Linksys WUSB54G OEM */ 45 {USB_DEVICE(0x1915, 0x2234)}, /* Linksys WUSB54G OEM */
@@ -63,8 +64,8 @@ static struct usb_device_id p54u_table[] __devinitdata = {
63 {USB_DEVICE(0x0cde, 0x0006)}, /* Medion MD40900 */ 64 {USB_DEVICE(0x0cde, 0x0006)}, /* Medion MD40900 */
64 {USB_DEVICE(0x0cde, 0x0008)}, /* Sagem XG703A */ 65 {USB_DEVICE(0x0cde, 0x0008)}, /* Sagem XG703A */
65 {USB_DEVICE(0x0d8e, 0x3762)}, /* DLink DWL-G120 Cohiba */ 66 {USB_DEVICE(0x0d8e, 0x3762)}, /* DLink DWL-G120 Cohiba */
66 {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */
67 {USB_DEVICE(0x124a, 0x4025)}, /* IOGear GWU513 (GW3887IK chip) */ 67 {USB_DEVICE(0x124a, 0x4025)}, /* IOGear GWU513 (GW3887IK chip) */
68 {USB_DEVICE(0x1260, 0xee22)}, /* SMC 2862W-G version 2 */
68 {USB_DEVICE(0x13b1, 0x000a)}, /* Linksys WUSB54G ver 2 */ 69 {USB_DEVICE(0x13b1, 0x000a)}, /* Linksys WUSB54G ver 2 */
69 {USB_DEVICE(0x13B1, 0x000C)}, /* Linksys WUSB54AG */ 70 {USB_DEVICE(0x13B1, 0x000C)}, /* Linksys WUSB54AG */
70 {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ 71 {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 1676ac484790..451d410ecdae 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -374,7 +374,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb)
374 struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX); 374 struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX);
375 struct txentry_desc txdesc; 375 struct txentry_desc txdesc;
376 struct skb_frame_desc *skbdesc; 376 struct skb_frame_desc *skbdesc;
377 unsigned int iv_len; 377 unsigned int iv_len = 0;
378 378
379 if (unlikely(rt2x00queue_full(queue))) 379 if (unlikely(rt2x00queue_full(queue)))
380 return -EINVAL; 380 return -EINVAL;
@@ -395,6 +395,9 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb)
395 entry->skb = skb; 395 entry->skb = skb;
396 rt2x00queue_create_tx_descriptor(entry, &txdesc); 396 rt2x00queue_create_tx_descriptor(entry, &txdesc);
397 397
398 if (IEEE80211_SKB_CB(skb)->control.hw_key != NULL)
399 iv_len = IEEE80211_SKB_CB(skb)->control.hw_key->iv_len;
400
398 /* 401 /*
399 * All information is retreived from the skb->cb array, 402 * All information is retreived from the skb->cb array,
400 * now we should claim ownership of the driver part of that 403 * now we should claim ownership of the driver part of that
@@ -410,9 +413,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb)
410 * the frame so we can provide it to the driver seperately. 413 * the frame so we can provide it to the driver seperately.
411 */ 414 */
412 if (test_bit(ENTRY_TXD_ENCRYPT, &txdesc.flags) && 415 if (test_bit(ENTRY_TXD_ENCRYPT, &txdesc.flags) &&
413 !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc.flags) && 416 !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc.flags)) {
414 (IEEE80211_SKB_CB(skb)->control.hw_key != NULL)) {
415 iv_len = IEEE80211_SKB_CB(skb)->control.hw_key->iv_len;
416 rt2x00crypto_tx_remove_iv(skb, iv_len); 417 rt2x00crypto_tx_remove_iv(skb, iv_len);
417 } 418 }
418 419
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index e9902613e2ee..431e3c78bf27 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -33,10 +33,13 @@ MODULE_LICENSE("GPL");
33static struct usb_device_id rtl8187_table[] __devinitdata = { 33static struct usb_device_id rtl8187_table[] __devinitdata = {
34 /* Asus */ 34 /* Asus */
35 {USB_DEVICE(0x0b05, 0x171d), .driver_info = DEVICE_RTL8187}, 35 {USB_DEVICE(0x0b05, 0x171d), .driver_info = DEVICE_RTL8187},
36 /* Belkin */
37 {USB_DEVICE(0x050d, 0x705e), .driver_info = DEVICE_RTL8187B},
36 /* Realtek */ 38 /* Realtek */
37 {USB_DEVICE(0x0bda, 0x8187), .driver_info = DEVICE_RTL8187}, 39 {USB_DEVICE(0x0bda, 0x8187), .driver_info = DEVICE_RTL8187},
38 {USB_DEVICE(0x0bda, 0x8189), .driver_info = DEVICE_RTL8187B}, 40 {USB_DEVICE(0x0bda, 0x8189), .driver_info = DEVICE_RTL8187B},
39 {USB_DEVICE(0x0bda, 0x8197), .driver_info = DEVICE_RTL8187B}, 41 {USB_DEVICE(0x0bda, 0x8197), .driver_info = DEVICE_RTL8187B},
42 {USB_DEVICE(0x0bda, 0x8198), .driver_info = DEVICE_RTL8187B},
40 /* Netgear */ 43 /* Netgear */
41 {USB_DEVICE(0x0846, 0x6100), .driver_info = DEVICE_RTL8187}, 44 {USB_DEVICE(0x0846, 0x6100), .driver_info = DEVICE_RTL8187},
42 {USB_DEVICE(0x0846, 0x6a00), .driver_info = DEVICE_RTL8187}, 45 {USB_DEVICE(0x0846, 0x6a00), .driver_info = DEVICE_RTL8187},
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c
index 67b26d3c3cd5..f5513cd4db35 100644
--- a/drivers/net/wireless/spectrum_cs.c
+++ b/drivers/net/wireless/spectrum_cs.c
@@ -450,10 +450,11 @@ spectrum_cs_suspend(struct pcmcia_device *link)
450{ 450{
451 struct net_device *dev = link->priv; 451 struct net_device *dev = link->priv;
452 struct orinoco_private *priv = netdev_priv(dev); 452 struct orinoco_private *priv = netdev_priv(dev);
453 unsigned long flags;
453 int err = 0; 454 int err = 0;
454 455
455 /* Mark the device as stopped, to block IO until later */ 456 /* Mark the device as stopped, to block IO until later */
456 spin_lock(&priv->lock); 457 spin_lock_irqsave(&priv->lock, flags);
457 458
458 err = __orinoco_down(dev); 459 err = __orinoco_down(dev);
459 if (err) 460 if (err)
@@ -463,7 +464,7 @@ spectrum_cs_suspend(struct pcmcia_device *link)
463 netif_device_detach(dev); 464 netif_device_detach(dev);
464 priv->hw_unavailable++; 465 priv->hw_unavailable++;
465 466
466 spin_unlock(&priv->lock); 467 spin_unlock_irqrestore(&priv->lock, flags);
467 468
468 return err; 469 return err;
469} 470}
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5617a1613c91..d861197f83c7 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -645,7 +645,8 @@ enum ieee80211_key_flags {
645 * - Temporal Encryption Key (128 bits) 645 * - Temporal Encryption Key (128 bits)
646 * - Temporal Authenticator Tx MIC Key (64 bits) 646 * - Temporal Authenticator Tx MIC Key (64 bits)
647 * - Temporal Authenticator Rx MIC Key (64 bits) 647 * - Temporal Authenticator Rx MIC Key (64 bits)
648 * 648 * @icv_len: FIXME
649 * @iv_len: FIXME
649 */ 650 */
650struct ieee80211_key_conf { 651struct ieee80211_key_conf {
651 enum ieee80211_key_alg alg; 652 enum ieee80211_key_alg alg;
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 2a4515623776..2ad504fc3414 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -545,8 +545,12 @@ static int netdev_notify(struct notifier_block *nb,
545 545
546 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 546 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
547 547
548 sprintf(buf, "netdev:%s", dev->name);
549 dir = sdata->debugfsdir; 548 dir = sdata->debugfsdir;
549
550 if (!dir)
551 return 0;
552
553 sprintf(buf, "netdev:%s", dev->name);
550 if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf)) 554 if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
551 printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs " 555 printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
552 "dir to %s\n", buf); 556 "dir to %s\n", buf);
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index b9902e425f09..189d0bafa91a 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -249,11 +249,22 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
249 DECLARE_MAC_BUF(mbuf); 249 DECLARE_MAC_BUF(mbuf);
250 u8 *mac; 250 u8 *mac;
251 251
252 sta->debugfs.add_has_run = true;
253
252 if (!stations_dir) 254 if (!stations_dir)
253 return; 255 return;
254 256
255 mac = print_mac(mbuf, sta->sta.addr); 257 mac = print_mac(mbuf, sta->sta.addr);
256 258
259 /*
260 * This might fail due to a race condition:
261 * When mac80211 unlinks a station, the debugfs entries
262 * remain, but it is already possible to link a new
263 * station with the same address which triggers adding
264 * it to debugfs; therefore, if the old station isn't
265 * destroyed quickly enough the old station's debugfs
266 * dir might still be around.
267 */
257 sta->debugfs.dir = debugfs_create_dir(mac, stations_dir); 268 sta->debugfs.dir = debugfs_create_dir(mac, stations_dir);
258 if (!sta->debugfs.dir) 269 if (!sta->debugfs.dir)
259 return; 270 return;
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 8025b294588b..156e42a003ae 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -816,8 +816,8 @@ struct ieee802_11_elems {
816 u8 *ext_supp_rates; 816 u8 *ext_supp_rates;
817 u8 *wmm_info; 817 u8 *wmm_info;
818 u8 *wmm_param; 818 u8 *wmm_param;
819 u8 *ht_cap_elem; 819 struct ieee80211_ht_cap *ht_cap_elem;
820 u8 *ht_info_elem; 820 struct ieee80211_ht_addt_info *ht_info_elem;
821 u8 *mesh_config; 821 u8 *mesh_config;
822 u8 *mesh_id; 822 u8 *mesh_id;
823 u8 *peer_link; 823 u8 *peer_link;
@@ -844,8 +844,6 @@ struct ieee802_11_elems {
844 u8 ext_supp_rates_len; 844 u8 ext_supp_rates_len;
845 u8 wmm_info_len; 845 u8 wmm_info_len;
846 u8 wmm_param_len; 846 u8 wmm_param_len;
847 u8 ht_cap_elem_len;
848 u8 ht_info_elem_len;
849 u8 mesh_config_len; 847 u8 mesh_config_len;
850 u8 mesh_id_len; 848 u8 mesh_id_len;
851 u8 peer_link_len; 849 u8 peer_link_len;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 49f86fa56bff..87665d7bb4f9 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1348,10 +1348,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
1348 (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { 1348 (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) {
1349 struct ieee80211_ht_bss_info bss_info; 1349 struct ieee80211_ht_bss_info bss_info;
1350 ieee80211_ht_cap_ie_to_ht_info( 1350 ieee80211_ht_cap_ie_to_ht_info(
1351 (struct ieee80211_ht_cap *)
1352 elems.ht_cap_elem, &sta->sta.ht_info); 1351 elems.ht_cap_elem, &sta->sta.ht_info);
1353 ieee80211_ht_addt_info_ie_to_ht_bss_info( 1352 ieee80211_ht_addt_info_ie_to_ht_bss_info(
1354 (struct ieee80211_ht_addt_info *)
1355 elems.ht_info_elem, &bss_info); 1353 elems.ht_info_elem, &bss_info);
1356 ieee80211_handle_ht(local, 1, &sta->sta.ht_info, &bss_info); 1354 ieee80211_handle_ht(local, 1, &sta->sta.ht_info, &bss_info);
1357 } 1355 }
@@ -1709,7 +1707,6 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
1709 struct ieee80211_ht_bss_info bss_info; 1707 struct ieee80211_ht_bss_info bss_info;
1710 1708
1711 ieee80211_ht_addt_info_ie_to_ht_bss_info( 1709 ieee80211_ht_addt_info_ie_to_ht_bss_info(
1712 (struct ieee80211_ht_addt_info *)
1713 elems.ht_info_elem, &bss_info); 1710 elems.ht_info_elem, &bss_info);
1714 changed |= ieee80211_handle_ht(local, 1, &conf->ht_conf, 1711 changed |= ieee80211_handle_ht(local, 1, &conf->ht_conf,
1715 &bss_info); 1712 &bss_info);
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 8e6685e7ae85..416bb41099f3 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -388,7 +388,8 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
388 bss = ieee80211_bss_info_update(sdata->local, rx_status, 388 bss = ieee80211_bss_info_update(sdata->local, rx_status,
389 mgmt, skb->len, &elems, 389 mgmt, skb->len, &elems,
390 freq, beacon); 390 freq, beacon);
391 ieee80211_rx_bss_put(sdata->local, bss); 391 if (bss)
392 ieee80211_rx_bss_put(sdata->local, bss);
392 393
393 dev_kfree_skb(skb); 394 dev_kfree_skb(skb);
394 return RX_QUEUED; 395 return RX_QUEUED;
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 9b72d15bc8dc..7fef8ea1f5ec 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -635,7 +635,12 @@ static void sta_info_debugfs_add_work(struct work_struct *work)
635 635
636 spin_lock_irqsave(&local->sta_lock, flags); 636 spin_lock_irqsave(&local->sta_lock, flags);
637 list_for_each_entry(tmp, &local->sta_list, list) { 637 list_for_each_entry(tmp, &local->sta_list, list) {
638 if (!tmp->debugfs.dir) { 638 /*
639 * debugfs.add_has_run will be set by
640 * ieee80211_sta_debugfs_add regardless
641 * of what else it does.
642 */
643 if (!tmp->debugfs.add_has_run) {
639 sta = tmp; 644 sta = tmp;
640 __sta_info_pin(sta); 645 __sta_info_pin(sta);
641 break; 646 break;
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index a6b51862a89d..168a39a298bd 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -300,6 +300,7 @@ struct sta_info {
300 struct dentry *inactive_ms; 300 struct dentry *inactive_ms;
301 struct dentry *last_seq_ctrl; 301 struct dentry *last_seq_ctrl;
302 struct dentry *agg_status; 302 struct dentry *agg_status;
303 bool add_has_run;
303 } debugfs; 304 } debugfs;
304#endif 305#endif
305 306
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index f32561ec224c..cee4884b9d06 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -529,12 +529,12 @@ void ieee802_11_parse_elems(u8 *start, size_t len,
529 elems->ext_supp_rates_len = elen; 529 elems->ext_supp_rates_len = elen;
530 break; 530 break;
531 case WLAN_EID_HT_CAPABILITY: 531 case WLAN_EID_HT_CAPABILITY:
532 elems->ht_cap_elem = pos; 532 if (elen >= sizeof(struct ieee80211_ht_cap))
533 elems->ht_cap_elem_len = elen; 533 elems->ht_cap_elem = (void *)pos;
534 break; 534 break;
535 case WLAN_EID_HT_EXTRA_INFO: 535 case WLAN_EID_HT_EXTRA_INFO:
536 elems->ht_info_elem = pos; 536 if (elen >= sizeof(struct ieee80211_ht_addt_info))
537 elems->ht_info_elem_len = elen; 537 elems->ht_info_elem = (void *)pos;
538 break; 538 break;
539 case WLAN_EID_MESH_ID: 539 case WLAN_EID_MESH_ID:
540 elems->mesh_id = pos; 540 elems->mesh_id = pos;
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 7e0d53abde24..742f811ca416 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -775,7 +775,7 @@ static int ieee80211_ioctl_siwfrag(struct net_device *dev,
775 * configure it here */ 775 * configure it here */
776 776
777 if (local->ops->set_frag_threshold) 777 if (local->ops->set_frag_threshold)
778 local->ops->set_frag_threshold( 778 return local->ops->set_frag_threshold(
779 local_to_hw(local), 779 local_to_hw(local),
780 local->fragmentation_threshold); 780 local->fragmentation_threshold);
781 781
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 24fdd4cd22cb..5031db7b275b 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -184,7 +184,8 @@ int cfg80211_dev_rename(struct cfg80211_registered_device *rdev,
184 if (result) 184 if (result)
185 goto out_unlock; 185 goto out_unlock;
186 186
187 if (!debugfs_rename(rdev->wiphy.debugfsdir->d_parent, 187 if (rdev->wiphy.debugfsdir &&
188 !debugfs_rename(rdev->wiphy.debugfsdir->d_parent,
188 rdev->wiphy.debugfsdir, 189 rdev->wiphy.debugfsdir,
189 rdev->wiphy.debugfsdir->d_parent, 190 rdev->wiphy.debugfsdir->d_parent,
190 newname)) 191 newname))
@@ -317,6 +318,8 @@ int wiphy_register(struct wiphy *wiphy)
317 drv->wiphy.debugfsdir = 318 drv->wiphy.debugfsdir =
318 debugfs_create_dir(wiphy_name(&drv->wiphy), 319 debugfs_create_dir(wiphy_name(&drv->wiphy),
319 ieee80211_debugfs_dir); 320 ieee80211_debugfs_dir);
321 if (IS_ERR(drv->wiphy.debugfsdir))
322 drv->wiphy.debugfsdir = NULL;
320 323
321 res = 0; 324 res = 0;
322out_unlock: 325out_unlock: