diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-02-15 14:06:32 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-02-15 14:06:32 -0500 |
commit | 9e97d14b4923da524d202f2e005d5d30b70db9d6 (patch) | |
tree | d77b0c7f1f8890fb75098c550277fe9b81c340b3 | |
parent | ded652a67464b1fa66616954bc608ead9ec02fb6 (diff) | |
parent | 6f7c1adb7529935df6e288a1436003c1f6dc0653 (diff) |
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 109 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/htc_pipe.c | 26 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 36 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/usb.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 28 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.h | 6 |
8 files changed, 119 insertions, 96 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index a29f04e30830..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); |
@@ -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 d366cf105c7c..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; |
@@ -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); |