diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-02-18 14:16:12 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-18 14:16:12 -0500 |
commit | e9b89fcc1f42fa6d19ecaae8cd8d86e49fa4cd38 (patch) | |
tree | d77b0c7f1f8890fb75098c550277fe9b81c340b3 /drivers | |
parent | 36eed56a8f7e1bd7fb5014ea0e702708e1702f30 (diff) | |
parent | 9e97d14b4923da524d202f2e005d5d30b70db9d6 (diff) |
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next
Diffstat (limited to 'drivers')
66 files changed, 510 insertions, 432 deletions
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h index 16c1dddfda00..9cb929dc3397 100644 --- a/drivers/bcma/bcma_private.h +++ b/drivers/bcma/bcma_private.h | |||
@@ -97,11 +97,16 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc); | |||
97 | #ifdef CONFIG_BCMA_DRIVER_GPIO | 97 | #ifdef CONFIG_BCMA_DRIVER_GPIO |
98 | /* driver_gpio.c */ | 98 | /* driver_gpio.c */ |
99 | int bcma_gpio_init(struct bcma_drv_cc *cc); | 99 | int bcma_gpio_init(struct bcma_drv_cc *cc); |
100 | int bcma_gpio_unregister(struct bcma_drv_cc *cc); | ||
100 | #else | 101 | #else |
101 | static inline int bcma_gpio_init(struct bcma_drv_cc *cc) | 102 | static inline int bcma_gpio_init(struct bcma_drv_cc *cc) |
102 | { | 103 | { |
103 | return -ENOTSUPP; | 104 | return -ENOTSUPP; |
104 | } | 105 | } |
106 | static inline int bcma_gpio_unregister(struct bcma_drv_cc *cc) | ||
107 | { | ||
108 | return 0; | ||
109 | } | ||
105 | #endif /* CONFIG_BCMA_DRIVER_GPIO */ | 110 | #endif /* CONFIG_BCMA_DRIVER_GPIO */ |
106 | 111 | ||
107 | #endif | 112 | #endif |
diff --git a/drivers/bcma/driver_chipcommon_nflash.c b/drivers/bcma/driver_chipcommon_nflash.c index 19fafcf78840..d4f699aef8c4 100644 --- a/drivers/bcma/driver_chipcommon_nflash.c +++ b/drivers/bcma/driver_chipcommon_nflash.c | |||
@@ -21,7 +21,7 @@ int bcma_nflash_init(struct bcma_drv_cc *cc) | |||
21 | struct bcma_bus *bus = cc->core->bus; | 21 | struct bcma_bus *bus = cc->core->bus; |
22 | 22 | ||
23 | if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4706 && | 23 | if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4706 && |
24 | cc->core->id.rev != 0x38) { | 24 | cc->core->id.rev != 38) { |
25 | bcma_err(bus, "NAND flash on unsupported board!\n"); | 25 | bcma_err(bus, "NAND flash on unsupported board!\n"); |
26 | return -ENOTSUPP; | 26 | return -ENOTSUPP; |
27 | } | 27 | } |
diff --git a/drivers/bcma/driver_gpio.c b/drivers/bcma/driver_gpio.c index 0b5df538dfd9..45f0996a3752 100644 --- a/drivers/bcma/driver_gpio.c +++ b/drivers/bcma/driver_gpio.c | |||
@@ -107,3 +107,8 @@ int bcma_gpio_init(struct bcma_drv_cc *cc) | |||
107 | 107 | ||
108 | return gpiochip_add(chip); | 108 | return gpiochip_add(chip); |
109 | } | 109 | } |
110 | |||
111 | int bcma_gpio_unregister(struct bcma_drv_cc *cc) | ||
112 | { | ||
113 | return gpiochip_remove(&cc->gpio); | ||
114 | } | ||
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 95ba5756c67e..360c41f2b509 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c | |||
@@ -276,6 +276,13 @@ int __devinit bcma_bus_register(struct bcma_bus *bus) | |||
276 | void bcma_bus_unregister(struct bcma_bus *bus) | 276 | void bcma_bus_unregister(struct bcma_bus *bus) |
277 | { | 277 | { |
278 | struct bcma_device *cores[3]; | 278 | struct bcma_device *cores[3]; |
279 | int err; | ||
280 | |||
281 | err = bcma_gpio_unregister(&bus->drv_cc); | ||
282 | if (err == -EBUSY) | ||
283 | bcma_err(bus, "Some GPIOs are still in use.\n"); | ||
284 | else if (err) | ||
285 | bcma_err(bus, "Can not unregister GPIO driver: %i\n", err); | ||
279 | 286 | ||
280 | cores[0] = bcma_find_core(bus, BCMA_CORE_MIPS_74K); | 287 | cores[0] = bcma_find_core(bus, BCMA_CORE_MIPS_74K); |
281 | cores[1] = bcma_find_core(bus, BCMA_CORE_PCIE); | 288 | cores[1] = bcma_find_core(bus, BCMA_CORE_PCIE); |
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 259c43332fb8..752ffc4f4166 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -427,6 +427,30 @@ static bool ath6kl_is_tx_pending(struct ath6kl *ar) | |||
427 | return ar->tx_pending[ath6kl_wmi_get_control_ep(ar->wmi)] == 0; | 427 | return ar->tx_pending[ath6kl_wmi_get_control_ep(ar->wmi)] == 0; |
428 | } | 428 | } |
429 | 429 | ||
430 | static void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif, | ||
431 | bool enable) | ||
432 | { | ||
433 | int err; | ||
434 | |||
435 | if (WARN_ON(!test_bit(WMI_READY, &vif->ar->flag))) | ||
436 | return; | ||
437 | |||
438 | if (vif->nw_type != INFRA_NETWORK) | ||
439 | return; | ||
440 | |||
441 | if (!test_bit(ATH6KL_FW_CAPABILITY_BMISS_ENHANCE, | ||
442 | vif->ar->fw_capabilities)) | ||
443 | return; | ||
444 | |||
445 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s fw bmiss enhance\n", | ||
446 | enable ? "enable" : "disable"); | ||
447 | |||
448 | err = ath6kl_wmi_sta_bmiss_enhance_cmd(vif->ar->wmi, | ||
449 | vif->fw_vif_idx, enable); | ||
450 | if (err) | ||
451 | ath6kl_err("failed to %s enhanced bmiss detection: %d\n", | ||
452 | enable ? "enable" : "disable", err); | ||
453 | } | ||
430 | 454 | ||
431 | static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | 455 | static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, |
432 | struct cfg80211_connect_params *sme) | 456 | struct cfg80211_connect_params *sme) |
@@ -616,13 +640,13 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
616 | vif->req_bssid, vif->ch_hint, | 640 | vif->req_bssid, vif->ch_hint, |
617 | ar->connect_ctrl_flags, nw_subtype); | 641 | ar->connect_ctrl_flags, nw_subtype); |
618 | 642 | ||
619 | /* disable background scan if period is 0 */ | 643 | if (sme->bg_scan_period == 0) { |
620 | if (sme->bg_scan_period == 0) | 644 | /* disable background scan if period is 0 */ |
621 | sme->bg_scan_period = 0xffff; | 645 | sme->bg_scan_period = 0xffff; |
622 | 646 | } else if (sme->bg_scan_period == -1) { | |
623 | /* configure default value if not specified */ | 647 | /* configure default value if not specified */ |
624 | if (sme->bg_scan_period == -1) | ||
625 | sme->bg_scan_period = DEFAULT_BG_SCAN_PERIOD; | 648 | sme->bg_scan_period = DEFAULT_BG_SCAN_PERIOD; |
649 | } | ||
626 | 650 | ||
627 | ath6kl_wmi_scanparams_cmd(ar->wmi, vif->fw_vif_idx, 0, 0, | 651 | ath6kl_wmi_scanparams_cmd(ar->wmi, vif->fw_vif_idx, 0, 0, |
628 | sme->bg_scan_period, 0, 0, 0, 3, 0, 0, 0); | 652 | sme->bg_scan_period, 0, 0, 0, 3, 0, 0, 0); |
@@ -767,7 +791,7 @@ void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel, | |||
767 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "ad-hoc %s selected\n", | 791 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "ad-hoc %s selected\n", |
768 | nw_type & ADHOC_CREATOR ? "creator" : "joiner"); | 792 | nw_type & ADHOC_CREATOR ? "creator" : "joiner"); |
769 | cfg80211_ibss_joined(vif->ndev, bssid, GFP_KERNEL); | 793 | cfg80211_ibss_joined(vif->ndev, bssid, GFP_KERNEL); |
770 | cfg80211_put_bss(bss); | 794 | cfg80211_put_bss(ar->wiphy, bss); |
771 | return; | 795 | return; |
772 | } | 796 | } |
773 | 797 | ||
@@ -778,7 +802,7 @@ void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel, | |||
778 | assoc_req_ie, assoc_req_len, | 802 | assoc_req_ie, assoc_req_len, |
779 | assoc_resp_ie, assoc_resp_len, | 803 | assoc_resp_ie, assoc_resp_len, |
780 | WLAN_STATUS_SUCCESS, GFP_KERNEL); | 804 | WLAN_STATUS_SUCCESS, GFP_KERNEL); |
781 | cfg80211_put_bss(bss); | 805 | cfg80211_put_bss(ar->wiphy, bss); |
782 | } else if (vif->sme_state == SME_CONNECTED) { | 806 | } else if (vif->sme_state == SME_CONNECTED) { |
783 | /* inform roam event to cfg80211 */ | 807 | /* inform roam event to cfg80211 */ |
784 | cfg80211_roamed_bss(vif->ndev, bss, assoc_req_ie, assoc_req_len, | 808 | cfg80211_roamed_bss(vif->ndev, bss, assoc_req_ie, assoc_req_len, |
@@ -1454,10 +1478,10 @@ static int ath6kl_cfg80211_set_power_mgmt(struct wiphy *wiphy, | |||
1454 | return -EIO; | 1478 | return -EIO; |
1455 | 1479 | ||
1456 | if (pmgmt) { | 1480 | if (pmgmt) { |
1457 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: max perf\n", __func__); | 1481 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: rec power\n", __func__); |
1458 | mode.pwr_mode = REC_POWER; | 1482 | mode.pwr_mode = REC_POWER; |
1459 | } else { | 1483 | } else { |
1460 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: rec power\n", __func__); | 1484 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: max perf\n", __func__); |
1461 | mode.pwr_mode = MAX_PERF_POWER; | 1485 | mode.pwr_mode = MAX_PERF_POWER; |
1462 | } | 1486 | } |
1463 | 1487 | ||
@@ -1509,7 +1533,7 @@ static int ath6kl_cfg80211_del_iface(struct wiphy *wiphy, | |||
1509 | list_del(&vif->list); | 1533 | list_del(&vif->list); |
1510 | spin_unlock_bh(&ar->list_lock); | 1534 | spin_unlock_bh(&ar->list_lock); |
1511 | 1535 | ||
1512 | ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag)); | 1536 | ath6kl_cfg80211_vif_stop(vif, test_bit(WMI_READY, &ar->flag)); |
1513 | 1537 | ||
1514 | ath6kl_cfg80211_vif_cleanup(vif); | 1538 | ath6kl_cfg80211_vif_cleanup(vif); |
1515 | 1539 | ||
@@ -1559,17 +1583,13 @@ static int ath6kl_cfg80211_change_iface(struct wiphy *wiphy, | |||
1559 | set_iface_type: | 1583 | set_iface_type: |
1560 | switch (type) { | 1584 | switch (type) { |
1561 | case NL80211_IFTYPE_STATION: | 1585 | case NL80211_IFTYPE_STATION: |
1586 | case NL80211_IFTYPE_P2P_CLIENT: | ||
1562 | vif->next_mode = INFRA_NETWORK; | 1587 | vif->next_mode = INFRA_NETWORK; |
1563 | break; | 1588 | break; |
1564 | case NL80211_IFTYPE_ADHOC: | 1589 | case NL80211_IFTYPE_ADHOC: |
1565 | vif->next_mode = ADHOC_NETWORK; | 1590 | vif->next_mode = ADHOC_NETWORK; |
1566 | break; | 1591 | break; |
1567 | case NL80211_IFTYPE_AP: | 1592 | case NL80211_IFTYPE_AP: |
1568 | vif->next_mode = AP_NETWORK; | ||
1569 | break; | ||
1570 | case NL80211_IFTYPE_P2P_CLIENT: | ||
1571 | vif->next_mode = INFRA_NETWORK; | ||
1572 | break; | ||
1573 | case NL80211_IFTYPE_P2P_GO: | 1593 | case NL80211_IFTYPE_P2P_GO: |
1574 | vif->next_mode = AP_NETWORK; | 1594 | vif->next_mode = AP_NETWORK; |
1575 | break; | 1595 | break; |
@@ -2673,30 +2693,6 @@ static int ath6kl_set_ies(struct ath6kl_vif *vif, | |||
2673 | return 0; | 2693 | return 0; |
2674 | } | 2694 | } |
2675 | 2695 | ||
2676 | void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif, bool enable) | ||
2677 | { | ||
2678 | int err; | ||
2679 | |||
2680 | if (WARN_ON(!test_bit(WMI_READY, &vif->ar->flag))) | ||
2681 | return; | ||
2682 | |||
2683 | if (vif->nw_type != INFRA_NETWORK) | ||
2684 | return; | ||
2685 | |||
2686 | if (!test_bit(ATH6KL_FW_CAPABILITY_BMISS_ENHANCE, | ||
2687 | vif->ar->fw_capabilities)) | ||
2688 | return; | ||
2689 | |||
2690 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s fw bmiss enhance\n", | ||
2691 | enable ? "enable" : "disable"); | ||
2692 | |||
2693 | err = ath6kl_wmi_sta_bmiss_enhance_cmd(vif->ar->wmi, | ||
2694 | vif->fw_vif_idx, enable); | ||
2695 | if (err) | ||
2696 | ath6kl_err("failed to %s enhanced bmiss detection: %d\n", | ||
2697 | enable ? "enable" : "disable", err); | ||
2698 | } | ||
2699 | |||
2700 | static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon, | 2696 | static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon, |
2701 | u8 *rsn_capab) | 2697 | u8 *rsn_capab) |
2702 | { | 2698 | { |
@@ -2776,9 +2772,11 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev, | |||
2776 | 2772 | ||
2777 | ar->ap_mode_bkey.valid = false; | 2773 | ar->ap_mode_bkey.valid = false; |
2778 | 2774 | ||
2779 | /* TODO: | 2775 | ret = ath6kl_wmi_ap_set_beacon_intvl_cmd(ar->wmi, vif->fw_vif_idx, |
2780 | * info->interval | 2776 | info->beacon_interval); |
2781 | */ | 2777 | |
2778 | if (ret) | ||
2779 | ath6kl_warn("Failed to set beacon interval: %d\n", ret); | ||
2782 | 2780 | ||
2783 | ret = ath6kl_wmi_ap_set_dtim_cmd(ar->wmi, vif->fw_vif_idx, | 2781 | ret = ath6kl_wmi_ap_set_dtim_cmd(ar->wmi, vif->fw_vif_idx, |
2784 | info->dtim_period); | 2782 | info->dtim_period); |
@@ -3557,6 +3555,37 @@ static int ath6kl_cfg80211_vif_init(struct ath6kl_vif *vif) | |||
3557 | return 0; | 3555 | return 0; |
3558 | } | 3556 | } |
3559 | 3557 | ||
3558 | void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, bool wmi_ready) | ||
3559 | { | ||
3560 | static u8 bcast_mac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; | ||
3561 | bool discon_issued; | ||
3562 | |||
3563 | netif_stop_queue(vif->ndev); | ||
3564 | |||
3565 | clear_bit(WLAN_ENABLED, &vif->flags); | ||
3566 | |||
3567 | if (wmi_ready) { | ||
3568 | discon_issued = test_bit(CONNECTED, &vif->flags) || | ||
3569 | test_bit(CONNECT_PEND, &vif->flags); | ||
3570 | ath6kl_disconnect(vif); | ||
3571 | del_timer(&vif->disconnect_timer); | ||
3572 | |||
3573 | if (discon_issued) | ||
3574 | ath6kl_disconnect_event(vif, DISCONNECT_CMD, | ||
3575 | (vif->nw_type & AP_NETWORK) ? | ||
3576 | bcast_mac : vif->bssid, | ||
3577 | 0, NULL, 0); | ||
3578 | } | ||
3579 | |||
3580 | if (vif->scan_req) { | ||
3581 | cfg80211_scan_done(vif->scan_req, true); | ||
3582 | vif->scan_req = NULL; | ||
3583 | } | ||
3584 | |||
3585 | /* need to clean up enhanced bmiss detection fw state */ | ||
3586 | ath6kl_cfg80211_sta_bmiss_enhance(vif, false); | ||
3587 | } | ||
3588 | |||
3560 | void ath6kl_cfg80211_vif_cleanup(struct ath6kl_vif *vif) | 3589 | void ath6kl_cfg80211_vif_cleanup(struct ath6kl_vif *vif) |
3561 | { | 3590 | { |
3562 | struct ath6kl *ar = vif->ar; | 3591 | struct ath6kl *ar = vif->ar; |
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.h b/drivers/net/wireless/ath/ath6kl/cfg80211.h index e5e70f3a8ca8..b59becd91aea 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.h +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.h | |||
@@ -61,7 +61,5 @@ void ath6kl_cfg80211_cleanup(struct ath6kl *ar); | |||
61 | 61 | ||
62 | struct ath6kl *ath6kl_cfg80211_create(void); | 62 | struct ath6kl *ath6kl_cfg80211_create(void); |
63 | void ath6kl_cfg80211_destroy(struct ath6kl *ar); | 63 | void ath6kl_cfg80211_destroy(struct ath6kl *ar); |
64 | /* TODO: remove this once ath6kl_vif_cleanup() is moved to cfg80211.c */ | ||
65 | void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif, bool enable); | ||
66 | 64 | ||
67 | #endif /* ATH6KL_CFG80211_H */ | 65 | #endif /* ATH6KL_CFG80211_H */ |
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 189d8faf8c87..61b2f98b4e77 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
@@ -940,7 +940,7 @@ void ath6kl_reset_device(struct ath6kl *ar, u32 target_type, | |||
940 | bool wait_fot_compltn, bool cold_reset); | 940 | bool wait_fot_compltn, bool cold_reset); |
941 | void ath6kl_init_control_info(struct ath6kl_vif *vif); | 941 | void ath6kl_init_control_info(struct ath6kl_vif *vif); |
942 | struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar); | 942 | struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar); |
943 | void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready); | 943 | void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, bool wmi_ready); |
944 | int ath6kl_init_hw_start(struct ath6kl *ar); | 944 | int ath6kl_init_hw_start(struct ath6kl *ar); |
945 | int ath6kl_init_hw_stop(struct ath6kl *ar); | 945 | int ath6kl_init_hw_stop(struct ath6kl *ar); |
946 | int ath6kl_init_fetch_firmwares(struct ath6kl *ar); | 946 | int ath6kl_init_fetch_firmwares(struct ath6kl *ar); |
diff --git a/drivers/net/wireless/ath/ath6kl/htc_pipe.c b/drivers/net/wireless/ath/ath6kl/htc_pipe.c index ba6bd497b787..281390178e3d 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_pipe.c +++ b/drivers/net/wireless/ath/ath6kl/htc_pipe.c | |||
@@ -509,9 +509,7 @@ static void destroy_htc_txctrl_packet(struct htc_packet *packet) | |||
509 | { | 509 | { |
510 | struct sk_buff *skb; | 510 | struct sk_buff *skb; |
511 | skb = packet->skb; | 511 | skb = packet->skb; |
512 | if (skb != NULL) | 512 | dev_kfree_skb(skb); |
513 | dev_kfree_skb(skb); | ||
514 | |||
515 | kfree(packet); | 513 | kfree(packet); |
516 | } | 514 | } |
517 | 515 | ||
@@ -969,6 +967,22 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb, | |||
969 | u16 payload_len; | 967 | u16 payload_len; |
970 | int status = 0; | 968 | int status = 0; |
971 | 969 | ||
970 | /* | ||
971 | * ar->htc_target can be NULL due to a race condition that can occur | ||
972 | * during driver initialization(we do 'ath6kl_hif_power_on' before | ||
973 | * initializing 'ar->htc_target' via 'ath6kl_htc_create'). | ||
974 | * 'ath6kl_hif_power_on' assigns 'ath6kl_recv_complete' as | ||
975 | * usb_complete_t/callback function for 'usb_fill_bulk_urb'. | ||
976 | * Thus the possibility of ar->htc_target being NULL | ||
977 | * via ath6kl_recv_complete -> ath6kl_usb_io_comp_work. | ||
978 | */ | ||
979 | if (WARN_ON_ONCE(!target)) { | ||
980 | ath6kl_err("Target not yet initialized\n"); | ||
981 | status = -EINVAL; | ||
982 | goto free_skb; | ||
983 | } | ||
984 | |||
985 | |||
972 | netdata = skb->data; | 986 | netdata = skb->data; |
973 | netlen = skb->len; | 987 | netlen = skb->len; |
974 | 988 | ||
@@ -1054,6 +1068,7 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb, | |||
1054 | 1068 | ||
1055 | dev_kfree_skb(skb); | 1069 | dev_kfree_skb(skb); |
1056 | skb = NULL; | 1070 | skb = NULL; |
1071 | |||
1057 | goto free_skb; | 1072 | goto free_skb; |
1058 | } | 1073 | } |
1059 | 1074 | ||
@@ -1089,8 +1104,7 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb, | |||
1089 | skb = NULL; | 1104 | skb = NULL; |
1090 | 1105 | ||
1091 | free_skb: | 1106 | free_skb: |
1092 | if (skb != NULL) | 1107 | dev_kfree_skb(skb); |
1093 | dev_kfree_skb(skb); | ||
1094 | 1108 | ||
1095 | return status; | 1109 | return status; |
1096 | 1110 | ||
@@ -1184,7 +1198,7 @@ static void reset_endpoint_states(struct htc_target *target) | |||
1184 | INIT_LIST_HEAD(&ep->pipe.tx_lookup_queue); | 1198 | INIT_LIST_HEAD(&ep->pipe.tx_lookup_queue); |
1185 | INIT_LIST_HEAD(&ep->rx_bufq); | 1199 | INIT_LIST_HEAD(&ep->rx_bufq); |
1186 | ep->target = target; | 1200 | ep->target = target; |
1187 | ep->pipe.tx_credit_flow_enabled = (bool) 1; /* FIXME */ | 1201 | ep->pipe.tx_credit_flow_enabled = true; |
1188 | } | 1202 | } |
1189 | } | 1203 | } |
1190 | 1204 | ||
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index f21fa322e5ca..5d434cf88f35 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c | |||
@@ -1715,38 +1715,6 @@ void ath6kl_init_hw_restart(struct ath6kl *ar) | |||
1715 | } | 1715 | } |
1716 | } | 1716 | } |
1717 | 1717 | ||
1718 | /* FIXME: move this to cfg80211.c and rename to ath6kl_cfg80211_vif_stop() */ | ||
1719 | void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready) | ||
1720 | { | ||
1721 | static u8 bcast_mac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; | ||
1722 | bool discon_issued; | ||
1723 | |||
1724 | netif_stop_queue(vif->ndev); | ||
1725 | |||
1726 | clear_bit(WLAN_ENABLED, &vif->flags); | ||
1727 | |||
1728 | if (wmi_ready) { | ||
1729 | discon_issued = test_bit(CONNECTED, &vif->flags) || | ||
1730 | test_bit(CONNECT_PEND, &vif->flags); | ||
1731 | ath6kl_disconnect(vif); | ||
1732 | del_timer(&vif->disconnect_timer); | ||
1733 | |||
1734 | if (discon_issued) | ||
1735 | ath6kl_disconnect_event(vif, DISCONNECT_CMD, | ||
1736 | (vif->nw_type & AP_NETWORK) ? | ||
1737 | bcast_mac : vif->bssid, | ||
1738 | 0, NULL, 0); | ||
1739 | } | ||
1740 | |||
1741 | if (vif->scan_req) { | ||
1742 | cfg80211_scan_done(vif->scan_req, true); | ||
1743 | vif->scan_req = NULL; | ||
1744 | } | ||
1745 | |||
1746 | /* need to clean up enhanced bmiss detection fw state */ | ||
1747 | ath6kl_cfg80211_sta_bmiss_enhance(vif, false); | ||
1748 | } | ||
1749 | |||
1750 | void ath6kl_stop_txrx(struct ath6kl *ar) | 1718 | void ath6kl_stop_txrx(struct ath6kl *ar) |
1751 | { | 1719 | { |
1752 | struct ath6kl_vif *vif, *tmp_vif; | 1720 | struct ath6kl_vif *vif, *tmp_vif; |
@@ -1766,7 +1734,7 @@ void ath6kl_stop_txrx(struct ath6kl *ar) | |||
1766 | list_for_each_entry_safe(vif, tmp_vif, &ar->vif_list, list) { | 1734 | list_for_each_entry_safe(vif, tmp_vif, &ar->vif_list, list) { |
1767 | list_del(&vif->list); | 1735 | list_del(&vif->list); |
1768 | spin_unlock_bh(&ar->list_lock); | 1736 | spin_unlock_bh(&ar->list_lock); |
1769 | ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag)); | 1737 | ath6kl_cfg80211_vif_stop(vif, test_bit(WMI_READY, &ar->flag)); |
1770 | rtnl_lock(); | 1738 | rtnl_lock(); |
1771 | ath6kl_cfg80211_vif_cleanup(vif); | 1739 | ath6kl_cfg80211_vif_cleanup(vif); |
1772 | rtnl_unlock(); | 1740 | rtnl_unlock(); |
@@ -1801,8 +1769,6 @@ void ath6kl_stop_txrx(struct ath6kl *ar) | |||
1801 | "attempting to reset target on instance destroy\n"); | 1769 | "attempting to reset target on instance destroy\n"); |
1802 | ath6kl_reset_device(ar, ar->target_type, true, true); | 1770 | ath6kl_reset_device(ar, ar->target_type, true, true); |
1803 | 1771 | ||
1804 | clear_bit(WLAN_ENABLED, &ar->flag); | ||
1805 | |||
1806 | up(&ar->sem); | 1772 | up(&ar->sem); |
1807 | } | 1773 | } |
1808 | EXPORT_SYMBOL(ath6kl_stop_txrx); | 1774 | EXPORT_SYMBOL(ath6kl_stop_txrx); |
diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c index 62bcc0d5bc23..5fcd342762de 100644 --- a/drivers/net/wireless/ath/ath6kl/usb.c +++ b/drivers/net/wireless/ath/ath6kl/usb.c | |||
@@ -159,10 +159,8 @@ static void ath6kl_usb_free_urb_to_pipe(struct ath6kl_usb_pipe *pipe, | |||
159 | 159 | ||
160 | static void ath6kl_usb_cleanup_recv_urb(struct ath6kl_urb_context *urb_context) | 160 | static void ath6kl_usb_cleanup_recv_urb(struct ath6kl_urb_context *urb_context) |
161 | { | 161 | { |
162 | if (urb_context->skb != NULL) { | 162 | dev_kfree_skb(urb_context->skb); |
163 | dev_kfree_skb(urb_context->skb); | 163 | urb_context->skb = NULL; |
164 | urb_context->skb = NULL; | ||
165 | } | ||
166 | 164 | ||
167 | ath6kl_usb_free_urb_to_pipe(urb_context->pipe, urb_context); | 165 | ath6kl_usb_free_urb_to_pipe(urb_context->pipe, urb_context); |
168 | } | 166 | } |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 998f8b0f62fd..d76b5bd81a0d 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -751,6 +751,23 @@ int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid) | |||
751 | NO_SYNC_WMIFLAG); | 751 | NO_SYNC_WMIFLAG); |
752 | } | 752 | } |
753 | 753 | ||
754 | int ath6kl_wmi_ap_set_beacon_intvl_cmd(struct wmi *wmi, u8 if_idx, | ||
755 | u32 beacon_intvl) | ||
756 | { | ||
757 | struct sk_buff *skb; | ||
758 | struct set_beacon_int_cmd *cmd; | ||
759 | |||
760 | skb = ath6kl_wmi_get_new_buf(sizeof(*cmd)); | ||
761 | if (!skb) | ||
762 | return -ENOMEM; | ||
763 | |||
764 | cmd = (struct set_beacon_int_cmd *) skb->data; | ||
765 | |||
766 | cmd->beacon_intvl = cpu_to_le32(beacon_intvl); | ||
767 | return ath6kl_wmi_cmd_send(wmi, if_idx, skb, | ||
768 | WMI_SET_BEACON_INT_CMDID, NO_SYNC_WMIFLAG); | ||
769 | } | ||
770 | |||
754 | int ath6kl_wmi_ap_set_dtim_cmd(struct wmi *wmi, u8 if_idx, u32 dtim_period) | 771 | int ath6kl_wmi_ap_set_dtim_cmd(struct wmi *wmi, u8 if_idx, u32 dtim_period) |
755 | { | 772 | { |
756 | struct sk_buff *skb; | 773 | struct sk_buff *skb; |
@@ -1108,7 +1125,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len, | |||
1108 | kfree(mgmt); | 1125 | kfree(mgmt); |
1109 | if (bss == NULL) | 1126 | if (bss == NULL) |
1110 | return -ENOMEM; | 1127 | return -ENOMEM; |
1111 | cfg80211_put_bss(bss); | 1128 | cfg80211_put_bss(ar->wiphy, bss); |
1112 | 1129 | ||
1113 | /* | 1130 | /* |
1114 | * Firmware doesn't return any event when scheduled scan has | 1131 | * Firmware doesn't return any event when scheduled scan has |
@@ -2480,16 +2497,11 @@ static int ath6kl_wmi_sync_point(struct wmi *wmi, u8 if_idx) | |||
2480 | 2497 | ||
2481 | free_cmd_skb: | 2498 | free_cmd_skb: |
2482 | /* free up any resources left over (possibly due to an error) */ | 2499 | /* free up any resources left over (possibly due to an error) */ |
2483 | if (skb) | 2500 | dev_kfree_skb(skb); |
2484 | dev_kfree_skb(skb); | ||
2485 | 2501 | ||
2486 | free_data_skb: | 2502 | free_data_skb: |
2487 | for (index = 0; index < num_pri_streams; index++) { | 2503 | for (index = 0; index < num_pri_streams; index++) |
2488 | if (data_sync_bufs[index].skb != NULL) { | 2504 | dev_kfree_skb((struct sk_buff *)data_sync_bufs[index].skb); |
2489 | dev_kfree_skb((struct sk_buff *)data_sync_bufs[index]. | ||
2490 | skb); | ||
2491 | } | ||
2492 | } | ||
2493 | 2505 | ||
2494 | return ret; | 2506 | return ret; |
2495 | } | 2507 | } |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h index 98b1755e67f4..b5f226503baf 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.h +++ b/drivers/net/wireless/ath/ath6kl/wmi.h | |||
@@ -1660,6 +1660,10 @@ struct roam_ctrl_cmd { | |||
1660 | u8 roam_ctrl; | 1660 | u8 roam_ctrl; |
1661 | } __packed; | 1661 | } __packed; |
1662 | 1662 | ||
1663 | struct set_beacon_int_cmd { | ||
1664 | __le32 beacon_intvl; | ||
1665 | } __packed; | ||
1666 | |||
1663 | struct set_dtim_cmd { | 1667 | struct set_dtim_cmd { |
1664 | __le32 dtim_period; | 1668 | __le32 dtim_period; |
1665 | } __packed; | 1669 | } __packed; |
@@ -2649,6 +2653,8 @@ int ath6kl_wmi_del_wow_pattern_cmd(struct wmi *wmi, u8 if_idx, | |||
2649 | int ath6kl_wmi_set_rssi_filter_cmd(struct wmi *wmi, u8 if_idx, s8 rssi); | 2653 | int ath6kl_wmi_set_rssi_filter_cmd(struct wmi *wmi, u8 if_idx, s8 rssi); |
2650 | int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi); | 2654 | int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi); |
2651 | int ath6kl_wmi_ap_set_dtim_cmd(struct wmi *wmi, u8 if_idx, u32 dtim_period); | 2655 | int ath6kl_wmi_ap_set_dtim_cmd(struct wmi *wmi, u8 if_idx, u32 dtim_period); |
2656 | int ath6kl_wmi_ap_set_beacon_intvl_cmd(struct wmi *wmi, u8 if_idx, | ||
2657 | u32 beacon_interval); | ||
2652 | int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid); | 2658 | int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid); |
2653 | int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode); | 2659 | int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode); |
2654 | int ath6kl_wmi_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, bool mc_all_on); | 2660 | int ath6kl_wmi_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, bool mc_all_on); |
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 714558d1ba78..54150b6a39ae 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -1204,7 +1204,7 @@ static u8 ath_rc_build_ht_caps(struct ath_softc *sc, struct ieee80211_sta *sta) | |||
1204 | caps |= WLAN_RC_TS_FLAG | WLAN_RC_DS_FLAG; | 1204 | caps |= WLAN_RC_TS_FLAG | WLAN_RC_DS_FLAG; |
1205 | else if (sta->ht_cap.mcs.rx_mask[1]) | 1205 | else if (sta->ht_cap.mcs.rx_mask[1]) |
1206 | caps |= WLAN_RC_DS_FLAG; | 1206 | caps |= WLAN_RC_DS_FLAG; |
1207 | if (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) { | 1207 | if (sta->bandwidth >= IEEE80211_STA_RX_BW_40) { |
1208 | caps |= WLAN_RC_40_FLAG; | 1208 | caps |= WLAN_RC_40_FLAG; |
1209 | if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) | 1209 | if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) |
1210 | caps |= WLAN_RC_SGI_FLAG; | 1210 | caps |= WLAN_RC_SGI_FLAG; |
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index 002851fceb2f..9ecc1968262c 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c | |||
@@ -341,7 +341,7 @@ static int wil_cfg80211_connect(struct wiphy *wiphy, | |||
341 | } | 341 | } |
342 | 342 | ||
343 | out: | 343 | out: |
344 | cfg80211_put_bss(bss); | 344 | cfg80211_put_bss(wiphy, bss); |
345 | 345 | ||
346 | return rc; | 346 | return rc; |
347 | } | 347 | } |
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 0b70e17cd1fb..79d608caa903 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c | |||
@@ -338,7 +338,7 @@ static void wmi_evt_rx_mgmt(struct wil6210_priv *wil, int id, void *d, int len) | |||
338 | if (bss) { | 338 | if (bss) { |
339 | wil_dbg_wmi(wil, "Added BSS %pM\n", | 339 | wil_dbg_wmi(wil, "Added BSS %pM\n", |
340 | rx_mgmt_frame->bssid); | 340 | rx_mgmt_frame->bssid); |
341 | cfg80211_put_bss(bss); | 341 | cfg80211_put_bss(wiphy, bss); |
342 | } else { | 342 | } else { |
343 | wil_err(wil, "cfg80211_inform_bss() failed\n"); | 343 | wil_err(wil, "cfg80211_inform_bss() failed\n"); |
344 | } | 344 | } |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index 481f41ad7989..cecc3eff72e9 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
@@ -2323,7 +2323,7 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg, | |||
2323 | if (!bss) | 2323 | if (!bss) |
2324 | return -ENOMEM; | 2324 | return -ENOMEM; |
2325 | 2325 | ||
2326 | cfg80211_put_bss(bss); | 2326 | cfg80211_put_bss(wiphy, bss); |
2327 | 2327 | ||
2328 | return err; | 2328 | return err; |
2329 | } | 2329 | } |
@@ -2429,7 +2429,7 @@ static s32 wl_inform_ibss(struct brcmf_cfg80211_info *cfg, | |||
2429 | goto CleanUp; | 2429 | goto CleanUp; |
2430 | } | 2430 | } |
2431 | 2431 | ||
2432 | cfg80211_put_bss(bss); | 2432 | cfg80211_put_bss(wiphy, bss); |
2433 | 2433 | ||
2434 | CleanUp: | 2434 | CleanUp: |
2435 | 2435 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/brcm80211/brcmsmac/channel.c index cdb62b8ccc79..10ee314c4229 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c | |||
@@ -183,8 +183,7 @@ static bool brcms_c_country_valid(const char *ccode) | |||
183 | * chars. | 183 | * chars. |
184 | */ | 184 | */ |
185 | if (!((0x80 & ccode[0]) == 0 && ccode[0] >= 0x41 && ccode[0] <= 0x5A && | 185 | if (!((0x80 & ccode[0]) == 0 && ccode[0] >= 0x41 && ccode[0] <= 0x5A && |
186 | (0x80 & ccode[1]) == 0 && ccode[1] >= 0x41 && ccode[1] <= 0x5A && | 186 | (0x80 & ccode[1]) == 0 && ccode[1] >= 0x41 && ccode[1] <= 0x5A)) |
187 | ccode[2] == '\0')) | ||
188 | return false; | 187 | return false; |
189 | 188 | ||
190 | /* | 189 | /* |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c index b1dd5600fd02..c6451c61407a 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "debug.h" | 36 | #include "debug.h" |
37 | 37 | ||
38 | #define N_TX_QUEUES 4 /* #tx queues on mac80211<->driver interface */ | 38 | #define N_TX_QUEUES 4 /* #tx queues on mac80211<->driver interface */ |
39 | #define BRCMS_FLUSH_TIMEOUT 500 /* msec */ | ||
39 | 40 | ||
40 | /* Flags we support */ | 41 | /* Flags we support */ |
41 | #define MAC_FILTERS (FIF_PROMISC_IN_BSS | \ | 42 | #define MAC_FILTERS (FIF_PROMISC_IN_BSS | \ |
@@ -712,16 +713,29 @@ static void brcms_ops_rfkill_poll(struct ieee80211_hw *hw) | |||
712 | wiphy_rfkill_set_hw_state(wl->pub->ieee_hw->wiphy, blocked); | 713 | wiphy_rfkill_set_hw_state(wl->pub->ieee_hw->wiphy, blocked); |
713 | } | 714 | } |
714 | 715 | ||
716 | static bool brcms_tx_flush_completed(struct brcms_info *wl) | ||
717 | { | ||
718 | bool result; | ||
719 | |||
720 | spin_lock_bh(&wl->lock); | ||
721 | result = brcms_c_tx_flush_completed(wl->wlc); | ||
722 | spin_unlock_bh(&wl->lock); | ||
723 | return result; | ||
724 | } | ||
725 | |||
715 | static void brcms_ops_flush(struct ieee80211_hw *hw, bool drop) | 726 | static void brcms_ops_flush(struct ieee80211_hw *hw, bool drop) |
716 | { | 727 | { |
717 | struct brcms_info *wl = hw->priv; | 728 | struct brcms_info *wl = hw->priv; |
729 | int ret; | ||
718 | 730 | ||
719 | no_printk("%s: drop = %s\n", __func__, drop ? "true" : "false"); | 731 | no_printk("%s: drop = %s\n", __func__, drop ? "true" : "false"); |
720 | 732 | ||
721 | /* wait for packet queue and dma fifos to run empty */ | 733 | ret = wait_event_timeout(wl->tx_flush_wq, |
722 | spin_lock_bh(&wl->lock); | 734 | brcms_tx_flush_completed(wl), |
723 | brcms_c_wait_for_tx_completion(wl->wlc, drop); | 735 | msecs_to_jiffies(BRCMS_FLUSH_TIMEOUT)); |
724 | spin_unlock_bh(&wl->lock); | 736 | |
737 | brcms_dbg_mac80211(wl->wlc->hw->d11core, | ||
738 | "ret=%d\n", jiffies_to_msecs(ret)); | ||
725 | } | 739 | } |
726 | 740 | ||
727 | static const struct ieee80211_ops brcms_ops = { | 741 | static const struct ieee80211_ops brcms_ops = { |
@@ -776,6 +790,7 @@ void brcms_dpc(unsigned long data) | |||
776 | 790 | ||
777 | done: | 791 | done: |
778 | spin_unlock_bh(&wl->lock); | 792 | spin_unlock_bh(&wl->lock); |
793 | wake_up(&wl->tx_flush_wq); | ||
779 | } | 794 | } |
780 | 795 | ||
781 | /* | 796 | /* |
@@ -1024,6 +1039,8 @@ static struct brcms_info *brcms_attach(struct bcma_device *pdev) | |||
1024 | 1039 | ||
1025 | atomic_set(&wl->callbacks, 0); | 1040 | atomic_set(&wl->callbacks, 0); |
1026 | 1041 | ||
1042 | init_waitqueue_head(&wl->tx_flush_wq); | ||
1043 | |||
1027 | /* setup the bottom half handler */ | 1044 | /* setup the bottom half handler */ |
1028 | tasklet_init(&wl->tasklet, brcms_dpc, (unsigned long) wl); | 1045 | tasklet_init(&wl->tasklet, brcms_dpc, (unsigned long) wl); |
1029 | 1046 | ||
@@ -1613,13 +1630,3 @@ bool brcms_rfkill_set_hw_state(struct brcms_info *wl) | |||
1613 | spin_lock_bh(&wl->lock); | 1630 | spin_lock_bh(&wl->lock); |
1614 | return blocked; | 1631 | return blocked; |
1615 | } | 1632 | } |
1616 | |||
1617 | /* | ||
1618 | * precondition: perimeter lock has been acquired | ||
1619 | */ | ||
1620 | void brcms_msleep(struct brcms_info *wl, uint ms) | ||
1621 | { | ||
1622 | spin_unlock_bh(&wl->lock); | ||
1623 | msleep(ms); | ||
1624 | spin_lock_bh(&wl->lock); | ||
1625 | } | ||
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h index 9358bd5ebd35..947ccacf43e6 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h | |||
@@ -68,6 +68,8 @@ struct brcms_info { | |||
68 | spinlock_t lock; /* per-device perimeter lock */ | 68 | spinlock_t lock; /* per-device perimeter lock */ |
69 | spinlock_t isr_lock; /* per-device ISR synchronization lock */ | 69 | spinlock_t isr_lock; /* per-device ISR synchronization lock */ |
70 | 70 | ||
71 | /* tx flush */ | ||
72 | wait_queue_head_t tx_flush_wq; | ||
71 | 73 | ||
72 | /* timer related fields */ | 74 | /* timer related fields */ |
73 | atomic_t callbacks; /* # outstanding callback functions */ | 75 | atomic_t callbacks; /* # outstanding callback functions */ |
@@ -100,7 +102,6 @@ extern struct brcms_timer *brcms_init_timer(struct brcms_info *wl, | |||
100 | extern void brcms_free_timer(struct brcms_timer *timer); | 102 | extern void brcms_free_timer(struct brcms_timer *timer); |
101 | extern void brcms_add_timer(struct brcms_timer *timer, uint ms, int periodic); | 103 | extern void brcms_add_timer(struct brcms_timer *timer, uint ms, int periodic); |
102 | extern bool brcms_del_timer(struct brcms_timer *timer); | 104 | extern bool brcms_del_timer(struct brcms_timer *timer); |
103 | extern void brcms_msleep(struct brcms_info *wl, uint ms); | ||
104 | extern void brcms_dpc(unsigned long data); | 105 | extern void brcms_dpc(unsigned long data); |
105 | extern void brcms_timer(struct brcms_timer *t); | 106 | extern void brcms_timer(struct brcms_timer *t); |
106 | extern void brcms_fatal_error(struct brcms_info *wl); | 107 | extern void brcms_fatal_error(struct brcms_info *wl); |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index 0985925cd3f4..8ef02dca8f8c 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -1025,7 +1025,6 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs) | |||
1025 | static bool | 1025 | static bool |
1026 | brcms_b_txstatus(struct brcms_hardware *wlc_hw, bool bound, bool *fatal) | 1026 | brcms_b_txstatus(struct brcms_hardware *wlc_hw, bool bound, bool *fatal) |
1027 | { | 1027 | { |
1028 | bool morepending = false; | ||
1029 | struct bcma_device *core; | 1028 | struct bcma_device *core; |
1030 | struct tx_status txstatus, *txs; | 1029 | struct tx_status txstatus, *txs; |
1031 | u32 s1, s2; | 1030 | u32 s1, s2; |
@@ -1039,23 +1038,20 @@ brcms_b_txstatus(struct brcms_hardware *wlc_hw, bool bound, bool *fatal) | |||
1039 | txs = &txstatus; | 1038 | txs = &txstatus; |
1040 | core = wlc_hw->d11core; | 1039 | core = wlc_hw->d11core; |
1041 | *fatal = false; | 1040 | *fatal = false; |
1042 | s1 = bcma_read32(core, D11REGOFFS(frmtxstatus)); | ||
1043 | while (!(*fatal) | ||
1044 | && (s1 & TXS_V)) { | ||
1045 | /* !give others some time to run! */ | ||
1046 | if (n >= max_tx_num) { | ||
1047 | morepending = true; | ||
1048 | break; | ||
1049 | } | ||
1050 | 1041 | ||
1042 | while (n < max_tx_num) { | ||
1043 | s1 = bcma_read32(core, D11REGOFFS(frmtxstatus)); | ||
1051 | if (s1 == 0xffffffff) { | 1044 | if (s1 == 0xffffffff) { |
1052 | brcms_err(core, "wl%d: %s: dead chip\n", wlc_hw->unit, | 1045 | brcms_err(core, "wl%d: %s: dead chip\n", wlc_hw->unit, |
1053 | __func__); | 1046 | __func__); |
1054 | *fatal = true; | 1047 | *fatal = true; |
1055 | return false; | 1048 | return false; |
1056 | } | 1049 | } |
1057 | s2 = bcma_read32(core, D11REGOFFS(frmtxstatus2)); | 1050 | /* only process when valid */ |
1051 | if (!(s1 & TXS_V)) | ||
1052 | break; | ||
1058 | 1053 | ||
1054 | s2 = bcma_read32(core, D11REGOFFS(frmtxstatus2)); | ||
1059 | txs->status = s1 & TXS_STATUS_MASK; | 1055 | txs->status = s1 & TXS_STATUS_MASK; |
1060 | txs->frameid = (s1 & TXS_FID_MASK) >> TXS_FID_SHIFT; | 1056 | txs->frameid = (s1 & TXS_FID_MASK) >> TXS_FID_SHIFT; |
1061 | txs->sequence = s2 & TXS_SEQ_MASK; | 1057 | txs->sequence = s2 & TXS_SEQ_MASK; |
@@ -1063,15 +1059,12 @@ brcms_b_txstatus(struct brcms_hardware *wlc_hw, bool bound, bool *fatal) | |||
1063 | txs->lasttxtime = 0; | 1059 | txs->lasttxtime = 0; |
1064 | 1060 | ||
1065 | *fatal = brcms_c_dotxstatus(wlc_hw->wlc, txs); | 1061 | *fatal = brcms_c_dotxstatus(wlc_hw->wlc, txs); |
1066 | 1062 | if (*fatal == true) | |
1067 | s1 = bcma_read32(core, D11REGOFFS(frmtxstatus)); | 1063 | return false; |
1068 | n++; | 1064 | n++; |
1069 | } | 1065 | } |
1070 | 1066 | ||
1071 | if (*fatal) | 1067 | return n >= max_tx_num; |
1072 | return false; | ||
1073 | |||
1074 | return morepending; | ||
1075 | } | 1068 | } |
1076 | 1069 | ||
1077 | static void brcms_c_tbtt(struct brcms_c_info *wlc) | 1070 | static void brcms_c_tbtt(struct brcms_c_info *wlc) |
@@ -3145,8 +3138,7 @@ void brcms_c_reset(struct brcms_c_info *wlc) | |||
3145 | brcms_c_statsupd(wlc); | 3138 | brcms_c_statsupd(wlc); |
3146 | 3139 | ||
3147 | /* reset our snapshot of macstat counters */ | 3140 | /* reset our snapshot of macstat counters */ |
3148 | memset((char *)wlc->core->macstat_snapshot, 0, | 3141 | memset(wlc->core->macstat_snapshot, 0, sizeof(struct macstat)); |
3149 | sizeof(struct macstat)); | ||
3150 | 3142 | ||
3151 | brcms_b_reset(wlc->hw); | 3143 | brcms_b_reset(wlc->hw); |
3152 | } | 3144 | } |
@@ -4059,7 +4051,7 @@ void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci, | |||
4059 | return; | 4051 | return; |
4060 | } | 4052 | } |
4061 | 4053 | ||
4062 | memset((char *)&acp_shm, 0, sizeof(struct shm_acparams)); | 4054 | memset(&acp_shm, 0, sizeof(struct shm_acparams)); |
4063 | /* fill in shm ac params struct */ | 4055 | /* fill in shm ac params struct */ |
4064 | acp_shm.txop = params->txop; | 4056 | acp_shm.txop = params->txop; |
4065 | /* convert from units of 32us to us for ucode */ | 4057 | /* convert from units of 32us to us for ucode */ |
@@ -4775,7 +4767,7 @@ static void brcms_c_bss_default_init(struct brcms_c_info *wlc) | |||
4775 | struct brcms_bss_info *bi = wlc->default_bss; | 4767 | struct brcms_bss_info *bi = wlc->default_bss; |
4776 | 4768 | ||
4777 | /* init default and target BSS with some sane initial values */ | 4769 | /* init default and target BSS with some sane initial values */ |
4778 | memset((char *)(bi), 0, sizeof(struct brcms_bss_info)); | 4770 | memset(bi, 0, sizeof(*bi)); |
4779 | bi->beacon_period = BEACON_INTERVAL_DEFAULT; | 4771 | bi->beacon_period = BEACON_INTERVAL_DEFAULT; |
4780 | 4772 | ||
4781 | /* fill the default channel as the first valid channel | 4773 | /* fill the default channel as the first valid channel |
@@ -5304,7 +5296,7 @@ int brcms_c_set_gmode(struct brcms_c_info *wlc, u8 gmode, bool config) | |||
5304 | brcms_c_protection_upd(wlc, BRCMS_PROT_G_USER, gmode); | 5296 | brcms_c_protection_upd(wlc, BRCMS_PROT_G_USER, gmode); |
5305 | 5297 | ||
5306 | /* Clear rateset override */ | 5298 | /* Clear rateset override */ |
5307 | memset(&rs, 0, sizeof(struct brcms_c_rateset)); | 5299 | memset(&rs, 0, sizeof(rs)); |
5308 | 5300 | ||
5309 | switch (gmode) { | 5301 | switch (gmode) { |
5310 | case GMODE_LEGACY_B: | 5302 | case GMODE_LEGACY_B: |
@@ -5527,7 +5519,7 @@ int brcms_c_set_rateset(struct brcms_c_info *wlc, struct brcm_rateset *rs) | |||
5527 | if (rs->count > BRCMS_NUMRATES) | 5519 | if (rs->count > BRCMS_NUMRATES) |
5528 | return -ENOBUFS; | 5520 | return -ENOBUFS; |
5529 | 5521 | ||
5530 | memset(&internal_rs, 0, sizeof(struct brcms_c_rateset)); | 5522 | memset(&internal_rs, 0, sizeof(internal_rs)); |
5531 | 5523 | ||
5532 | /* Copy only legacy rateset section */ | 5524 | /* Copy only legacy rateset section */ |
5533 | internal_rs.count = rs->count; | 5525 | internal_rs.count = rs->count; |
@@ -5630,7 +5622,7 @@ int brcms_c_module_unregister(struct brcms_pub *pub, const char *name, | |||
5630 | for (i = 0; i < BRCMS_MAXMODULES; i++) { | 5622 | for (i = 0; i < BRCMS_MAXMODULES; i++) { |
5631 | if (!strcmp(wlc->modulecb[i].name, name) && | 5623 | if (!strcmp(wlc->modulecb[i].name, name) && |
5632 | (wlc->modulecb[i].hdl == hdl)) { | 5624 | (wlc->modulecb[i].hdl == hdl)) { |
5633 | memset(&wlc->modulecb[i], 0, sizeof(struct modulecb)); | 5625 | memset(&wlc->modulecb[i], 0, sizeof(wlc->modulecb[i])); |
5634 | return 0; | 5626 | return 0; |
5635 | } | 5627 | } |
5636 | } | 5628 | } |
@@ -6450,10 +6442,9 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, | |||
6450 | 6442 | ||
6451 | if ((txrate[k]->flags & IEEE80211_TX_RC_MCS) | 6443 | if ((txrate[k]->flags & IEEE80211_TX_RC_MCS) |
6452 | && (!is_mcs_rate(rspec[k]))) { | 6444 | && (!is_mcs_rate(rspec[k]))) { |
6453 | brcms_err(wlc->hw->d11core, | 6445 | brcms_warn(wlc->hw->d11core, |
6454 | "wl%d: %s: IEEE80211_TX_" | 6446 | "wl%d: %s: IEEE80211_TX_RC_MCS != is_mcs_rate(rspec)\n", |
6455 | "RC_MCS != is_mcs_rate(rspec)\n", | 6447 | wlc->pub->unit, __func__); |
6456 | wlc->pub->unit, __func__); | ||
6457 | } | 6448 | } |
6458 | 6449 | ||
6459 | if (is_mcs_rate(rspec[k])) { | 6450 | if (is_mcs_rate(rspec[k])) { |
@@ -6686,11 +6677,9 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, | |||
6686 | (struct ofdm_phy_hdr *) rts_plcp) : | 6677 | (struct ofdm_phy_hdr *) rts_plcp) : |
6687 | rts_plcp[0]) << 8; | 6678 | rts_plcp[0]) << 8; |
6688 | } else { | 6679 | } else { |
6689 | memset((char *)txh->RTSPhyHeader, 0, D11_PHY_HDR_LEN); | 6680 | memset(txh->RTSPhyHeader, 0, D11_PHY_HDR_LEN); |
6690 | memset((char *)&txh->rts_frame, 0, | 6681 | memset(&txh->rts_frame, 0, sizeof(struct ieee80211_rts)); |
6691 | sizeof(struct ieee80211_rts)); | 6682 | memset(txh->RTSPLCPFallback, 0, sizeof(txh->RTSPLCPFallback)); |
6692 | memset((char *)txh->RTSPLCPFallback, 0, | ||
6693 | sizeof(txh->RTSPLCPFallback)); | ||
6694 | txh->RTSDurFallback = 0; | 6683 | txh->RTSDurFallback = 0; |
6695 | } | 6684 | } |
6696 | 6685 | ||
@@ -6845,21 +6834,19 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, | |||
6845 | wlc->fragthresh[queue] = | 6834 | wlc->fragthresh[queue] = |
6846 | (u16) newfragthresh; | 6835 | (u16) newfragthresh; |
6847 | } else { | 6836 | } else { |
6848 | brcms_err(wlc->hw->d11core, | 6837 | brcms_warn(wlc->hw->d11core, |
6849 | "wl%d: %s txop invalid " | 6838 | "wl%d: %s txop invalid for rate %d\n", |
6850 | "for rate %d\n", | 6839 | wlc->pub->unit, fifo_names[queue], |
6851 | wlc->pub->unit, fifo_names[queue], | 6840 | rspec2rate(rspec[0])); |
6852 | rspec2rate(rspec[0])); | ||
6853 | } | 6841 | } |
6854 | 6842 | ||
6855 | if (dur > wlc->edcf_txop[ac]) | 6843 | if (dur > wlc->edcf_txop[ac]) |
6856 | brcms_err(wlc->hw->d11core, | 6844 | brcms_warn(wlc->hw->d11core, |
6857 | "wl%d: %s: %s txop " | 6845 | "wl%d: %s: %s txop exceeded phylen %d/%d dur %d/%d\n", |
6858 | "exceeded phylen %d/%d dur %d/%d\n", | 6846 | wlc->pub->unit, __func__, |
6859 | wlc->pub->unit, __func__, | 6847 | fifo_names[queue], |
6860 | fifo_names[queue], | 6848 | phylen, wlc->fragthresh[queue], |
6861 | phylen, wlc->fragthresh[queue], | 6849 | dur, wlc->edcf_txop[ac]); |
6862 | dur, wlc->edcf_txop[ac]); | ||
6863 | } | 6850 | } |
6864 | } | 6851 | } |
6865 | 6852 | ||
@@ -7334,7 +7321,7 @@ brcms_c_bcn_prb_template(struct brcms_c_info *wlc, u16 type, | |||
7334 | *len = hdr_len + body_len; | 7321 | *len = hdr_len + body_len; |
7335 | 7322 | ||
7336 | /* format PHY and MAC headers */ | 7323 | /* format PHY and MAC headers */ |
7337 | memset((char *)buf, 0, hdr_len); | 7324 | memset(buf, 0, hdr_len); |
7338 | 7325 | ||
7339 | plcp = (struct cck_phy_hdr *) buf; | 7326 | plcp = (struct cck_phy_hdr *) buf; |
7340 | 7327 | ||
@@ -7520,25 +7507,16 @@ int brcms_c_get_curband(struct brcms_c_info *wlc) | |||
7520 | return wlc->band->bandunit; | 7507 | return wlc->band->bandunit; |
7521 | } | 7508 | } |
7522 | 7509 | ||
7523 | void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc, bool drop) | 7510 | bool brcms_c_tx_flush_completed(struct brcms_c_info *wlc) |
7524 | { | 7511 | { |
7525 | int timeout = 20; | ||
7526 | int i; | 7512 | int i; |
7527 | 7513 | ||
7528 | /* Kick DMA to send any pending AMPDU */ | 7514 | /* Kick DMA to send any pending AMPDU */ |
7529 | for (i = 0; i < ARRAY_SIZE(wlc->hw->di); i++) | 7515 | for (i = 0; i < ARRAY_SIZE(wlc->hw->di); i++) |
7530 | if (wlc->hw->di[i]) | 7516 | if (wlc->hw->di[i]) |
7531 | dma_txflush(wlc->hw->di[i]); | 7517 | dma_kick_tx(wlc->hw->di[i]); |
7532 | |||
7533 | /* wait for queue and DMA fifos to run dry */ | ||
7534 | while (brcms_txpktpendtot(wlc) > 0) { | ||
7535 | brcms_msleep(wlc->wl, 1); | ||
7536 | |||
7537 | if (--timeout == 0) | ||
7538 | break; | ||
7539 | } | ||
7540 | 7518 | ||
7541 | WARN_ON_ONCE(timeout == 0); | 7519 | return !brcms_txpktpendtot(wlc); |
7542 | } | 7520 | } |
7543 | 7521 | ||
7544 | void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, u8 interval) | 7522 | void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, u8 interval) |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/pub.h b/drivers/net/wireless/brcm80211/brcmsmac/pub.h index 4fb2834f4e64..b0f14b7b8616 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/pub.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/pub.h | |||
@@ -314,8 +314,6 @@ extern void brcms_c_associate_upd(struct brcms_c_info *wlc, bool state); | |||
314 | extern void brcms_c_scan_start(struct brcms_c_info *wlc); | 314 | extern void brcms_c_scan_start(struct brcms_c_info *wlc); |
315 | extern void brcms_c_scan_stop(struct brcms_c_info *wlc); | 315 | extern void brcms_c_scan_stop(struct brcms_c_info *wlc); |
316 | extern int brcms_c_get_curband(struct brcms_c_info *wlc); | 316 | extern int brcms_c_get_curband(struct brcms_c_info *wlc); |
317 | extern void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc, | ||
318 | bool drop); | ||
319 | extern int brcms_c_set_channel(struct brcms_c_info *wlc, u16 channel); | 317 | extern int brcms_c_set_channel(struct brcms_c_info *wlc, u16 channel); |
320 | extern int brcms_c_set_rate_limit(struct brcms_c_info *wlc, u16 srl, u16 lrl); | 318 | extern int brcms_c_set_rate_limit(struct brcms_c_info *wlc, u16 srl, u16 lrl); |
321 | extern void brcms_c_get_current_rateset(struct brcms_c_info *wlc, | 319 | extern void brcms_c_get_current_rateset(struct brcms_c_info *wlc, |
@@ -332,5 +330,6 @@ extern int brcms_c_set_tx_power(struct brcms_c_info *wlc, int txpwr); | |||
332 | extern int brcms_c_get_tx_power(struct brcms_c_info *wlc); | 330 | extern int brcms_c_get_tx_power(struct brcms_c_info *wlc); |
333 | extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc); | 331 | extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc); |
334 | extern void brcms_c_mute(struct brcms_c_info *wlc, bool on); | 332 | extern void brcms_c_mute(struct brcms_c_info *wlc, bool on); |
333 | extern bool brcms_c_tx_flush_completed(struct brcms_c_info *wlc); | ||
335 | 334 | ||
336 | #endif /* _BRCM_PUB_H_ */ | 335 | #endif /* _BRCM_PUB_H_ */ |
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c index 83856d1a6101..3630a41df50d 100644 --- a/drivers/net/wireless/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/iwlegacy/3945-mac.c | |||
@@ -572,26 +572,11 @@ il3945_tx_skb(struct il_priv *il, | |||
572 | il3945_hw_build_tx_cmd_rate(il, out_cmd, info, hdr, sta_id); | 572 | il3945_hw_build_tx_cmd_rate(il, out_cmd, info, hdr, sta_id); |
573 | 573 | ||
574 | /* Total # bytes to be transmitted */ | 574 | /* Total # bytes to be transmitted */ |
575 | len = (u16) skb->len; | 575 | tx_cmd->len = cpu_to_le16((u16) skb->len); |
576 | tx_cmd->len = cpu_to_le16(len); | ||
577 | 576 | ||
578 | il_update_stats(il, true, fc, len); | ||
579 | tx_cmd->tx_flags &= ~TX_CMD_FLG_ANT_A_MSK; | 577 | tx_cmd->tx_flags &= ~TX_CMD_FLG_ANT_A_MSK; |
580 | tx_cmd->tx_flags &= ~TX_CMD_FLG_ANT_B_MSK; | 578 | tx_cmd->tx_flags &= ~TX_CMD_FLG_ANT_B_MSK; |
581 | 579 | ||
582 | if (!ieee80211_has_morefrags(hdr->frame_control)) { | ||
583 | txq->need_update = 1; | ||
584 | } else { | ||
585 | wait_write_ptr = 1; | ||
586 | txq->need_update = 0; | ||
587 | } | ||
588 | |||
589 | D_TX("sequence nr = 0X%x\n", le16_to_cpu(out_cmd->hdr.sequence)); | ||
590 | D_TX("tx_flags = 0X%x\n", le32_to_cpu(tx_cmd->tx_flags)); | ||
591 | il_print_hex_dump(il, IL_DL_TX, tx_cmd, sizeof(*tx_cmd)); | ||
592 | il_print_hex_dump(il, IL_DL_TX, (u8 *) tx_cmd->hdr, | ||
593 | ieee80211_hdrlen(fc)); | ||
594 | |||
595 | /* | 580 | /* |
596 | * Use the first empty entry in this queue's command buffer array | 581 | * Use the first empty entry in this queue's command buffer array |
597 | * to contain the Tx command and MAC header concatenated together | 582 | * to contain the Tx command and MAC header concatenated together |
@@ -610,14 +595,8 @@ il3945_tx_skb(struct il_priv *il, | |||
610 | * within command buffer array. */ | 595 | * within command buffer array. */ |
611 | txcmd_phys = | 596 | txcmd_phys = |
612 | pci_map_single(il->pci_dev, &out_cmd->hdr, len, PCI_DMA_TODEVICE); | 597 | pci_map_single(il->pci_dev, &out_cmd->hdr, len, PCI_DMA_TODEVICE); |
613 | /* we do not map meta data ... so we can safely access address to | 598 | if (unlikely(pci_dma_mapping_error(il->pci_dev, txcmd_phys))) |
614 | * provide to unmap command*/ | 599 | goto drop_unlock; |
615 | dma_unmap_addr_set(out_meta, mapping, txcmd_phys); | ||
616 | dma_unmap_len_set(out_meta, len, len); | ||
617 | |||
618 | /* Add buffer containing Tx command and MAC(!) header to TFD's | ||
619 | * first entry */ | ||
620 | il->ops->txq_attach_buf_to_tfd(il, txq, txcmd_phys, len, 1, 0); | ||
621 | 600 | ||
622 | /* Set up TFD's 2nd entry to point directly to remainder of skb, | 601 | /* Set up TFD's 2nd entry to point directly to remainder of skb, |
623 | * if any (802.11 null frames have no payload). */ | 602 | * if any (802.11 null frames have no payload). */ |
@@ -626,10 +605,34 @@ il3945_tx_skb(struct il_priv *il, | |||
626 | phys_addr = | 605 | phys_addr = |
627 | pci_map_single(il->pci_dev, skb->data + hdr_len, len, | 606 | pci_map_single(il->pci_dev, skb->data + hdr_len, len, |
628 | PCI_DMA_TODEVICE); | 607 | PCI_DMA_TODEVICE); |
608 | if (unlikely(pci_dma_mapping_error(il->pci_dev, phys_addr))) | ||
609 | goto drop_unlock; | ||
610 | } | ||
611 | |||
612 | /* Add buffer containing Tx command and MAC(!) header to TFD's | ||
613 | * first entry */ | ||
614 | il->ops->txq_attach_buf_to_tfd(il, txq, txcmd_phys, len, 1, 0); | ||
615 | dma_unmap_addr_set(out_meta, mapping, txcmd_phys); | ||
616 | dma_unmap_len_set(out_meta, len, len); | ||
617 | if (len) | ||
629 | il->ops->txq_attach_buf_to_tfd(il, txq, phys_addr, len, 0, | 618 | il->ops->txq_attach_buf_to_tfd(il, txq, phys_addr, len, 0, |
630 | U32_PAD(len)); | 619 | U32_PAD(len)); |
620 | |||
621 | if (!ieee80211_has_morefrags(hdr->frame_control)) { | ||
622 | txq->need_update = 1; | ||
623 | } else { | ||
624 | wait_write_ptr = 1; | ||
625 | txq->need_update = 0; | ||
631 | } | 626 | } |
632 | 627 | ||
628 | il_update_stats(il, true, fc, skb->len); | ||
629 | |||
630 | D_TX("sequence nr = 0X%x\n", le16_to_cpu(out_cmd->hdr.sequence)); | ||
631 | D_TX("tx_flags = 0X%x\n", le32_to_cpu(tx_cmd->tx_flags)); | ||
632 | il_print_hex_dump(il, IL_DL_TX, tx_cmd, sizeof(*tx_cmd)); | ||
633 | il_print_hex_dump(il, IL_DL_TX, (u8 *) tx_cmd->hdr, | ||
634 | ieee80211_hdrlen(fc)); | ||
635 | |||
633 | /* Tell device the write idx *just past* this latest filled TFD */ | 636 | /* Tell device the write idx *just past* this latest filled TFD */ |
634 | q->write_ptr = il_queue_inc_wrap(q->write_ptr, q->n_bd); | 637 | q->write_ptr = il_queue_inc_wrap(q->write_ptr, q->n_bd); |
635 | il_txq_update_write_ptr(il, txq); | 638 | il_txq_update_write_ptr(il, txq); |
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index 835662a449da..7941eb3a0166 100644 --- a/drivers/net/wireless/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c | |||
@@ -1793,8 +1793,7 @@ il4965_tx_skb(struct il_priv *il, | |||
1793 | memcpy(tx_cmd->hdr, hdr, hdr_len); | 1793 | memcpy(tx_cmd->hdr, hdr, hdr_len); |
1794 | 1794 | ||
1795 | /* Total # bytes to be transmitted */ | 1795 | /* Total # bytes to be transmitted */ |
1796 | len = (u16) skb->len; | 1796 | tx_cmd->len = cpu_to_le16((u16) skb->len); |
1797 | tx_cmd->len = cpu_to_le16(len); | ||
1798 | 1797 | ||
1799 | if (info->control.hw_key) | 1798 | if (info->control.hw_key) |
1800 | il4965_tx_cmd_build_hwcrypto(il, info, tx_cmd, skb, sta_id); | 1799 | il4965_tx_cmd_build_hwcrypto(il, info, tx_cmd, skb, sta_id); |
@@ -1804,7 +1803,6 @@ il4965_tx_skb(struct il_priv *il, | |||
1804 | 1803 | ||
1805 | il4965_tx_cmd_build_rate(il, tx_cmd, info, sta, fc); | 1804 | il4965_tx_cmd_build_rate(il, tx_cmd, info, sta, fc); |
1806 | 1805 | ||
1807 | il_update_stats(il, true, fc, len); | ||
1808 | /* | 1806 | /* |
1809 | * Use the first empty entry in this queue's command buffer array | 1807 | * Use the first empty entry in this queue's command buffer array |
1810 | * to contain the Tx command and MAC header concatenated together | 1808 | * to contain the Tx command and MAC header concatenated together |
@@ -1826,18 +1824,8 @@ il4965_tx_skb(struct il_priv *il, | |||
1826 | txcmd_phys = | 1824 | txcmd_phys = |
1827 | pci_map_single(il->pci_dev, &out_cmd->hdr, firstlen, | 1825 | pci_map_single(il->pci_dev, &out_cmd->hdr, firstlen, |
1828 | PCI_DMA_BIDIRECTIONAL); | 1826 | PCI_DMA_BIDIRECTIONAL); |
1829 | dma_unmap_addr_set(out_meta, mapping, txcmd_phys); | 1827 | if (unlikely(pci_dma_mapping_error(il->pci_dev, txcmd_phys))) |
1830 | dma_unmap_len_set(out_meta, len, firstlen); | 1828 | goto drop_unlock; |
1831 | /* Add buffer containing Tx command and MAC(!) header to TFD's | ||
1832 | * first entry */ | ||
1833 | il->ops->txq_attach_buf_to_tfd(il, txq, txcmd_phys, firstlen, 1, 0); | ||
1834 | |||
1835 | if (!ieee80211_has_morefrags(hdr->frame_control)) { | ||
1836 | txq->need_update = 1; | ||
1837 | } else { | ||
1838 | wait_write_ptr = 1; | ||
1839 | txq->need_update = 0; | ||
1840 | } | ||
1841 | 1829 | ||
1842 | /* Set up TFD's 2nd entry to point directly to remainder of skb, | 1830 | /* Set up TFD's 2nd entry to point directly to remainder of skb, |
1843 | * if any (802.11 null frames have no payload). */ | 1831 | * if any (802.11 null frames have no payload). */ |
@@ -1846,8 +1834,24 @@ il4965_tx_skb(struct il_priv *il, | |||
1846 | phys_addr = | 1834 | phys_addr = |
1847 | pci_map_single(il->pci_dev, skb->data + hdr_len, secondlen, | 1835 | pci_map_single(il->pci_dev, skb->data + hdr_len, secondlen, |
1848 | PCI_DMA_TODEVICE); | 1836 | PCI_DMA_TODEVICE); |
1837 | if (unlikely(pci_dma_mapping_error(il->pci_dev, phys_addr))) | ||
1838 | goto drop_unlock; | ||
1839 | } | ||
1840 | |||
1841 | /* Add buffer containing Tx command and MAC(!) header to TFD's | ||
1842 | * first entry */ | ||
1843 | il->ops->txq_attach_buf_to_tfd(il, txq, txcmd_phys, firstlen, 1, 0); | ||
1844 | dma_unmap_addr_set(out_meta, mapping, txcmd_phys); | ||
1845 | dma_unmap_len_set(out_meta, len, firstlen); | ||
1846 | if (secondlen) | ||
1849 | il->ops->txq_attach_buf_to_tfd(il, txq, phys_addr, secondlen, | 1847 | il->ops->txq_attach_buf_to_tfd(il, txq, phys_addr, secondlen, |
1850 | 0, 0); | 1848 | 0, 0); |
1849 | |||
1850 | if (!ieee80211_has_morefrags(hdr->frame_control)) { | ||
1851 | txq->need_update = 1; | ||
1852 | } else { | ||
1853 | wait_write_ptr = 1; | ||
1854 | txq->need_update = 0; | ||
1851 | } | 1855 | } |
1852 | 1856 | ||
1853 | scratch_phys = | 1857 | scratch_phys = |
@@ -1860,6 +1864,8 @@ il4965_tx_skb(struct il_priv *il, | |||
1860 | tx_cmd->dram_lsb_ptr = cpu_to_le32(scratch_phys); | 1864 | tx_cmd->dram_lsb_ptr = cpu_to_le32(scratch_phys); |
1861 | tx_cmd->dram_msb_ptr = il_get_dma_hi_addr(scratch_phys); | 1865 | tx_cmd->dram_msb_ptr = il_get_dma_hi_addr(scratch_phys); |
1862 | 1866 | ||
1867 | il_update_stats(il, true, fc, skb->len); | ||
1868 | |||
1863 | D_TX("sequence nr = 0X%x\n", le16_to_cpu(out_cmd->hdr.sequence)); | 1869 | D_TX("sequence nr = 0X%x\n", le16_to_cpu(out_cmd->hdr.sequence)); |
1864 | D_TX("tx_flags = 0X%x\n", le32_to_cpu(tx_cmd->tx_flags)); | 1870 | D_TX("tx_flags = 0X%x\n", le32_to_cpu(tx_cmd->tx_flags)); |
1865 | il_print_hex_dump(il, IL_DL_TX, (u8 *) tx_cmd, sizeof(*tx_cmd)); | 1871 | il_print_hex_dump(il, IL_DL_TX, (u8 *) tx_cmd, sizeof(*tx_cmd)); |
diff --git a/drivers/net/wireless/iwlegacy/4965-rs.c b/drivers/net/wireless/iwlegacy/4965-rs.c index f3b8e91aa3dc..e8324b5e5bfe 100644 --- a/drivers/net/wireless/iwlegacy/4965-rs.c +++ b/drivers/net/wireless/iwlegacy/4965-rs.c | |||
@@ -1183,8 +1183,7 @@ il4965_rs_switch_to_mimo2(struct il_priv *il, struct il_lq_sta *lq_sta, | |||
1183 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) | 1183 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) |
1184 | return -1; | 1184 | return -1; |
1185 | 1185 | ||
1186 | if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) == | 1186 | if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
1187 | WLAN_HT_CAP_SM_PS_STATIC) | ||
1188 | return -1; | 1187 | return -1; |
1189 | 1188 | ||
1190 | /* Need both Tx chains/antennas to support MIMO */ | 1189 | /* Need both Tx chains/antennas to support MIMO */ |
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index 1f598604a79c..e006ea831320 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c | |||
@@ -1830,32 +1830,30 @@ il_set_ht_add_station(struct il_priv *il, u8 idx, struct ieee80211_sta *sta) | |||
1830 | { | 1830 | { |
1831 | struct ieee80211_sta_ht_cap *sta_ht_inf = &sta->ht_cap; | 1831 | struct ieee80211_sta_ht_cap *sta_ht_inf = &sta->ht_cap; |
1832 | __le32 sta_flags; | 1832 | __le32 sta_flags; |
1833 | u8 mimo_ps_mode; | ||
1834 | 1833 | ||
1835 | if (!sta || !sta_ht_inf->ht_supported) | 1834 | if (!sta || !sta_ht_inf->ht_supported) |
1836 | goto done; | 1835 | goto done; |
1837 | 1836 | ||
1838 | mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_SM_PS) >> 2; | ||
1839 | D_ASSOC("spatial multiplexing power save mode: %s\n", | 1837 | D_ASSOC("spatial multiplexing power save mode: %s\n", |
1840 | (mimo_ps_mode == WLAN_HT_CAP_SM_PS_STATIC) ? "static" : | 1838 | (sta->smps_mode == IEEE80211_SMPS_STATIC) ? "static" : |
1841 | (mimo_ps_mode == WLAN_HT_CAP_SM_PS_DYNAMIC) ? "dynamic" : | 1839 | (sta->smps_mode == IEEE80211_SMPS_DYNAMIC) ? "dynamic" : |
1842 | "disabled"); | 1840 | "disabled"); |
1843 | 1841 | ||
1844 | sta_flags = il->stations[idx].sta.station_flags; | 1842 | sta_flags = il->stations[idx].sta.station_flags; |
1845 | 1843 | ||
1846 | sta_flags &= ~(STA_FLG_RTS_MIMO_PROT_MSK | STA_FLG_MIMO_DIS_MSK); | 1844 | sta_flags &= ~(STA_FLG_RTS_MIMO_PROT_MSK | STA_FLG_MIMO_DIS_MSK); |
1847 | 1845 | ||
1848 | switch (mimo_ps_mode) { | 1846 | switch (sta->smps_mode) { |
1849 | case WLAN_HT_CAP_SM_PS_STATIC: | 1847 | case IEEE80211_SMPS_STATIC: |
1850 | sta_flags |= STA_FLG_MIMO_DIS_MSK; | 1848 | sta_flags |= STA_FLG_MIMO_DIS_MSK; |
1851 | break; | 1849 | break; |
1852 | case WLAN_HT_CAP_SM_PS_DYNAMIC: | 1850 | case IEEE80211_SMPS_DYNAMIC: |
1853 | sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK; | 1851 | sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK; |
1854 | break; | 1852 | break; |
1855 | case WLAN_HT_CAP_SM_PS_DISABLED: | 1853 | case IEEE80211_SMPS_OFF: |
1856 | break; | 1854 | break; |
1857 | default: | 1855 | default: |
1858 | IL_WARN("Invalid MIMO PS mode %d\n", mimo_ps_mode); | 1856 | IL_WARN("Invalid MIMO PS mode %d\n", sta->smps_mode); |
1859 | break; | 1857 | break; |
1860 | } | 1858 | } |
1861 | 1859 | ||
@@ -3162,18 +3160,23 @@ il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd) | |||
3162 | idx, il->cmd_queue); | 3160 | idx, il->cmd_queue); |
3163 | } | 3161 | } |
3164 | #endif | 3162 | #endif |
3165 | txq->need_update = 1; | ||
3166 | |||
3167 | if (il->ops->txq_update_byte_cnt_tbl) | ||
3168 | /* Set up entry in queue's byte count circular buffer */ | ||
3169 | il->ops->txq_update_byte_cnt_tbl(il, txq, 0); | ||
3170 | 3163 | ||
3171 | phys_addr = | 3164 | phys_addr = |
3172 | pci_map_single(il->pci_dev, &out_cmd->hdr, fix_size, | 3165 | pci_map_single(il->pci_dev, &out_cmd->hdr, fix_size, |
3173 | PCI_DMA_BIDIRECTIONAL); | 3166 | PCI_DMA_BIDIRECTIONAL); |
3167 | if (unlikely(pci_dma_mapping_error(il->pci_dev, phys_addr))) { | ||
3168 | idx = -ENOMEM; | ||
3169 | goto out; | ||
3170 | } | ||
3174 | dma_unmap_addr_set(out_meta, mapping, phys_addr); | 3171 | dma_unmap_addr_set(out_meta, mapping, phys_addr); |
3175 | dma_unmap_len_set(out_meta, len, fix_size); | 3172 | dma_unmap_len_set(out_meta, len, fix_size); |
3176 | 3173 | ||
3174 | txq->need_update = 1; | ||
3175 | |||
3176 | if (il->ops->txq_update_byte_cnt_tbl) | ||
3177 | /* Set up entry in queue's byte count circular buffer */ | ||
3178 | il->ops->txq_update_byte_cnt_tbl(il, txq, 0); | ||
3179 | |||
3177 | il->ops->txq_attach_buf_to_tfd(il, txq, phys_addr, fix_size, 1, | 3180 | il->ops->txq_attach_buf_to_tfd(il, txq, phys_addr, fix_size, 1, |
3178 | U32_PAD(cmd->len)); | 3181 | U32_PAD(cmd->len)); |
3179 | 3182 | ||
@@ -3181,6 +3184,7 @@ il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd) | |||
3181 | q->write_ptr = il_queue_inc_wrap(q->write_ptr, q->n_bd); | 3184 | q->write_ptr = il_queue_inc_wrap(q->write_ptr, q->n_bd); |
3182 | il_txq_update_write_ptr(il, txq); | 3185 | il_txq_update_write_ptr(il, txq); |
3183 | 3186 | ||
3187 | out: | ||
3184 | spin_unlock_irqrestore(&il->hcmd_lock, flags); | 3188 | spin_unlock_irqrestore(&il->hcmd_lock, flags); |
3185 | return idx; | 3189 | return idx; |
3186 | } | 3190 | } |
diff --git a/drivers/net/wireless/iwlwifi/dvm/agn.h b/drivers/net/wireless/iwlwifi/dvm/agn.h index f41ae79e6bc0..41ec27cb6efe 100644 --- a/drivers/net/wireless/iwlwifi/dvm/agn.h +++ b/drivers/net/wireless/iwlwifi/dvm/agn.h | |||
@@ -338,7 +338,7 @@ int iwl_sta_update_ht(struct iwl_priv *priv, struct iwl_rxon_context *ctx, | |||
338 | 338 | ||
339 | bool iwl_is_ht40_tx_allowed(struct iwl_priv *priv, | 339 | bool iwl_is_ht40_tx_allowed(struct iwl_priv *priv, |
340 | struct iwl_rxon_context *ctx, | 340 | struct iwl_rxon_context *ctx, |
341 | struct ieee80211_sta_ht_cap *ht_cap); | 341 | struct ieee80211_sta *sta); |
342 | 342 | ||
343 | static inline int iwl_sta_id(struct ieee80211_sta *sta) | 343 | static inline int iwl_sta_id(struct ieee80211_sta *sta) |
344 | { | 344 | { |
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c index ebbfcf47c732..323e4a33fcac 100644 --- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c | |||
@@ -151,8 +151,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, | |||
151 | IEEE80211_HW_QUEUE_CONTROL | | 151 | IEEE80211_HW_QUEUE_CONTROL | |
152 | IEEE80211_HW_SUPPORTS_PS | | 152 | IEEE80211_HW_SUPPORTS_PS | |
153 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS | | 153 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS | |
154 | IEEE80211_HW_WANT_MONITOR_VIF | | 154 | IEEE80211_HW_WANT_MONITOR_VIF; |
155 | IEEE80211_HW_SCAN_WHILE_IDLE; | ||
156 | 155 | ||
157 | hw->offchannel_tx_hw_queue = IWL_AUX_QUEUE; | 156 | hw->offchannel_tx_hw_queue = IWL_AUX_QUEUE; |
158 | hw->radiotap_mcs_details |= IEEE80211_RADIOTAP_MCS_HAVE_FMT; | 157 | hw->radiotap_mcs_details |= IEEE80211_RADIOTAP_MCS_HAVE_FMT; |
diff --git a/drivers/net/wireless/iwlwifi/dvm/rs.c b/drivers/net/wireless/iwlwifi/dvm/rs.c index a131227c49e9..abe304267261 100644 --- a/drivers/net/wireless/iwlwifi/dvm/rs.c +++ b/drivers/net/wireless/iwlwifi/dvm/rs.c | |||
@@ -1289,8 +1289,7 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv, | |||
1289 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) | 1289 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) |
1290 | return -1; | 1290 | return -1; |
1291 | 1291 | ||
1292 | if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) | 1292 | if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
1293 | == WLAN_HT_CAP_SM_PS_STATIC) | ||
1294 | return -1; | 1293 | return -1; |
1295 | 1294 | ||
1296 | /* Need both Tx chains/antennas to support MIMO */ | 1295 | /* Need both Tx chains/antennas to support MIMO */ |
@@ -1305,7 +1304,7 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv, | |||
1305 | tbl->max_search = IWL_MAX_SEARCH; | 1304 | tbl->max_search = IWL_MAX_SEARCH; |
1306 | rate_mask = lq_sta->active_mimo2_rate; | 1305 | rate_mask = lq_sta->active_mimo2_rate; |
1307 | 1306 | ||
1308 | if (iwl_is_ht40_tx_allowed(priv, ctx, &sta->ht_cap)) | 1307 | if (iwl_is_ht40_tx_allowed(priv, ctx, sta)) |
1309 | tbl->is_ht40 = 1; | 1308 | tbl->is_ht40 = 1; |
1310 | else | 1309 | else |
1311 | tbl->is_ht40 = 0; | 1310 | tbl->is_ht40 = 0; |
@@ -1345,8 +1344,7 @@ static int rs_switch_to_mimo3(struct iwl_priv *priv, | |||
1345 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) | 1344 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) |
1346 | return -1; | 1345 | return -1; |
1347 | 1346 | ||
1348 | if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) | 1347 | if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
1349 | == WLAN_HT_CAP_SM_PS_STATIC) | ||
1350 | return -1; | 1348 | return -1; |
1351 | 1349 | ||
1352 | /* Need both Tx chains/antennas to support MIMO */ | 1350 | /* Need both Tx chains/antennas to support MIMO */ |
@@ -1361,7 +1359,7 @@ static int rs_switch_to_mimo3(struct iwl_priv *priv, | |||
1361 | tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; | 1359 | tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; |
1362 | rate_mask = lq_sta->active_mimo3_rate; | 1360 | rate_mask = lq_sta->active_mimo3_rate; |
1363 | 1361 | ||
1364 | if (iwl_is_ht40_tx_allowed(priv, ctx, &sta->ht_cap)) | 1362 | if (iwl_is_ht40_tx_allowed(priv, ctx, sta)) |
1365 | tbl->is_ht40 = 1; | 1363 | tbl->is_ht40 = 1; |
1366 | else | 1364 | else |
1367 | tbl->is_ht40 = 0; | 1365 | tbl->is_ht40 = 0; |
@@ -1410,7 +1408,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv, | |||
1410 | tbl->max_search = IWL_MAX_SEARCH; | 1408 | tbl->max_search = IWL_MAX_SEARCH; |
1411 | rate_mask = lq_sta->active_siso_rate; | 1409 | rate_mask = lq_sta->active_siso_rate; |
1412 | 1410 | ||
1413 | if (iwl_is_ht40_tx_allowed(priv, ctx, &sta->ht_cap)) | 1411 | if (iwl_is_ht40_tx_allowed(priv, ctx, sta)) |
1414 | tbl->is_ht40 = 1; | 1412 | tbl->is_ht40 = 1; |
1415 | else | 1413 | else |
1416 | tbl->is_ht40 = 0; | 1414 | tbl->is_ht40 = 0; |
diff --git a/drivers/net/wireless/iwlwifi/dvm/sta.c b/drivers/net/wireless/iwlwifi/dvm/sta.c index 2d33760a9dc2..94ef33838bc6 100644 --- a/drivers/net/wireless/iwlwifi/dvm/sta.c +++ b/drivers/net/wireless/iwlwifi/dvm/sta.c | |||
@@ -173,7 +173,7 @@ int iwl_send_add_sta(struct iwl_priv *priv, | |||
173 | 173 | ||
174 | bool iwl_is_ht40_tx_allowed(struct iwl_priv *priv, | 174 | bool iwl_is_ht40_tx_allowed(struct iwl_priv *priv, |
175 | struct iwl_rxon_context *ctx, | 175 | struct iwl_rxon_context *ctx, |
176 | struct ieee80211_sta_ht_cap *ht_cap) | 176 | struct ieee80211_sta *sta) |
177 | { | 177 | { |
178 | if (!ctx->ht.enabled || !ctx->ht.is_40mhz) | 178 | if (!ctx->ht.enabled || !ctx->ht.is_40mhz) |
179 | return false; | 179 | return false; |
@@ -183,20 +183,11 @@ bool iwl_is_ht40_tx_allowed(struct iwl_priv *priv, | |||
183 | return false; | 183 | return false; |
184 | #endif | 184 | #endif |
185 | 185 | ||
186 | /* | 186 | /* special case for RXON */ |
187 | * Remainder of this function checks ht_cap, but if it's | 187 | if (!sta) |
188 | * NULL then we can do HT40 (special case for RXON) | ||
189 | */ | ||
190 | if (!ht_cap) | ||
191 | return true; | 188 | return true; |
192 | 189 | ||
193 | if (!ht_cap->ht_supported) | 190 | return sta->bandwidth >= IEEE80211_STA_RX_BW_40; |
194 | return false; | ||
195 | |||
196 | if (!(ht_cap->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)) | ||
197 | return false; | ||
198 | |||
199 | return true; | ||
200 | } | 191 | } |
201 | 192 | ||
202 | static void iwl_sta_calc_ht_flags(struct iwl_priv *priv, | 193 | static void iwl_sta_calc_ht_flags(struct iwl_priv *priv, |
@@ -205,7 +196,6 @@ static void iwl_sta_calc_ht_flags(struct iwl_priv *priv, | |||
205 | __le32 *flags, __le32 *mask) | 196 | __le32 *flags, __le32 *mask) |
206 | { | 197 | { |
207 | struct ieee80211_sta_ht_cap *sta_ht_inf = &sta->ht_cap; | 198 | struct ieee80211_sta_ht_cap *sta_ht_inf = &sta->ht_cap; |
208 | u8 mimo_ps_mode; | ||
209 | 199 | ||
210 | *mask = STA_FLG_RTS_MIMO_PROT_MSK | | 200 | *mask = STA_FLG_RTS_MIMO_PROT_MSK | |
211 | STA_FLG_MIMO_DIS_MSK | | 201 | STA_FLG_MIMO_DIS_MSK | |
@@ -217,26 +207,24 @@ static void iwl_sta_calc_ht_flags(struct iwl_priv *priv, | |||
217 | if (!sta || !sta_ht_inf->ht_supported) | 207 | if (!sta || !sta_ht_inf->ht_supported) |
218 | return; | 208 | return; |
219 | 209 | ||
220 | mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_SM_PS) >> 2; | ||
221 | |||
222 | IWL_DEBUG_INFO(priv, "STA %pM SM PS mode: %s\n", | 210 | IWL_DEBUG_INFO(priv, "STA %pM SM PS mode: %s\n", |
223 | sta->addr, | 211 | sta->addr, |
224 | (mimo_ps_mode == WLAN_HT_CAP_SM_PS_STATIC) ? | 212 | (sta->smps_mode == IEEE80211_SMPS_STATIC) ? |
225 | "static" : | 213 | "static" : |
226 | (mimo_ps_mode == WLAN_HT_CAP_SM_PS_DYNAMIC) ? | 214 | (sta->smps_mode == IEEE80211_SMPS_DYNAMIC) ? |
227 | "dynamic" : "disabled"); | 215 | "dynamic" : "disabled"); |
228 | 216 | ||
229 | switch (mimo_ps_mode) { | 217 | switch (sta->smps_mode) { |
230 | case WLAN_HT_CAP_SM_PS_STATIC: | 218 | case IEEE80211_SMPS_STATIC: |
231 | *flags |= STA_FLG_MIMO_DIS_MSK; | 219 | *flags |= STA_FLG_MIMO_DIS_MSK; |
232 | break; | 220 | break; |
233 | case WLAN_HT_CAP_SM_PS_DYNAMIC: | 221 | case IEEE80211_SMPS_DYNAMIC: |
234 | *flags |= STA_FLG_RTS_MIMO_PROT_MSK; | 222 | *flags |= STA_FLG_RTS_MIMO_PROT_MSK; |
235 | break; | 223 | break; |
236 | case WLAN_HT_CAP_SM_PS_DISABLED: | 224 | case IEEE80211_SMPS_OFF: |
237 | break; | 225 | break; |
238 | default: | 226 | default: |
239 | IWL_WARN(priv, "Invalid MIMO PS mode %d\n", mimo_ps_mode); | 227 | IWL_WARN(priv, "Invalid MIMO PS mode %d\n", sta->smps_mode); |
240 | break; | 228 | break; |
241 | } | 229 | } |
242 | 230 | ||
@@ -246,7 +234,7 @@ static void iwl_sta_calc_ht_flags(struct iwl_priv *priv, | |||
246 | *flags |= cpu_to_le32( | 234 | *flags |= cpu_to_le32( |
247 | (u32)sta_ht_inf->ampdu_density << STA_FLG_AGG_MPDU_DENSITY_POS); | 235 | (u32)sta_ht_inf->ampdu_density << STA_FLG_AGG_MPDU_DENSITY_POS); |
248 | 236 | ||
249 | if (iwl_is_ht40_tx_allowed(priv, ctx, &sta->ht_cap)) | 237 | if (iwl_is_ht40_tx_allowed(priv, ctx, sta)) |
250 | *flags |= STA_FLG_HT40_EN_MSK; | 238 | *flags |= STA_FLG_HT40_EN_MSK; |
251 | } | 239 | } |
252 | 240 | ||
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c index 4ece5ea81b86..d1dccb361391 100644 --- a/drivers/net/wireless/iwlwifi/dvm/tx.c +++ b/drivers/net/wireless/iwlwifi/dvm/tx.c | |||
@@ -1145,6 +1145,13 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb, | |||
1145 | next_reclaimed = ssn; | 1145 | next_reclaimed = ssn; |
1146 | } | 1146 | } |
1147 | 1147 | ||
1148 | if (tid != IWL_TID_NON_QOS) { | ||
1149 | priv->tid_data[sta_id][tid].next_reclaimed = | ||
1150 | next_reclaimed; | ||
1151 | IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n", | ||
1152 | next_reclaimed); | ||
1153 | } | ||
1154 | |||
1148 | iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs); | 1155 | iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs); |
1149 | 1156 | ||
1150 | iwlagn_check_ratid_empty(priv, sta_id, tid); | 1157 | iwlagn_check_ratid_empty(priv, sta_id, tid); |
@@ -1195,16 +1202,6 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb, | |||
1195 | if (!is_agg) | 1202 | if (!is_agg) |
1196 | iwlagn_non_agg_tx_status(priv, ctx, hdr->addr1); | 1203 | iwlagn_non_agg_tx_status(priv, ctx, hdr->addr1); |
1197 | 1204 | ||
1198 | /* | ||
1199 | * W/A for FW bug - the seq_ctl isn't updated when the | ||
1200 | * queues are flushed. Fetch it from the packet itself | ||
1201 | */ | ||
1202 | if (!is_agg && status == TX_STATUS_FAIL_FIFO_FLUSHED) { | ||
1203 | next_reclaimed = le16_to_cpu(hdr->seq_ctrl); | ||
1204 | next_reclaimed = | ||
1205 | SEQ_TO_SN(next_reclaimed + 0x10); | ||
1206 | } | ||
1207 | |||
1208 | is_offchannel_skb = | 1205 | is_offchannel_skb = |
1209 | (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN); | 1206 | (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN); |
1210 | freed++; | 1207 | freed++; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 5bdcbcfee0c5..e27eb9724112 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -113,7 +113,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) | |||
113 | IEEE80211_HW_REPORTS_TX_ACK_STATUS | | 113 | IEEE80211_HW_REPORTS_TX_ACK_STATUS | |
114 | IEEE80211_HW_QUEUE_CONTROL | | 114 | IEEE80211_HW_QUEUE_CONTROL | |
115 | IEEE80211_HW_WANT_MONITOR_VIF | | 115 | IEEE80211_HW_WANT_MONITOR_VIF | |
116 | IEEE80211_HW_SCAN_WHILE_IDLE | | 116 | IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC | |
117 | IEEE80211_HW_SUPPORTS_PS | | 117 | IEEE80211_HW_SUPPORTS_PS | |
118 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS | | 118 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS | |
119 | IEEE80211_HW_AMPDU_AGGREGATION; | 119 | IEEE80211_HW_AMPDU_AGGREGATION; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c index 60a4291ca221..56b636d9ab30 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c | |||
@@ -1209,23 +1209,9 @@ static s32 rs_get_best_rate(struct iwl_mvm *mvm, | |||
1209 | return new_rate; | 1209 | return new_rate; |
1210 | } | 1210 | } |
1211 | 1211 | ||
1212 | static bool iwl_is_ht40_tx_allowed(struct iwl_mvm *mvm, | 1212 | static bool iwl_is_ht40_tx_allowed(struct ieee80211_sta *sta) |
1213 | struct ieee80211_sta_ht_cap *ht_cap) | ||
1214 | { | 1213 | { |
1215 | /* | 1214 | return sta->bandwidth >= IEEE80211_STA_RX_BW_40; |
1216 | * Remainder of this function checks ht_cap, but if it's | ||
1217 | * NULL then we can do HT40 (special case for RXON) | ||
1218 | */ | ||
1219 | if (!ht_cap) | ||
1220 | return true; | ||
1221 | |||
1222 | if (!ht_cap->ht_supported) | ||
1223 | return false; | ||
1224 | |||
1225 | if (!(ht_cap->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)) | ||
1226 | return false; | ||
1227 | |||
1228 | return true; | ||
1229 | } | 1215 | } |
1230 | 1216 | ||
1231 | /* | 1217 | /* |
@@ -1243,8 +1229,7 @@ static int rs_switch_to_mimo2(struct iwl_mvm *mvm, | |||
1243 | if (!sta->ht_cap.ht_supported) | 1229 | if (!sta->ht_cap.ht_supported) |
1244 | return -1; | 1230 | return -1; |
1245 | 1231 | ||
1246 | if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) | 1232 | if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
1247 | == WLAN_HT_CAP_SM_PS_STATIC) | ||
1248 | return -1; | 1233 | return -1; |
1249 | 1234 | ||
1250 | /* Need both Tx chains/antennas to support MIMO */ | 1235 | /* Need both Tx chains/antennas to support MIMO */ |
@@ -1258,7 +1243,7 @@ static int rs_switch_to_mimo2(struct iwl_mvm *mvm, | |||
1258 | tbl->max_search = IWL_MAX_SEARCH; | 1243 | tbl->max_search = IWL_MAX_SEARCH; |
1259 | rate_mask = lq_sta->active_mimo2_rate; | 1244 | rate_mask = lq_sta->active_mimo2_rate; |
1260 | 1245 | ||
1261 | if (iwl_is_ht40_tx_allowed(mvm, &sta->ht_cap)) | 1246 | if (iwl_is_ht40_tx_allowed(sta)) |
1262 | tbl->is_ht40 = 1; | 1247 | tbl->is_ht40 = 1; |
1263 | else | 1248 | else |
1264 | tbl->is_ht40 = 0; | 1249 | tbl->is_ht40 = 0; |
@@ -1296,8 +1281,7 @@ static int rs_switch_to_mimo3(struct iwl_mvm *mvm, | |||
1296 | if (!sta->ht_cap.ht_supported) | 1281 | if (!sta->ht_cap.ht_supported) |
1297 | return -1; | 1282 | return -1; |
1298 | 1283 | ||
1299 | if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) | 1284 | if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
1300 | == WLAN_HT_CAP_SM_PS_STATIC) | ||
1301 | return -1; | 1285 | return -1; |
1302 | 1286 | ||
1303 | /* Need both Tx chains/antennas to support MIMO */ | 1287 | /* Need both Tx chains/antennas to support MIMO */ |
@@ -1311,7 +1295,7 @@ static int rs_switch_to_mimo3(struct iwl_mvm *mvm, | |||
1311 | tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; | 1295 | tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; |
1312 | rate_mask = lq_sta->active_mimo3_rate; | 1296 | rate_mask = lq_sta->active_mimo3_rate; |
1313 | 1297 | ||
1314 | if (iwl_is_ht40_tx_allowed(mvm, &sta->ht_cap)) | 1298 | if (iwl_is_ht40_tx_allowed(sta)) |
1315 | tbl->is_ht40 = 1; | 1299 | tbl->is_ht40 = 1; |
1316 | else | 1300 | else |
1317 | tbl->is_ht40 = 0; | 1301 | tbl->is_ht40 = 0; |
@@ -1356,7 +1340,7 @@ static int rs_switch_to_siso(struct iwl_mvm *mvm, | |||
1356 | tbl->max_search = IWL_MAX_SEARCH; | 1340 | tbl->max_search = IWL_MAX_SEARCH; |
1357 | rate_mask = lq_sta->active_siso_rate; | 1341 | rate_mask = lq_sta->active_siso_rate; |
1358 | 1342 | ||
1359 | if (iwl_is_ht40_tx_allowed(mvm, &sta->ht_cap)) | 1343 | if (iwl_is_ht40_tx_allowed(sta)) |
1360 | tbl->is_ht40 = 1; | 1344 | tbl->is_ht40 = 1; |
1361 | else | 1345 | else |
1362 | tbl->is_ht40 = 0; | 1346 | tbl->is_ht40 = 0; |
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index 230f8ebbe289..61735db3b051 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c | |||
@@ -657,7 +657,7 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, | |||
657 | capa, intvl, ie, ielen, | 657 | capa, intvl, ie, ielen, |
658 | LBS_SCAN_RSSI_TO_MBM(rssi), | 658 | LBS_SCAN_RSSI_TO_MBM(rssi), |
659 | GFP_KERNEL); | 659 | GFP_KERNEL); |
660 | cfg80211_put_bss(bss); | 660 | cfg80211_put_bss(wiphy, bss); |
661 | } | 661 | } |
662 | } else | 662 | } else |
663 | lbs_deb_scan("scan response: missing BSS channel IE\n"); | 663 | lbs_deb_scan("scan response: missing BSS channel IE\n"); |
@@ -1444,7 +1444,7 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev, | |||
1444 | 1444 | ||
1445 | done: | 1445 | done: |
1446 | if (bss) | 1446 | if (bss) |
1447 | cfg80211_put_bss(bss); | 1447 | cfg80211_put_bss(wiphy, bss); |
1448 | lbs_deb_leave_args(LBS_DEB_CFG80211, "ret %d", ret); | 1448 | lbs_deb_leave_args(LBS_DEB_CFG80211, "ret %d", ret); |
1449 | return ret; | 1449 | return ret; |
1450 | } | 1450 | } |
@@ -1766,7 +1766,7 @@ static void lbs_join_post(struct lbs_private *priv, | |||
1766 | params->beacon_interval, | 1766 | params->beacon_interval, |
1767 | fake_ie, fake - fake_ie, | 1767 | fake_ie, fake - fake_ie, |
1768 | 0, GFP_KERNEL); | 1768 | 0, GFP_KERNEL); |
1769 | cfg80211_put_bss(bss); | 1769 | cfg80211_put_bss(priv->wdev->wiphy, bss); |
1770 | 1770 | ||
1771 | memcpy(priv->wdev->ssid, params->ssid, params->ssid_len); | 1771 | memcpy(priv->wdev->ssid, params->ssid, params->ssid_len); |
1772 | priv->wdev->ssid_len = params->ssid_len; | 1772 | priv->wdev->ssid_len = params->ssid_len; |
@@ -2011,7 +2011,7 @@ static int lbs_join_ibss(struct wiphy *wiphy, struct net_device *dev, | |||
2011 | 2011 | ||
2012 | if (bss) { | 2012 | if (bss) { |
2013 | ret = lbs_ibss_join_existing(priv, params, bss); | 2013 | ret = lbs_ibss_join_existing(priv, params, bss); |
2014 | cfg80211_put_bss(bss); | 2014 | cfg80211_put_bss(wiphy, bss); |
2015 | } else | 2015 | } else |
2016 | ret = lbs_ibss_start_new(priv, params); | 2016 | ret = lbs_ibss_start_new(priv, params); |
2017 | 2017 | ||
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index b73e497fe770..cffdf4fbf161 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -2247,6 +2247,7 @@ static int __init init_mac80211_hwsim(void) | |||
2247 | /* ask mac80211 to reserve space for magic */ | 2247 | /* ask mac80211 to reserve space for magic */ |
2248 | hw->vif_data_size = sizeof(struct hwsim_vif_priv); | 2248 | hw->vif_data_size = sizeof(struct hwsim_vif_priv); |
2249 | hw->sta_data_size = sizeof(struct hwsim_sta_priv); | 2249 | hw->sta_data_size = sizeof(struct hwsim_sta_priv); |
2250 | hw->chanctx_data_size = sizeof(struct hwsim_chanctx_priv); | ||
2250 | 2251 | ||
2251 | memcpy(data->channels_2ghz, hwsim_channels_2ghz, | 2252 | memcpy(data->channels_2ghz, hwsim_channels_2ghz, |
2252 | sizeof(hwsim_channels_2ghz)); | 2253 | sizeof(hwsim_channels_2ghz)); |
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 3a004b85b99f..81c84a29308f 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -1430,7 +1430,7 @@ static int mwifiex_cfg80211_inform_ibss_bss(struct mwifiex_private *priv) | |||
1430 | bss = cfg80211_inform_bss(priv->wdev->wiphy, chan, | 1430 | bss = cfg80211_inform_bss(priv->wdev->wiphy, chan, |
1431 | bss_info.bssid, 0, WLAN_CAPABILITY_IBSS, | 1431 | bss_info.bssid, 0, WLAN_CAPABILITY_IBSS, |
1432 | 0, ie_buf, ie_len, 0, GFP_KERNEL); | 1432 | 0, ie_buf, ie_len, 0, GFP_KERNEL); |
1433 | cfg80211_put_bss(bss); | 1433 | cfg80211_put_bss(priv->wdev->wiphy, bss); |
1434 | memcpy(priv->cfg_bssid, bss_info.bssid, ETH_ALEN); | 1434 | memcpy(priv->cfg_bssid, bss_info.bssid, ETH_ALEN); |
1435 | 1435 | ||
1436 | return 0; | 1436 | return 0; |
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index 3b9be7c185cb..492655c048d1 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c | |||
@@ -62,6 +62,10 @@ static bool mwifiex_pcie_ok_to_access_hw(struct mwifiex_adapter *adapter) | |||
62 | { | 62 | { |
63 | u32 *cookie_addr; | 63 | u32 *cookie_addr; |
64 | struct pcie_service_card *card = adapter->card; | 64 | struct pcie_service_card *card = adapter->card; |
65 | const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; | ||
66 | |||
67 | if (!reg->sleep_cookie) | ||
68 | return true; | ||
65 | 69 | ||
66 | if (card->sleep_cookie_vbase) { | 70 | if (card->sleep_cookie_vbase) { |
67 | cookie_addr = (u32 *)card->sleep_cookie_vbase; | 71 | cookie_addr = (u32 *)card->sleep_cookie_vbase; |
@@ -299,8 +303,10 @@ static int mwifiex_read_reg(struct mwifiex_adapter *adapter, int reg, u32 *data) | |||
299 | static int mwifiex_pm_wakeup_card(struct mwifiex_adapter *adapter) | 303 | static int mwifiex_pm_wakeup_card(struct mwifiex_adapter *adapter) |
300 | { | 304 | { |
301 | int i = 0; | 305 | int i = 0; |
306 | struct pcie_service_card *card = adapter->card; | ||
307 | const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; | ||
302 | 308 | ||
303 | while (mwifiex_pcie_ok_to_access_hw(adapter)) { | 309 | while (reg->sleep_cookie && mwifiex_pcie_ok_to_access_hw(adapter)) { |
304 | i++; | 310 | i++; |
305 | usleep_range(10, 20); | 311 | usleep_range(10, 20); |
306 | /* 50ms max wait */ | 312 | /* 50ms max wait */ |
@@ -1513,8 +1519,8 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter) | |||
1513 | if (adapter->ps_state == PS_STATE_SLEEP_CFM) { | 1519 | if (adapter->ps_state == PS_STATE_SLEEP_CFM) { |
1514 | mwifiex_process_sleep_confirm_resp(adapter, skb->data, | 1520 | mwifiex_process_sleep_confirm_resp(adapter, skb->data, |
1515 | skb->len); | 1521 | skb->len); |
1516 | while (mwifiex_pcie_ok_to_access_hw(adapter) && | 1522 | while (reg->sleep_cookie && (count++ < 10) && |
1517 | (count++ < 10)) | 1523 | mwifiex_pcie_ok_to_access_hw(adapter)) |
1518 | usleep_range(50, 60); | 1524 | usleep_range(50, 60); |
1519 | } else { | 1525 | } else { |
1520 | dev_err(adapter->dev, | 1526 | dev_err(adapter->dev, |
@@ -2172,6 +2178,7 @@ static int mwifiex_pcie_init(struct mwifiex_adapter *adapter) | |||
2172 | struct pcie_service_card *card = adapter->card; | 2178 | struct pcie_service_card *card = adapter->card; |
2173 | int ret; | 2179 | int ret; |
2174 | struct pci_dev *pdev = card->dev; | 2180 | struct pci_dev *pdev = card->dev; |
2181 | const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; | ||
2175 | 2182 | ||
2176 | pci_set_drvdata(pdev, card); | 2183 | pci_set_drvdata(pdev, card); |
2177 | 2184 | ||
@@ -2234,10 +2241,13 @@ static int mwifiex_pcie_init(struct mwifiex_adapter *adapter) | |||
2234 | ret = mwifiex_pcie_alloc_cmdrsp_buf(adapter); | 2241 | ret = mwifiex_pcie_alloc_cmdrsp_buf(adapter); |
2235 | if (ret) | 2242 | if (ret) |
2236 | goto err_alloc_cmdbuf; | 2243 | goto err_alloc_cmdbuf; |
2237 | ret = mwifiex_pcie_alloc_sleep_cookie_buf(adapter); | 2244 | if (reg->sleep_cookie) { |
2238 | if (ret) | 2245 | ret = mwifiex_pcie_alloc_sleep_cookie_buf(adapter); |
2239 | goto err_alloc_cookie; | 2246 | if (ret) |
2240 | 2247 | goto err_alloc_cookie; | |
2248 | } else { | ||
2249 | card->sleep_cookie_vbase = NULL; | ||
2250 | } | ||
2241 | return ret; | 2251 | return ret; |
2242 | 2252 | ||
2243 | err_alloc_cookie: | 2253 | err_alloc_cookie: |
@@ -2334,12 +2344,16 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) | |||
2334 | static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter) | 2344 | static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter) |
2335 | { | 2345 | { |
2336 | struct pcie_service_card *card = adapter->card; | 2346 | struct pcie_service_card *card = adapter->card; |
2347 | const struct mwifiex_pcie_card_reg *reg; | ||
2337 | 2348 | ||
2338 | if (card) { | 2349 | if (card) { |
2339 | dev_dbg(adapter->dev, "%s(): calling free_irq()\n", __func__); | 2350 | dev_dbg(adapter->dev, "%s(): calling free_irq()\n", __func__); |
2340 | free_irq(card->dev->irq, card->dev); | 2351 | free_irq(card->dev->irq, card->dev); |
2341 | 2352 | ||
2342 | mwifiex_pcie_delete_sleep_cookie_buf(adapter); | 2353 | reg = card->pcie.reg; |
2354 | if (reg->sleep_cookie) | ||
2355 | mwifiex_pcie_delete_sleep_cookie_buf(adapter); | ||
2356 | |||
2343 | mwifiex_pcie_delete_cmdrsp_buf(adapter); | 2357 | mwifiex_pcie_delete_cmdrsp_buf(adapter); |
2344 | mwifiex_pcie_delete_evtbd_ring(adapter); | 2358 | mwifiex_pcie_delete_evtbd_ring(adapter); |
2345 | mwifiex_pcie_delete_rxbd_ring(adapter); | 2359 | mwifiex_pcie_delete_rxbd_ring(adapter); |
diff --git a/drivers/net/wireless/mwifiex/pcie.h b/drivers/net/wireless/mwifiex/pcie.h index 608061578b37..d322ab8604ea 100644 --- a/drivers/net/wireless/mwifiex/pcie.h +++ b/drivers/net/wireless/mwifiex/pcie.h | |||
@@ -126,6 +126,7 @@ struct mwifiex_pcie_card_reg { | |||
126 | u8 ring_flag_xs_eop; | 126 | u8 ring_flag_xs_eop; |
127 | u32 ring_tx_start_ptr; | 127 | u32 ring_tx_start_ptr; |
128 | u8 pfu_enabled; | 128 | u8 pfu_enabled; |
129 | u8 sleep_cookie; | ||
129 | }; | 130 | }; |
130 | 131 | ||
131 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = { | 132 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = { |
@@ -156,6 +157,7 @@ static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = { | |||
156 | .ring_flag_xs_eop = 0, | 157 | .ring_flag_xs_eop = 0, |
157 | .ring_tx_start_ptr = 0, | 158 | .ring_tx_start_ptr = 0, |
158 | .pfu_enabled = 0, | 159 | .pfu_enabled = 0, |
160 | .sleep_cookie = 1, | ||
159 | }; | 161 | }; |
160 | 162 | ||
161 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = { | 163 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = { |
@@ -186,6 +188,7 @@ static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = { | |||
186 | .ring_flag_xs_eop = MWIFIEX_BD_FLAG_XS_EOP, | 188 | .ring_flag_xs_eop = MWIFIEX_BD_FLAG_XS_EOP, |
187 | .ring_tx_start_ptr = MWIFIEX_BD_FLAG_TX_START_PTR, | 189 | .ring_tx_start_ptr = MWIFIEX_BD_FLAG_TX_START_PTR, |
188 | .pfu_enabled = 1, | 190 | .pfu_enabled = 1, |
191 | .sleep_cookie = 0, | ||
189 | }; | 192 | }; |
190 | 193 | ||
191 | struct mwifiex_pcie_device { | 194 | struct mwifiex_pcie_device { |
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index 9189a32b7844..949234fcf8c6 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c | |||
@@ -1563,7 +1563,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, | |||
1563 | dev_err(adapter->dev, "SCAN_RESP: too many AP returned (%d)\n", | 1563 | dev_err(adapter->dev, "SCAN_RESP: too many AP returned (%d)\n", |
1564 | scan_rsp->number_of_sets); | 1564 | scan_rsp->number_of_sets); |
1565 | ret = -1; | 1565 | ret = -1; |
1566 | goto done; | 1566 | goto check_next_scan; |
1567 | } | 1567 | } |
1568 | 1568 | ||
1569 | bytes_left = le16_to_cpu(scan_rsp->bss_descript_size); | 1569 | bytes_left = le16_to_cpu(scan_rsp->bss_descript_size); |
@@ -1634,7 +1634,8 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, | |||
1634 | if (!beacon_size || beacon_size > bytes_left) { | 1634 | if (!beacon_size || beacon_size > bytes_left) { |
1635 | bss_info += bytes_left; | 1635 | bss_info += bytes_left; |
1636 | bytes_left = 0; | 1636 | bytes_left = 0; |
1637 | return -1; | 1637 | ret = -1; |
1638 | goto check_next_scan; | ||
1638 | } | 1639 | } |
1639 | 1640 | ||
1640 | /* Initialize the current working beacon pointer for this BSS | 1641 | /* Initialize the current working beacon pointer for this BSS |
@@ -1690,7 +1691,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, | |||
1690 | dev_err(priv->adapter->dev, | 1691 | dev_err(priv->adapter->dev, |
1691 | "%s: bytes left < IE length\n", | 1692 | "%s: bytes left < IE length\n", |
1692 | __func__); | 1693 | __func__); |
1693 | goto done; | 1694 | goto check_next_scan; |
1694 | } | 1695 | } |
1695 | if (element_id == WLAN_EID_DS_PARAMS) { | 1696 | if (element_id == WLAN_EID_DS_PARAMS) { |
1696 | channel = *(current_ptr + sizeof(struct ieee_types_header)); | 1697 | channel = *(current_ptr + sizeof(struct ieee_types_header)); |
@@ -1746,13 +1747,14 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, | |||
1746 | .mac_address, ETH_ALEN)) | 1747 | .mac_address, ETH_ALEN)) |
1747 | mwifiex_update_curr_bss_params(priv, | 1748 | mwifiex_update_curr_bss_params(priv, |
1748 | bss); | 1749 | bss); |
1749 | cfg80211_put_bss(bss); | 1750 | cfg80211_put_bss(priv->wdev->wiphy, bss); |
1750 | } | 1751 | } |
1751 | } else { | 1752 | } else { |
1752 | dev_dbg(adapter->dev, "missing BSS channel IE\n"); | 1753 | dev_dbg(adapter->dev, "missing BSS channel IE\n"); |
1753 | } | 1754 | } |
1754 | } | 1755 | } |
1755 | 1756 | ||
1757 | check_next_scan: | ||
1756 | spin_lock_irqsave(&adapter->scan_pending_q_lock, flags); | 1758 | spin_lock_irqsave(&adapter->scan_pending_q_lock, flags); |
1757 | if (list_empty(&adapter->scan_pending_q)) { | 1759 | if (list_empty(&adapter->scan_pending_q)) { |
1758 | spin_unlock_irqrestore(&adapter->scan_pending_q_lock, flags); | 1760 | spin_unlock_irqrestore(&adapter->scan_pending_q_lock, flags); |
@@ -1813,7 +1815,6 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, | |||
1813 | } | 1815 | } |
1814 | } | 1816 | } |
1815 | 1817 | ||
1816 | done: | ||
1817 | return ret; | 1818 | return ret; |
1818 | } | 1819 | } |
1819 | 1820 | ||
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index f542bb8ccbc8..0d018460daf9 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c | |||
@@ -162,13 +162,9 @@ int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv, | |||
162 | 162 | ||
163 | rcu_read_lock(); | 163 | rcu_read_lock(); |
164 | ies = rcu_dereference(bss->ies); | 164 | ies = rcu_dereference(bss->ies); |
165 | if (WARN_ON(!ies)) { | ||
166 | /* should never happen */ | ||
167 | rcu_read_unlock(); | ||
168 | return -EINVAL; | ||
169 | } | ||
170 | beacon_ie = kmemdup(ies->data, ies->len, GFP_ATOMIC); | 165 | beacon_ie = kmemdup(ies->data, ies->len, GFP_ATOMIC); |
171 | beacon_ie_len = ies->len; | 166 | beacon_ie_len = ies->len; |
167 | bss_desc->timestamp = ies->tsf; | ||
172 | rcu_read_unlock(); | 168 | rcu_read_unlock(); |
173 | 169 | ||
174 | if (!beacon_ie) { | 170 | if (!beacon_ie) { |
@@ -184,7 +180,6 @@ int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv, | |||
184 | bss_desc->cap_info_bitmap = bss->capability; | 180 | bss_desc->cap_info_bitmap = bss->capability; |
185 | bss_desc->bss_band = bss_priv->band; | 181 | bss_desc->bss_band = bss_priv->band; |
186 | bss_desc->fw_tsf = bss_priv->fw_tsf; | 182 | bss_desc->fw_tsf = bss_priv->fw_tsf; |
187 | bss_desc->timestamp = bss->tsf; | ||
188 | if (bss_desc->cap_info_bitmap & WLAN_CAPABILITY_PRIVACY) { | 183 | if (bss_desc->cap_info_bitmap & WLAN_CAPABILITY_PRIVACY) { |
189 | dev_dbg(priv->adapter->dev, "info: InterpretIE: AP WEP enabled\n"); | 184 | dev_dbg(priv->adapter->dev, "info: InterpretIE: AP WEP enabled\n"); |
190 | bss_desc->privacy = MWIFIEX_802_11_PRIV_FILTER_8021X_WEP; | 185 | bss_desc->privacy = MWIFIEX_802_11_PRIV_FILTER_8021X_WEP; |
@@ -324,7 +319,7 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, | |||
324 | } | 319 | } |
325 | 320 | ||
326 | if (bss) | 321 | if (bss) |
327 | cfg80211_put_bss(bss); | 322 | cfg80211_put_bss(priv->adapter->wiphy, bss); |
328 | } else { | 323 | } else { |
329 | /* Adhoc mode */ | 324 | /* Adhoc mode */ |
330 | /* If the requested SSID matches current SSID, return */ | 325 | /* If the requested SSID matches current SSID, return */ |
@@ -354,7 +349,7 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, | |||
354 | " list. Joining...\n"); | 349 | " list. Joining...\n"); |
355 | ret = mwifiex_adhoc_join(priv, bss_desc); | 350 | ret = mwifiex_adhoc_join(priv, bss_desc); |
356 | if (bss) | 351 | if (bss) |
357 | cfg80211_put_bss(bss); | 352 | cfg80211_put_bss(priv->adapter->wiphy, bss); |
358 | } else { | 353 | } else { |
359 | dev_dbg(adapter->dev, "info: Network not found in " | 354 | dev_dbg(adapter->dev, "info: Network not found in " |
360 | "the list, creating adhoc with ssid = %s\n", | 355 | "the list, creating adhoc with ssid = %s\n", |
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 8186af4ed47b..091d9a64080a 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -334,20 +334,20 @@ struct mwl8k_sta { | |||
334 | #define MWL8K_STA(_sta) ((struct mwl8k_sta *)&((_sta)->drv_priv)) | 334 | #define MWL8K_STA(_sta) ((struct mwl8k_sta *)&((_sta)->drv_priv)) |
335 | 335 | ||
336 | static const struct ieee80211_channel mwl8k_channels_24[] = { | 336 | static const struct ieee80211_channel mwl8k_channels_24[] = { |
337 | { .center_freq = 2412, .hw_value = 1, }, | 337 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2412, .hw_value = 1, }, |
338 | { .center_freq = 2417, .hw_value = 2, }, | 338 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2417, .hw_value = 2, }, |
339 | { .center_freq = 2422, .hw_value = 3, }, | 339 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2422, .hw_value = 3, }, |
340 | { .center_freq = 2427, .hw_value = 4, }, | 340 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2427, .hw_value = 4, }, |
341 | { .center_freq = 2432, .hw_value = 5, }, | 341 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2432, .hw_value = 5, }, |
342 | { .center_freq = 2437, .hw_value = 6, }, | 342 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2437, .hw_value = 6, }, |
343 | { .center_freq = 2442, .hw_value = 7, }, | 343 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2442, .hw_value = 7, }, |
344 | { .center_freq = 2447, .hw_value = 8, }, | 344 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2447, .hw_value = 8, }, |
345 | { .center_freq = 2452, .hw_value = 9, }, | 345 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2452, .hw_value = 9, }, |
346 | { .center_freq = 2457, .hw_value = 10, }, | 346 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2457, .hw_value = 10, }, |
347 | { .center_freq = 2462, .hw_value = 11, }, | 347 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2462, .hw_value = 11, }, |
348 | { .center_freq = 2467, .hw_value = 12, }, | 348 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2467, .hw_value = 12, }, |
349 | { .center_freq = 2472, .hw_value = 13, }, | 349 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2472, .hw_value = 13, }, |
350 | { .center_freq = 2484, .hw_value = 14, }, | 350 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2484, .hw_value = 14, }, |
351 | }; | 351 | }; |
352 | 352 | ||
353 | static const struct ieee80211_rate mwl8k_rates_24[] = { | 353 | static const struct ieee80211_rate mwl8k_rates_24[] = { |
@@ -368,10 +368,10 @@ static const struct ieee80211_rate mwl8k_rates_24[] = { | |||
368 | }; | 368 | }; |
369 | 369 | ||
370 | static const struct ieee80211_channel mwl8k_channels_50[] = { | 370 | static const struct ieee80211_channel mwl8k_channels_50[] = { |
371 | { .center_freq = 5180, .hw_value = 36, }, | 371 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5180, .hw_value = 36, }, |
372 | { .center_freq = 5200, .hw_value = 40, }, | 372 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5200, .hw_value = 40, }, |
373 | { .center_freq = 5220, .hw_value = 44, }, | 373 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5220, .hw_value = 44, }, |
374 | { .center_freq = 5240, .hw_value = 48, }, | 374 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5240, .hw_value = 48, }, |
375 | }; | 375 | }; |
376 | 376 | ||
377 | static const struct ieee80211_rate mwl8k_rates_50[] = { | 377 | static const struct ieee80211_rate mwl8k_rates_50[] = { |
diff --git a/drivers/net/wireless/orinoco/scan.c b/drivers/net/wireless/orinoco/scan.c index 96e39edfec77..e8c5714bfd11 100644 --- a/drivers/net/wireless/orinoco/scan.c +++ b/drivers/net/wireless/orinoco/scan.c | |||
@@ -125,7 +125,7 @@ static void orinoco_add_hostscan_result(struct orinoco_private *priv, | |||
125 | cbss = cfg80211_inform_bss(wiphy, channel, bss->a.bssid, timestamp, | 125 | cbss = cfg80211_inform_bss(wiphy, channel, bss->a.bssid, timestamp, |
126 | capability, beacon_interval, ie_buf, ie_len, | 126 | capability, beacon_interval, ie_buf, ie_len, |
127 | signal, GFP_KERNEL); | 127 | signal, GFP_KERNEL); |
128 | cfg80211_put_bss(cbss); | 128 | cfg80211_put_bss(wiphy, cbss); |
129 | } | 129 | } |
130 | 130 | ||
131 | void orinoco_add_extscan_result(struct orinoco_private *priv, | 131 | void orinoco_add_extscan_result(struct orinoco_private *priv, |
@@ -158,7 +158,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv, | |||
158 | cbss = cfg80211_inform_bss(wiphy, channel, bss->bssid, timestamp, | 158 | cbss = cfg80211_inform_bss(wiphy, channel, bss->bssid, timestamp, |
159 | capability, beacon_interval, ie, ie_len, | 159 | capability, beacon_interval, ie, ie_len, |
160 | signal, GFP_KERNEL); | 160 | signal, GFP_KERNEL); |
161 | cfg80211_put_bss(cbss); | 161 | cfg80211_put_bss(wiphy, cbss); |
162 | } | 162 | } |
163 | 163 | ||
164 | void orinoco_add_hostscan_results(struct orinoco_private *priv, | 164 | void orinoco_add_hostscan_results(struct orinoco_private *priv, |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index abe1d039be81..fe2f272689aa 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -2029,7 +2029,7 @@ static bool rndis_bss_info_update(struct usbnet *usbdev, | |||
2029 | bss = cfg80211_inform_bss(priv->wdev.wiphy, channel, bssid->mac, | 2029 | bss = cfg80211_inform_bss(priv->wdev.wiphy, channel, bssid->mac, |
2030 | timestamp, capability, beacon_interval, ie, ie_len, signal, | 2030 | timestamp, capability, beacon_interval, ie, ie_len, signal, |
2031 | GFP_KERNEL); | 2031 | GFP_KERNEL); |
2032 | cfg80211_put_bss(bss); | 2032 | cfg80211_put_bss(priv->wdev.wiphy, bss); |
2033 | 2033 | ||
2034 | return (bss != NULL); | 2034 | return (bss != NULL); |
2035 | } | 2035 | } |
@@ -2718,7 +2718,7 @@ static void rndis_wlan_craft_connected_bss(struct usbnet *usbdev, u8 *bssid, | |||
2718 | bss = cfg80211_inform_bss(priv->wdev.wiphy, channel, bssid, | 2718 | bss = cfg80211_inform_bss(priv->wdev.wiphy, channel, bssid, |
2719 | timestamp, capability, beacon_period, ie_buf, ie_len, | 2719 | timestamp, capability, beacon_period, ie_buf, ie_len, |
2720 | signal, GFP_KERNEL); | 2720 | signal, GFP_KERNEL); |
2721 | cfg80211_put_bss(bss); | 2721 | cfg80211_put_bss(priv->wdev.wiphy, bss); |
2722 | } | 2722 | } |
2723 | 2723 | ||
2724 | /* | 2724 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index a2d2bc2c7b3d..221beaaa83f1 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1185,8 +1185,14 @@ static void rt2400pci_write_beacon(struct queue_entry *entry, | |||
1185 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); | 1185 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); |
1186 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | 1186 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); |
1187 | 1187 | ||
1188 | rt2x00queue_map_txskb(entry); | 1188 | if (rt2x00queue_map_txskb(entry)) { |
1189 | 1189 | ERROR(rt2x00dev, "Fail to map beacon, aborting\n"); | |
1190 | goto out; | ||
1191 | } | ||
1192 | /* | ||
1193 | * Enable beaconing again. | ||
1194 | */ | ||
1195 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 1); | ||
1190 | /* | 1196 | /* |
1191 | * Write the TX descriptor for the beacon. | 1197 | * Write the TX descriptor for the beacon. |
1192 | */ | 1198 | */ |
@@ -1196,7 +1202,7 @@ static void rt2400pci_write_beacon(struct queue_entry *entry, | |||
1196 | * Dump beacon to userspace through debugfs. | 1202 | * Dump beacon to userspace through debugfs. |
1197 | */ | 1203 | */ |
1198 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); | 1204 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); |
1199 | 1205 | out: | |
1200 | /* | 1206 | /* |
1201 | * Enable beaconing again. | 1207 | * Enable beaconing again. |
1202 | */ | 1208 | */ |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 9bea10f53f0a..39edc59e8d03 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1338,7 +1338,10 @@ static void rt2500pci_write_beacon(struct queue_entry *entry, | |||
1338 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); | 1338 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); |
1339 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | 1339 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); |
1340 | 1340 | ||
1341 | rt2x00queue_map_txskb(entry); | 1341 | if (rt2x00queue_map_txskb(entry)) { |
1342 | ERROR(rt2x00dev, "Fail to map beacon, aborting\n"); | ||
1343 | goto out; | ||
1344 | } | ||
1342 | 1345 | ||
1343 | /* | 1346 | /* |
1344 | * Write the TX descriptor for the beacon. | 1347 | * Write the TX descriptor for the beacon. |
@@ -1349,7 +1352,7 @@ static void rt2500pci_write_beacon(struct queue_entry *entry, | |||
1349 | * Dump beacon to userspace through debugfs. | 1352 | * Dump beacon to userspace through debugfs. |
1350 | */ | 1353 | */ |
1351 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); | 1354 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); |
1352 | 1355 | out: | |
1353 | /* | 1356 | /* |
1354 | * Enable beaconing again. | 1357 | * Enable beaconing again. |
1355 | */ | 1358 | */ |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 9a3f31a543ce..086abb403a4f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -1169,8 +1169,10 @@ static inline bool rt2x00_is_soc(struct rt2x00_dev *rt2x00dev) | |||
1169 | /** | 1169 | /** |
1170 | * rt2x00queue_map_txskb - Map a skb into DMA for TX purposes. | 1170 | * rt2x00queue_map_txskb - Map a skb into DMA for TX purposes. |
1171 | * @entry: Pointer to &struct queue_entry | 1171 | * @entry: Pointer to &struct queue_entry |
1172 | * | ||
1173 | * Returns -ENOMEM if mapping fail, 0 otherwise. | ||
1172 | */ | 1174 | */ |
1173 | void rt2x00queue_map_txskb(struct queue_entry *entry); | 1175 | int rt2x00queue_map_txskb(struct queue_entry *entry); |
1174 | 1176 | ||
1175 | /** | 1177 | /** |
1176 | * rt2x00queue_unmap_skb - Unmap a skb from DMA. | 1178 | * rt2x00queue_unmap_skb - Unmap a skb from DMA. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index f35d85a71bbc..4d91795dc6a2 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -87,24 +87,35 @@ struct sk_buff *rt2x00queue_alloc_rxskb(struct queue_entry *entry, gfp_t gfp) | |||
87 | skbdesc->entry = entry; | 87 | skbdesc->entry = entry; |
88 | 88 | ||
89 | if (test_bit(REQUIRE_DMA, &rt2x00dev->cap_flags)) { | 89 | if (test_bit(REQUIRE_DMA, &rt2x00dev->cap_flags)) { |
90 | skbdesc->skb_dma = dma_map_single(rt2x00dev->dev, | 90 | dma_addr_t skb_dma; |
91 | skb->data, | 91 | |
92 | skb->len, | 92 | skb_dma = dma_map_single(rt2x00dev->dev, skb->data, skb->len, |
93 | DMA_FROM_DEVICE); | 93 | DMA_FROM_DEVICE); |
94 | if (unlikely(dma_mapping_error(rt2x00dev->dev, skb_dma))) { | ||
95 | dev_kfree_skb_any(skb); | ||
96 | return NULL; | ||
97 | } | ||
98 | |||
99 | skbdesc->skb_dma = skb_dma; | ||
94 | skbdesc->flags |= SKBDESC_DMA_MAPPED_RX; | 100 | skbdesc->flags |= SKBDESC_DMA_MAPPED_RX; |
95 | } | 101 | } |
96 | 102 | ||
97 | return skb; | 103 | return skb; |
98 | } | 104 | } |
99 | 105 | ||
100 | void rt2x00queue_map_txskb(struct queue_entry *entry) | 106 | int rt2x00queue_map_txskb(struct queue_entry *entry) |
101 | { | 107 | { |
102 | struct device *dev = entry->queue->rt2x00dev->dev; | 108 | struct device *dev = entry->queue->rt2x00dev->dev; |
103 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); | 109 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); |
104 | 110 | ||
105 | skbdesc->skb_dma = | 111 | skbdesc->skb_dma = |
106 | dma_map_single(dev, entry->skb->data, entry->skb->len, DMA_TO_DEVICE); | 112 | dma_map_single(dev, entry->skb->data, entry->skb->len, DMA_TO_DEVICE); |
113 | |||
114 | if (unlikely(dma_mapping_error(dev, skbdesc->skb_dma))) | ||
115 | return -ENOMEM; | ||
116 | |||
107 | skbdesc->flags |= SKBDESC_DMA_MAPPED_TX; | 117 | skbdesc->flags |= SKBDESC_DMA_MAPPED_TX; |
118 | return 0; | ||
108 | } | 119 | } |
109 | EXPORT_SYMBOL_GPL(rt2x00queue_map_txskb); | 120 | EXPORT_SYMBOL_GPL(rt2x00queue_map_txskb); |
110 | 121 | ||
@@ -343,10 +354,7 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev, | |||
343 | * when using more then one tx stream (>MCS7). | 354 | * when using more then one tx stream (>MCS7). |
344 | */ | 355 | */ |
345 | if (sta && txdesc->u.ht.mcs > 7 && | 356 | if (sta && txdesc->u.ht.mcs > 7 && |
346 | ((sta->ht_cap.cap & | 357 | sta->smps_mode == IEEE80211_SMPS_DYNAMIC) |
347 | IEEE80211_HT_CAP_SM_PS) >> | ||
348 | IEEE80211_HT_CAP_SM_PS_SHIFT) == | ||
349 | WLAN_HT_CAP_SM_PS_DYNAMIC) | ||
350 | __set_bit(ENTRY_TXD_HT_MIMO_PS, &txdesc->flags); | 358 | __set_bit(ENTRY_TXD_HT_MIMO_PS, &txdesc->flags); |
351 | } else { | 359 | } else { |
352 | txdesc->u.ht.mcs = rt2x00_get_rate_mcs(hwrate->mcs); | 360 | txdesc->u.ht.mcs = rt2x00_get_rate_mcs(hwrate->mcs); |
@@ -545,8 +553,9 @@ static int rt2x00queue_write_tx_data(struct queue_entry *entry, | |||
545 | /* | 553 | /* |
546 | * Map the skb to DMA. | 554 | * Map the skb to DMA. |
547 | */ | 555 | */ |
548 | if (test_bit(REQUIRE_DMA, &rt2x00dev->cap_flags)) | 556 | if (test_bit(REQUIRE_DMA, &rt2x00dev->cap_flags) && |
549 | rt2x00queue_map_txskb(entry); | 557 | rt2x00queue_map_txskb(entry)) |
558 | return -ENOMEM; | ||
550 | 559 | ||
551 | return 0; | 560 | return 0; |
552 | } | 561 | } |
diff --git a/drivers/net/wireless/rtlwifi/Kconfig b/drivers/net/wireless/rtlwifi/Kconfig index b80bc4612581..b6aa0c40658f 100644 --- a/drivers/net/wireless/rtlwifi/Kconfig +++ b/drivers/net/wireless/rtlwifi/Kconfig | |||
@@ -1,8 +1,26 @@ | |||
1 | config RTLWIFI | ||
2 | tristate "Realtek wireless card support" | ||
3 | depends on MAC80211 | ||
4 | select FW_LOADER | ||
5 | ---help--- | ||
6 | This is common code for RTL8192CE/RTL8192CU/RTL8192SE/RTL8723AE | ||
7 | drivers. This module does nothing by itself - the various front-end | ||
8 | drivers need to be enabled to support any desired devices. | ||
9 | |||
10 | If you choose to build as a module, it'll be called rtlwifi. | ||
11 | |||
12 | config RTLWIFI_DEBUG | ||
13 | bool "Debugging output for rtlwifi driver family" | ||
14 | depends on RTLWIFI | ||
15 | default y | ||
16 | ---help--- | ||
17 | To use the module option that sets the dynamic-debugging level for, | ||
18 | the front-end driver, this parameter must be "Y". For memory-limited | ||
19 | systems, choose "N". If in doubt, choose "Y". | ||
20 | |||
1 | config RTL8192CE | 21 | config RTL8192CE |
2 | tristate "Realtek RTL8192CE/RTL8188CE Wireless Network Adapter" | 22 | tristate "Realtek RTL8192CE/RTL8188CE Wireless Network Adapter" |
3 | depends on MAC80211 && PCI | 23 | depends on RTLWIFI && PCI |
4 | select FW_LOADER | ||
5 | select RTLWIFI | ||
6 | select RTL8192C_COMMON | 24 | select RTL8192C_COMMON |
7 | ---help--- | 25 | ---help--- |
8 | This is the driver for Realtek RTL8192CE/RTL8188CE 802.11n PCIe | 26 | This is the driver for Realtek RTL8192CE/RTL8188CE 802.11n PCIe |
@@ -12,9 +30,7 @@ config RTL8192CE | |||
12 | 30 | ||
13 | config RTL8192SE | 31 | config RTL8192SE |
14 | tristate "Realtek RTL8192SE/RTL8191SE PCIe Wireless Network Adapter" | 32 | tristate "Realtek RTL8192SE/RTL8191SE PCIe Wireless Network Adapter" |
15 | depends on MAC80211 && PCI | 33 | depends on RTLWIFI && PCI |
16 | select FW_LOADER | ||
17 | select RTLWIFI | ||
18 | ---help--- | 34 | ---help--- |
19 | This is the driver for Realtek RTL8192SE/RTL8191SE 802.11n PCIe | 35 | This is the driver for Realtek RTL8192SE/RTL8191SE 802.11n PCIe |
20 | wireless network adapters. | 36 | wireless network adapters. |
@@ -23,9 +39,7 @@ config RTL8192SE | |||
23 | 39 | ||
24 | config RTL8192DE | 40 | config RTL8192DE |
25 | tristate "Realtek RTL8192DE/RTL8188DE PCIe Wireless Network Adapter" | 41 | tristate "Realtek RTL8192DE/RTL8188DE PCIe Wireless Network Adapter" |
26 | depends on MAC80211 && PCI | 42 | depends on RTLWIFI && PCI |
27 | select FW_LOADER | ||
28 | select RTLWIFI | ||
29 | ---help--- | 43 | ---help--- |
30 | This is the driver for Realtek RTL8192DE/RTL8188DE 802.11n PCIe | 44 | This is the driver for Realtek RTL8192DE/RTL8188DE 802.11n PCIe |
31 | wireless network adapters. | 45 | wireless network adapters. |
@@ -34,9 +48,7 @@ config RTL8192DE | |||
34 | 48 | ||
35 | config RTL8723AE | 49 | config RTL8723AE |
36 | tristate "Realtek RTL8723AE PCIe Wireless Network Adapter" | 50 | tristate "Realtek RTL8723AE PCIe Wireless Network Adapter" |
37 | depends on MAC80211 && PCI && EXPERIMENTAL | 51 | depends on RTLWIFI && PCI |
38 | select FW_LOADER | ||
39 | select RTLWIFI | ||
40 | ---help--- | 52 | ---help--- |
41 | This is the driver for Realtek RTL8723AE 802.11n PCIe | 53 | This is the driver for Realtek RTL8723AE 802.11n PCIe |
42 | wireless network adapters. | 54 | wireless network adapters. |
@@ -45,9 +57,7 @@ config RTL8723AE | |||
45 | 57 | ||
46 | config RTL8192CU | 58 | config RTL8192CU |
47 | tristate "Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter" | 59 | tristate "Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter" |
48 | depends on MAC80211 && USB | 60 | depends on RTLWIFI && USB |
49 | select FW_LOADER | ||
50 | select RTLWIFI | ||
51 | select RTL8192C_COMMON | 61 | select RTL8192C_COMMON |
52 | ---help--- | 62 | ---help--- |
53 | This is the driver for Realtek RTL8192CU/RTL8188CU 802.11n USB | 63 | This is the driver for Realtek RTL8192CU/RTL8188CU 802.11n USB |
@@ -55,16 +65,6 @@ config RTL8192CU | |||
55 | 65 | ||
56 | If you choose to build it as a module, it will be called rtl8192cu | 66 | If you choose to build it as a module, it will be called rtl8192cu |
57 | 67 | ||
58 | config RTLWIFI | ||
59 | tristate | ||
60 | depends on RTL8192CE || RTL8192CU || RTL8192SE || RTL8192DE || RTL8723AE | ||
61 | default m | ||
62 | |||
63 | config RTLWIFI_DEBUG | ||
64 | bool "Additional debugging output" | ||
65 | depends on RTL8192CE || RTL8192CU || RTL8192SE || RTL8192DE || RTL8723AE | ||
66 | default y | ||
67 | |||
68 | config RTL8192C_COMMON | 68 | config RTL8192C_COMMON |
69 | tristate | 69 | tristate |
70 | depends on RTL8192CE || RTL8192CU | 70 | depends on RTL8192CE || RTL8192CU |
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index 4494d130b37c..99c5cea3fe21 100644 --- a/drivers/net/wireless/rtlwifi/base.c +++ b/drivers/net/wireless/rtlwifi/base.c | |||
@@ -523,8 +523,8 @@ static void _rtl_query_shortgi(struct ieee80211_hw *hw, | |||
523 | if (mac->opmode == NL80211_IFTYPE_STATION) | 523 | if (mac->opmode == NL80211_IFTYPE_STATION) |
524 | bw_40 = mac->bw_40; | 524 | bw_40 = mac->bw_40; |
525 | else if (mac->opmode == NL80211_IFTYPE_AP || | 525 | else if (mac->opmode == NL80211_IFTYPE_AP || |
526 | mac->opmode == NL80211_IFTYPE_ADHOC) | 526 | mac->opmode == NL80211_IFTYPE_ADHOC) |
527 | bw_40 = sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40; | 527 | bw_40 = sta->bandwidth >= IEEE80211_STA_RX_BW_40; |
528 | 528 | ||
529 | if (bw_40 && sgi_40) | 529 | if (bw_40 && sgi_40) |
530 | tcb_desc->use_shortgi = true; | 530 | tcb_desc->use_shortgi = true; |
@@ -634,8 +634,7 @@ static void _rtl_query_bandwidth_mode(struct ieee80211_hw *hw, | |||
634 | return; | 634 | return; |
635 | if (mac->opmode == NL80211_IFTYPE_AP || | 635 | if (mac->opmode == NL80211_IFTYPE_AP || |
636 | mac->opmode == NL80211_IFTYPE_ADHOC) { | 636 | mac->opmode == NL80211_IFTYPE_ADHOC) { |
637 | if (!(sta->ht_cap.ht_supported) || | 637 | if (sta->bandwidth == IEEE80211_STA_RX_BW_20) |
638 | !(sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)) | ||
639 | return; | 638 | return; |
640 | } else if (mac->opmode == NL80211_IFTYPE_STATION) { | 639 | } else if (mac->opmode == NL80211_IFTYPE_STATION) { |
641 | if (!mac->bw_40 || !(sta->ht_cap.ht_supported)) | 640 | if (!mac->bw_40 || !(sta->ht_cap.ht_supported)) |
@@ -1004,7 +1003,8 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) | |||
1004 | is_tx ? "Tx" : "Rx"); | 1003 | is_tx ? "Tx" : "Rx"); |
1005 | 1004 | ||
1006 | if (is_tx) { | 1005 | if (is_tx) { |
1007 | rtl_lps_leave(hw); | 1006 | schedule_work(&rtlpriv-> |
1007 | works.lps_leave_work); | ||
1008 | ppsc->last_delaylps_stamp_jiffies = | 1008 | ppsc->last_delaylps_stamp_jiffies = |
1009 | jiffies; | 1009 | jiffies; |
1010 | } | 1010 | } |
@@ -1014,7 +1014,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) | |||
1014 | } | 1014 | } |
1015 | } else if (ETH_P_ARP == ether_type) { | 1015 | } else if (ETH_P_ARP == ether_type) { |
1016 | if (is_tx) { | 1016 | if (is_tx) { |
1017 | rtl_lps_leave(hw); | 1017 | schedule_work(&rtlpriv->works.lps_leave_work); |
1018 | ppsc->last_delaylps_stamp_jiffies = jiffies; | 1018 | ppsc->last_delaylps_stamp_jiffies = jiffies; |
1019 | } | 1019 | } |
1020 | 1020 | ||
@@ -1024,7 +1024,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) | |||
1024 | "802.1X %s EAPOL pkt!!\n", is_tx ? "Tx" : "Rx"); | 1024 | "802.1X %s EAPOL pkt!!\n", is_tx ? "Tx" : "Rx"); |
1025 | 1025 | ||
1026 | if (is_tx) { | 1026 | if (is_tx) { |
1027 | rtl_lps_leave(hw); | 1027 | schedule_work(&rtlpriv->works.lps_leave_work); |
1028 | ppsc->last_delaylps_stamp_jiffies = jiffies; | 1028 | ppsc->last_delaylps_stamp_jiffies = jiffies; |
1029 | } | 1029 | } |
1030 | 1030 | ||
diff --git a/drivers/net/wireless/rtlwifi/rc.c b/drivers/net/wireless/rtlwifi/rc.c index 204f46c4510d..f9f059dadb73 100644 --- a/drivers/net/wireless/rtlwifi/rc.c +++ b/drivers/net/wireless/rtlwifi/rc.c | |||
@@ -116,9 +116,8 @@ static void _rtl_rc_rate_set_series(struct rtl_priv *rtlpriv, | |||
116 | if (txrc->short_preamble) | 116 | if (txrc->short_preamble) |
117 | rate->flags |= IEEE80211_TX_RC_USE_SHORT_PREAMBLE; | 117 | rate->flags |= IEEE80211_TX_RC_USE_SHORT_PREAMBLE; |
118 | if (mac->opmode == NL80211_IFTYPE_AP || | 118 | if (mac->opmode == NL80211_IFTYPE_AP || |
119 | mac->opmode == NL80211_IFTYPE_ADHOC) { | 119 | mac->opmode == NL80211_IFTYPE_ADHOC) { |
120 | if (sta && (sta->ht_cap.cap & | 120 | if (sta && (sta->bandwidth >= IEEE80211_STA_RX_BW_40)) |
121 | IEEE80211_HT_CAP_SUP_WIDTH_20_40)) | ||
122 | rate->flags |= IEEE80211_TX_RC_40_MHZ_WIDTH; | 121 | rate->flags |= IEEE80211_TX_RC_40_MHZ_WIDTH; |
123 | } else { | 122 | } else { |
124 | if (mac->bw_40) | 123 | if (mac->bw_40) |
@@ -217,6 +216,12 @@ static void rtl_tx_status(void *ppriv, | |||
217 | } | 216 | } |
218 | } | 217 | } |
219 | 218 | ||
219 | static void rtl_rate_init(void *ppriv, | ||
220 | struct ieee80211_supported_band *sband, | ||
221 | struct ieee80211_sta *sta, void *priv_sta) | ||
222 | { | ||
223 | } | ||
224 | |||
220 | static void *rtl_rate_alloc(struct ieee80211_hw *hw, | 225 | static void *rtl_rate_alloc(struct ieee80211_hw *hw, |
221 | struct dentry *debugfsdir) | 226 | struct dentry *debugfsdir) |
222 | { | 227 | { |
@@ -261,6 +266,7 @@ static struct rate_control_ops rtl_rate_ops = { | |||
261 | .free = rtl_rate_free, | 266 | .free = rtl_rate_free, |
262 | .alloc_sta = rtl_rate_alloc_sta, | 267 | .alloc_sta = rtl_rate_alloc_sta, |
263 | .free_sta = rtl_rate_free_sta, | 268 | .free_sta = rtl_rate_free_sta, |
269 | .rate_init = rtl_rate_init, | ||
264 | .tx_status = rtl_tx_status, | 270 | .tx_status = rtl_tx_status, |
265 | .get_rate = rtl_get_rate, | 271 | .get_rate = rtl_get_rate, |
266 | }; | 272 | }; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c index d1f34f6ffbdf..1b65db7fd651 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | |||
@@ -1846,9 +1846,9 @@ static void rtl92ce_update_hal_rate_mask(struct ieee80211_hw *hw, | |||
1846 | struct rtl_sta_info *sta_entry = NULL; | 1846 | struct rtl_sta_info *sta_entry = NULL; |
1847 | u32 ratr_bitmap; | 1847 | u32 ratr_bitmap; |
1848 | u8 ratr_index; | 1848 | u8 ratr_index; |
1849 | u8 curtxbw_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) | 1849 | u8 curtxbw_40mhz = (sta->bandwidth >= IEEE80211_STA_RX_BW_40) ? 1 : 0; |
1850 | ? 1 : 0; | 1850 | u8 curshortgi_40mhz = curtxbw_40mhz && |
1851 | u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? | 1851 | (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? |
1852 | 1 : 0; | 1852 | 1 : 0; |
1853 | u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ? | 1853 | u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ? |
1854 | 1 : 0; | 1854 | 1 : 0; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c index da0e9022a99a..b9b1a6e0b16e 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | |||
@@ -626,8 +626,7 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, | |||
626 | } else if (mac->opmode == NL80211_IFTYPE_AP || | 626 | } else if (mac->opmode == NL80211_IFTYPE_AP || |
627 | mac->opmode == NL80211_IFTYPE_ADHOC) { | 627 | mac->opmode == NL80211_IFTYPE_ADHOC) { |
628 | if (sta) | 628 | if (sta) |
629 | bw_40 = sta->ht_cap.cap & | 629 | bw_40 = sta->bandwidth >= IEEE80211_STA_RX_BW_40; |
630 | IEEE80211_HT_CAP_SUP_WIDTH_20_40; | ||
631 | } | 630 | } |
632 | 631 | ||
633 | seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; | 632 | seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c index f4051f4f0390..aa5b42521bb4 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c | |||
@@ -1970,8 +1970,7 @@ static void rtl92de_update_hal_rate_mask(struct ieee80211_hw *hw, | |||
1970 | struct rtl_sta_info *sta_entry = NULL; | 1970 | struct rtl_sta_info *sta_entry = NULL; |
1971 | u32 ratr_bitmap; | 1971 | u32 ratr_bitmap; |
1972 | u8 ratr_index; | 1972 | u8 ratr_index; |
1973 | u8 curtxbw_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) | 1973 | u8 curtxbw_40mhz = (sta->bandwidth >= IEEE80211_STA_RX_BW_40) ? 1 : 0; |
1974 | ? 1 : 0; | ||
1975 | u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? | 1974 | u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? |
1976 | 1 : 0; | 1975 | 1 : 0; |
1977 | u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ? | 1976 | u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ? |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c index cdb570ffb4b5..941080e03c06 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c | |||
@@ -574,8 +574,7 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, | |||
574 | } else if (mac->opmode == NL80211_IFTYPE_AP || | 574 | } else if (mac->opmode == NL80211_IFTYPE_AP || |
575 | mac->opmode == NL80211_IFTYPE_ADHOC) { | 575 | mac->opmode == NL80211_IFTYPE_ADHOC) { |
576 | if (sta) | 576 | if (sta) |
577 | bw_40 = sta->ht_cap.cap & | 577 | bw_40 = sta->bandwidth >= IEEE80211_STA_RX_BW_40; |
578 | IEEE80211_HT_CAP_SUP_WIDTH_20_40; | ||
579 | } | 578 | } |
580 | seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; | 579 | seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; |
581 | rtl_get_tcb_desc(hw, info, sta, skb, ptcb_desc); | 580 | rtl_get_tcb_desc(hw, info, sta, skb, ptcb_desc); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c index 28526a7361f5..084e7773bce2 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c | |||
@@ -2085,8 +2085,7 @@ static void rtl92se_update_hal_rate_mask(struct ieee80211_hw *hw, | |||
2085 | struct rtl_sta_info *sta_entry = NULL; | 2085 | struct rtl_sta_info *sta_entry = NULL; |
2086 | u32 ratr_bitmap; | 2086 | u32 ratr_bitmap; |
2087 | u8 ratr_index = 0; | 2087 | u8 ratr_index = 0; |
2088 | u8 curtxbw_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) | 2088 | u8 curtxbw_40mhz = (sta->bandwidth >= IEEE80211_STA_RX_BW_40) ? 1 : 0; |
2089 | ? 1 : 0; | ||
2090 | u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? | 2089 | u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? |
2091 | 1 : 0; | 2090 | 1 : 0; |
2092 | u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ? | 2091 | u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ? |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c index f8431a3c2c9d..7b0a2e75b8b8 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c | |||
@@ -621,8 +621,7 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, | |||
621 | } else if (mac->opmode == NL80211_IFTYPE_AP || | 621 | } else if (mac->opmode == NL80211_IFTYPE_AP || |
622 | mac->opmode == NL80211_IFTYPE_ADHOC) { | 622 | mac->opmode == NL80211_IFTYPE_ADHOC) { |
623 | if (sta) | 623 | if (sta) |
624 | bw_40 = sta->ht_cap.cap & | 624 | bw_40 = sta->bandwidth >= IEEE80211_STA_RX_BW_40; |
625 | IEEE80211_HT_CAP_SUP_WIDTH_20_40; | ||
626 | } | 625 | } |
627 | 626 | ||
628 | seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; | 627 | seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c index 149804816ac4..9a0c71c2e15e 100644 --- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c | |||
@@ -1866,8 +1866,7 @@ static void rtl8723ae_update_hal_rate_mask(struct ieee80211_hw *hw, | |||
1866 | struct rtl_sta_info *sta_entry = NULL; | 1866 | struct rtl_sta_info *sta_entry = NULL; |
1867 | u32 ratr_bitmap; | 1867 | u32 ratr_bitmap; |
1868 | u8 ratr_index; | 1868 | u8 ratr_index; |
1869 | u8 curtxbw_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) | 1869 | u8 curtxbw_40mhz = (sta->bandwidth >= IEEE80211_STA_RX_BW_40) ? 1 : 0; |
1870 | ? 1 : 0; | ||
1871 | u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? | 1870 | u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? |
1872 | 1 : 0; | 1871 | 1 : 0; |
1873 | u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ? | 1872 | u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ? |
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c index b1fd2b328abf..ac081297db50 100644 --- a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c | |||
@@ -395,8 +395,7 @@ void rtl8723ae_tx_fill_desc(struct ieee80211_hw *hw, | |||
395 | } else if (mac->opmode == NL80211_IFTYPE_AP || | 395 | } else if (mac->opmode == NL80211_IFTYPE_AP || |
396 | mac->opmode == NL80211_IFTYPE_ADHOC) { | 396 | mac->opmode == NL80211_IFTYPE_ADHOC) { |
397 | if (sta) | 397 | if (sta) |
398 | bw_40 = sta->ht_cap.cap & | 398 | bw_40 = sta->bandwidth >= IEEE80211_STA_RX_BW_40; |
399 | IEEE80211_HT_CAP_SUP_WIDTH_20_40; | ||
400 | } | 399 | } |
401 | 400 | ||
402 | seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; | 401 | seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; |
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c index 80730c72e0d6..476eaef5e4a9 100644 --- a/drivers/net/wireless/rtlwifi/usb.c +++ b/drivers/net/wireless/rtlwifi/usb.c | |||
@@ -542,8 +542,8 @@ static void _rtl_rx_pre_process(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
542 | WARN_ON(skb_queue_empty(&rx_queue)); | 542 | WARN_ON(skb_queue_empty(&rx_queue)); |
543 | while (!skb_queue_empty(&rx_queue)) { | 543 | while (!skb_queue_empty(&rx_queue)) { |
544 | _skb = skb_dequeue(&rx_queue); | 544 | _skb = skb_dequeue(&rx_queue); |
545 | _rtl_usb_rx_process_agg(hw, skb); | 545 | _rtl_usb_rx_process_agg(hw, _skb); |
546 | ieee80211_rx_irqsafe(hw, skb); | 546 | ieee80211_rx_irqsafe(hw, _skb); |
547 | } | 547 | } |
548 | } | 548 | } |
549 | 549 | ||
diff --git a/drivers/net/wireless/ti/wl1251/event.c b/drivers/net/wireless/ti/wl1251/event.c index 5ec50a476a69..74ae8e1c2e33 100644 --- a/drivers/net/wireless/ti/wl1251/event.c +++ b/drivers/net/wireless/ti/wl1251/event.c | |||
@@ -29,6 +29,8 @@ | |||
29 | static int wl1251_event_scan_complete(struct wl1251 *wl, | 29 | static int wl1251_event_scan_complete(struct wl1251 *wl, |
30 | struct event_mailbox *mbox) | 30 | struct event_mailbox *mbox) |
31 | { | 31 | { |
32 | int ret = 0; | ||
33 | |||
32 | wl1251_debug(DEBUG_EVENT, "status: 0x%x, channels: %d", | 34 | wl1251_debug(DEBUG_EVENT, "status: 0x%x, channels: %d", |
33 | mbox->scheduled_scan_status, | 35 | mbox->scheduled_scan_status, |
34 | mbox->scheduled_scan_channels); | 36 | mbox->scheduled_scan_channels); |
@@ -37,9 +39,11 @@ static int wl1251_event_scan_complete(struct wl1251 *wl, | |||
37 | ieee80211_scan_completed(wl->hw, false); | 39 | ieee80211_scan_completed(wl->hw, false); |
38 | wl1251_debug(DEBUG_MAC80211, "mac80211 hw scan completed"); | 40 | wl1251_debug(DEBUG_MAC80211, "mac80211 hw scan completed"); |
39 | wl->scanning = false; | 41 | wl->scanning = false; |
42 | if (wl->hw->conf.flags & IEEE80211_CONF_IDLE) | ||
43 | ret = wl1251_ps_set_mode(wl, STATION_IDLE); | ||
40 | } | 44 | } |
41 | 45 | ||
42 | return 0; | 46 | return ret; |
43 | } | 47 | } |
44 | 48 | ||
45 | static void wl1251_event_mbox_dump(struct event_mailbox *mbox) | 49 | static void wl1251_event_mbox_dump(struct event_mailbox *mbox) |
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index f47e8b0482ad..bbbf68cf50a7 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c | |||
@@ -623,7 +623,7 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) | |||
623 | } | 623 | } |
624 | } | 624 | } |
625 | 625 | ||
626 | if (changed & IEEE80211_CONF_CHANGE_IDLE) { | 626 | if (changed & IEEE80211_CONF_CHANGE_IDLE && !wl->scanning) { |
627 | if (conf->flags & IEEE80211_CONF_IDLE) { | 627 | if (conf->flags & IEEE80211_CONF_IDLE) { |
628 | ret = wl1251_ps_set_mode(wl, STATION_IDLE); | 628 | ret = wl1251_ps_set_mode(wl, STATION_IDLE); |
629 | if (ret < 0) | 629 | if (ret < 0) |
@@ -895,11 +895,21 @@ static int wl1251_op_hw_scan(struct ieee80211_hw *hw, | |||
895 | if (ret < 0) | 895 | if (ret < 0) |
896 | goto out; | 896 | goto out; |
897 | 897 | ||
898 | if (hw->conf.flags & IEEE80211_CONF_IDLE) { | ||
899 | ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE); | ||
900 | if (ret < 0) | ||
901 | goto out_sleep; | ||
902 | ret = wl1251_join(wl, wl->bss_type, wl->channel, | ||
903 | wl->beacon_int, wl->dtim_period); | ||
904 | if (ret < 0) | ||
905 | goto out_sleep; | ||
906 | } | ||
907 | |||
898 | skb = ieee80211_probereq_get(wl->hw, wl->vif, ssid, ssid_len, | 908 | skb = ieee80211_probereq_get(wl->hw, wl->vif, ssid, ssid_len, |
899 | req->ie_len); | 909 | req->ie_len); |
900 | if (!skb) { | 910 | if (!skb) { |
901 | ret = -ENOMEM; | 911 | ret = -ENOMEM; |
902 | goto out; | 912 | goto out_idle; |
903 | } | 913 | } |
904 | if (req->ie_len) | 914 | if (req->ie_len) |
905 | memcpy(skb_put(skb, req->ie_len), req->ie, req->ie_len); | 915 | memcpy(skb_put(skb, req->ie_len), req->ie, req->ie_len); |
@@ -908,11 +918,11 @@ static int wl1251_op_hw_scan(struct ieee80211_hw *hw, | |||
908 | skb->len); | 918 | skb->len); |
909 | dev_kfree_skb(skb); | 919 | dev_kfree_skb(skb); |
910 | if (ret < 0) | 920 | if (ret < 0) |
911 | goto out_sleep; | 921 | goto out_idle; |
912 | 922 | ||
913 | ret = wl1251_cmd_trigger_scan_to(wl, 0); | 923 | ret = wl1251_cmd_trigger_scan_to(wl, 0); |
914 | if (ret < 0) | 924 | if (ret < 0) |
915 | goto out_sleep; | 925 | goto out_idle; |
916 | 926 | ||
917 | wl->scanning = true; | 927 | wl->scanning = true; |
918 | 928 | ||
@@ -920,9 +930,13 @@ static int wl1251_op_hw_scan(struct ieee80211_hw *hw, | |||
920 | req->n_channels, WL1251_SCAN_NUM_PROBES); | 930 | req->n_channels, WL1251_SCAN_NUM_PROBES); |
921 | if (ret < 0) { | 931 | if (ret < 0) { |
922 | wl->scanning = false; | 932 | wl->scanning = false; |
923 | goto out_sleep; | 933 | goto out_idle; |
924 | } | 934 | } |
935 | goto out_sleep; | ||
925 | 936 | ||
937 | out_idle: | ||
938 | if (hw->conf.flags & IEEE80211_CONF_IDLE) | ||
939 | ret = wl1251_ps_set_mode(wl, STATION_IDLE); | ||
926 | out_sleep: | 940 | out_sleep: |
927 | wl1251_ps_elp_sleep(wl); | 941 | wl1251_ps_elp_sleep(wl); |
928 | 942 | ||
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index a10b7a7a215a..da3ef1b10a9c 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c | |||
@@ -1374,7 +1374,7 @@ static void wl18xx_sta_rc_update(struct wl1271 *wl, | |||
1374 | struct ieee80211_sta *sta, | 1374 | struct ieee80211_sta *sta, |
1375 | u32 changed) | 1375 | u32 changed) |
1376 | { | 1376 | { |
1377 | bool wide = sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40; | 1377 | bool wide = sta->bandwidth >= IEEE80211_STA_RX_BW_40; |
1378 | 1378 | ||
1379 | wl1271_debug(DEBUG_MAC80211, "mac80211 sta_rc_update wide %d", wide); | 1379 | wl1271_debug(DEBUG_MAC80211, "mac80211 sta_rc_update wide %d", wide); |
1380 | 1380 | ||
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 28a37576d568..2c2ff3e1f849 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -5636,7 +5636,6 @@ static int wl1271_init_ieee80211(struct wl1271 *wl) | |||
5636 | IEEE80211_HW_AP_LINK_PS | | 5636 | IEEE80211_HW_AP_LINK_PS | |
5637 | IEEE80211_HW_AMPDU_AGGREGATION | | 5637 | IEEE80211_HW_AMPDU_AGGREGATION | |
5638 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW | | 5638 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW | |
5639 | IEEE80211_HW_SCAN_WHILE_IDLE | | ||
5640 | IEEE80211_HW_QUEUE_CONTROL; | 5639 | IEEE80211_HW_QUEUE_CONTROL; |
5641 | 5640 | ||
5642 | wl->hw->wiphy->cipher_suites = cipher_suites; | 5641 | wl->hw->wiphy->cipher_suites = cipher_suites; |
diff --git a/drivers/ssb/driver_gpio.c b/drivers/ssb/driver_gpio.c index accabe39b320..dc109de228c6 100644 --- a/drivers/ssb/driver_gpio.c +++ b/drivers/ssb/driver_gpio.c | |||
@@ -196,3 +196,15 @@ int ssb_gpio_init(struct ssb_bus *bus) | |||
196 | 196 | ||
197 | return -1; | 197 | return -1; |
198 | } | 198 | } |
199 | |||
200 | int ssb_gpio_unregister(struct ssb_bus *bus) | ||
201 | { | ||
202 | if (ssb_chipco_available(&bus->chipco) || | ||
203 | ssb_extif_available(&bus->extif)) { | ||
204 | return gpiochip_remove(&bus->gpio); | ||
205 | } else { | ||
206 | SSB_WARN_ON(1); | ||
207 | } | ||
208 | |||
209 | return -1; | ||
210 | } | ||
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index db7705743a8f..4be144a99e03 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
@@ -443,6 +443,15 @@ static void ssb_devices_unregister(struct ssb_bus *bus) | |||
443 | 443 | ||
444 | void ssb_bus_unregister(struct ssb_bus *bus) | 444 | void ssb_bus_unregister(struct ssb_bus *bus) |
445 | { | 445 | { |
446 | int err; | ||
447 | |||
448 | err = ssb_gpio_unregister(bus); | ||
449 | if (err == -EBUSY) | ||
450 | ssb_dprintk(KERN_ERR PFX "Some GPIOs are still in use.\n"); | ||
451 | else if (err) | ||
452 | ssb_dprintk(KERN_ERR PFX | ||
453 | "Can not unregister GPIO driver: %i\n", err); | ||
454 | |||
446 | ssb_buses_lock(); | 455 | ssb_buses_lock(); |
447 | ssb_devices_unregister(bus); | 456 | ssb_devices_unregister(bus); |
448 | list_del(&bus->list); | 457 | list_del(&bus->list); |
diff --git a/drivers/ssb/ssb_private.h b/drivers/ssb/ssb_private.h index 53198dcec90e..466171b77f68 100644 --- a/drivers/ssb/ssb_private.h +++ b/drivers/ssb/ssb_private.h | |||
@@ -267,11 +267,16 @@ static inline void ssb_extif_init(struct ssb_extif *extif) | |||
267 | 267 | ||
268 | #ifdef CONFIG_SSB_DRIVER_GPIO | 268 | #ifdef CONFIG_SSB_DRIVER_GPIO |
269 | extern int ssb_gpio_init(struct ssb_bus *bus); | 269 | extern int ssb_gpio_init(struct ssb_bus *bus); |
270 | extern int ssb_gpio_unregister(struct ssb_bus *bus); | ||
270 | #else /* CONFIG_SSB_DRIVER_GPIO */ | 271 | #else /* CONFIG_SSB_DRIVER_GPIO */ |
271 | static inline int ssb_gpio_init(struct ssb_bus *bus) | 272 | static inline int ssb_gpio_init(struct ssb_bus *bus) |
272 | { | 273 | { |
273 | return -ENOTSUPP; | 274 | return -ENOTSUPP; |
274 | } | 275 | } |
276 | static inline int ssb_gpio_unregister(struct ssb_bus *bus) | ||
277 | { | ||
278 | return 0; | ||
279 | } | ||
275 | #endif /* CONFIG_SSB_DRIVER_GPIO */ | 280 | #endif /* CONFIG_SSB_DRIVER_GPIO */ |
276 | 281 | ||
277 | #endif /* LINUX_SSB_PRIVATE_H_ */ | 282 | #endif /* LINUX_SSB_PRIVATE_H_ */ |
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index 18c06a59c091..a233f64ca22f 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c | |||
@@ -424,7 +424,7 @@ int prism2_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) | |||
424 | goto exit; | 424 | goto exit; |
425 | } | 425 | } |
426 | 426 | ||
427 | cfg80211_put_bss(bss); | 427 | cfg80211_put_bss(wiphy, bss); |
428 | } | 428 | } |
429 | 429 | ||
430 | if (result) | 430 | if (result) |