aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-12 17:27:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-12 17:27:40 -0400
commitf9da455b93f6ba076935b4ef4589f61e529ae046 (patch)
tree3c4e69ce1ba1d6bf65915b97a76ca2172105b278 /drivers/net/wireless/ath/ath6kl
parent0e04c641b199435f3779454055f6a7de258ecdfc (diff)
parente5eca6d41f53db48edd8cf88a3f59d2c30227f8e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: 1) Seccomp BPF filters can now be JIT'd, from Alexei Starovoitov. 2) Multiqueue support in xen-netback and xen-netfront, from Andrew J Benniston. 3) Allow tweaking of aggregation settings in cdc_ncm driver, from Bjørn Mork. 4) BPF now has a "random" opcode, from Chema Gonzalez. 5) Add more BPF documentation and improve test framework, from Daniel Borkmann. 6) Support TCP fastopen over ipv6, from Daniel Lee. 7) Add software TSO helper functions and use them to support software TSO in mvneta and mv643xx_eth drivers. From Ezequiel Garcia. 8) Support software TSO in fec driver too, from Nimrod Andy. 9) Add Broadcom SYSTEMPORT driver, from Florian Fainelli. 10) Handle broadcasts more gracefully over macvlan when there are large numbers of interfaces configured, from Herbert Xu. 11) Allow more control over fwmark used for non-socket based responses, from Lorenzo Colitti. 12) Do TCP congestion window limiting based upon measurements, from Neal Cardwell. 13) Support busy polling in SCTP, from Neal Horman. 14) Allow RSS key to be configured via ethtool, from Venkata Duvvuru. 15) Bridge promisc mode handling improvements from Vlad Yasevich. 16) Don't use inetpeer entries to implement ID generation any more, it performs poorly, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits) rtnetlink: fix userspace API breakage for iproute2 < v3.9.0 tcp: fixing TLP's FIN recovery net: fec: Add software TSO support net: fec: Add Scatter/gather support net: fec: Increase buffer descriptor entry number net: fec: Factorize feature setting net: fec: Enable IP header hardware checksum net: fec: Factorize the .xmit transmit function bridge: fix compile error when compiling without IPv6 support bridge: fix smatch warning / potential null pointer dereference via-rhine: fix full-duplex with autoneg disable bnx2x: Enlarge the dorq threshold for VFs bnx2x: Check for UNDI in uncommon branch bnx2x: Fix 1G-baseT link bnx2x: Fix link for KR with swapped polarity lane sctp: Fix sk_ack_backlog wrap-around problem net/core: Add VF link state control policy net/fsl: xgmac_mdio is dependent on OF_MDIO net/fsl: Make xgmac_mdio read error message useful net_sched: drr: warn when qdisc is not work conserving ...
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl')
-rw-r--r--drivers/net/wireless/ath/ath6kl/Kconfig30
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c16
-rw-r--r--drivers/net/wireless/ath/ath6kl/core.c6
-rw-r--r--drivers/net/wireless/ath/ath6kl/debug.c4
-rw-r--r--drivers/net/wireless/ath/ath6kl/debug.h2
-rw-r--r--drivers/net/wireless/ath/ath6kl/hif.c3
-rw-r--r--drivers/net/wireless/ath/ath6kl/hif.h4
-rw-r--r--drivers/net/wireless/ath/ath6kl/htc_mbox.c23
-rw-r--r--drivers/net/wireless/ath/ath6kl/htc_pipe.c10
-rw-r--r--drivers/net/wireless/ath/ath6kl/init.c1
-rw-r--r--drivers/net/wireless/ath/ath6kl/main.c10
-rw-r--r--drivers/net/wireless/ath/ath6kl/sdio.c17
-rw-r--r--drivers/net/wireless/ath/ath6kl/target.h2
-rw-r--r--drivers/net/wireless/ath/ath6kl/txrx.c31
-rw-r--r--drivers/net/wireless/ath/ath6kl/usb.c2
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.c21
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.h3
17 files changed, 84 insertions, 101 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/Kconfig b/drivers/net/wireless/ath/ath6kl/Kconfig
index e39e5860a2e9..9c125ff083f7 100644
--- a/drivers/net/wireless/ath/ath6kl/Kconfig
+++ b/drivers/net/wireless/ath/ath6kl/Kconfig
@@ -1,11 +1,19 @@
1config ATH6KL 1config ATH6KL
2 tristate "Atheros mobile chipsets support" 2 tristate "Atheros mobile chipsets support"
3 depends on CFG80211
4 ---help---
5 This module adds core support for wireless adapters based on
6 Atheros AR6003 and AR6004 chipsets. You still need separate
7 bus drivers for USB and SDIO to be able to use real devices.
8
9 If you choose to build it as a module, it will be called
10 ath6kl_core. Please note that AR6002 and AR6001 are not
11 supported by this driver.
3 12
4config ATH6KL_SDIO 13config ATH6KL_SDIO
5 tristate "Atheros ath6kl SDIO support" 14 tristate "Atheros ath6kl SDIO support"
6 depends on ATH6KL 15 depends on ATH6KL
7 depends on MMC 16 depends on MMC
8 depends on CFG80211
9 ---help--- 17 ---help---
10 This module adds support for wireless adapters based on 18 This module adds support for wireless adapters based on
11 Atheros AR6003 and AR6004 chipsets running over SDIO. If you 19 Atheros AR6003 and AR6004 chipsets running over SDIO. If you
@@ -17,25 +25,31 @@ config ATH6KL_USB
17 tristate "Atheros ath6kl USB support" 25 tristate "Atheros ath6kl USB support"
18 depends on ATH6KL 26 depends on ATH6KL
19 depends on USB 27 depends on USB
20 depends on CFG80211
21 ---help--- 28 ---help---
22 This module adds support for wireless adapters based on 29 This module adds support for wireless adapters based on
23 Atheros AR6004 chipset running over USB. This is still under 30 Atheros AR6004 chipset and chipsets based on it running over
24 implementation and it isn't functional. If you choose to 31 USB. If you choose to build it as a module, it will be
25 build it as a module, it will be called ath6kl_usb. 32 called ath6kl_usb.
26 33
27config ATH6KL_DEBUG 34config ATH6KL_DEBUG
28 bool "Atheros ath6kl debugging" 35 bool "Atheros ath6kl debugging"
29 depends on ATH6KL 36 depends on ATH6KL
30 ---help--- 37 ---help---
31 Enables debug support 38 Enables ath6kl debug support, including debug messages
39 enabled with debug_mask module parameter and debugfs
40 interface.
41
42 If unsure, say Y to make it easier to debug problems.
32 43
33config ATH6KL_TRACING 44config ATH6KL_TRACING
34 bool "Atheros ath6kl tracing support" 45 bool "Atheros ath6kl tracing support"
35 depends on ATH6KL 46 depends on ATH6KL
36 depends on EVENT_TRACING 47 depends on EVENT_TRACING
37 ---help--- 48 ---help---
38 Select this to ath6kl use tracing infrastructure. 49 Select this to ath6kl use tracing infrastructure which, for
50 example, can be enabled with help of trace-cmd. All debug
51 messages and commands are delivered to using individually
52 enablable trace points.
39 53
40 If unsure, say Y to make it easier to debug problems. 54 If unsure, say Y to make it easier to debug problems.
41 55
@@ -47,3 +61,5 @@ config ATH6KL_REGDOMAIN
47 Enabling this makes it possible to change the regdomain in 61 Enabling this makes it possible to change the regdomain in
48 the firmware. This can be only enabled if regulatory requirements 62 the firmware. This can be only enabled if regulatory requirements
49 are taken into account. 63 are taken into account.
64
65 If unsure, say N.
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index c2c6f4604958..0e26f4a34fda 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -724,8 +724,9 @@ ath6kl_add_bss_if_needed(struct ath6kl_vif *vif,
724 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, 724 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
725 "added bss %pM to cfg80211\n", bssid); 725 "added bss %pM to cfg80211\n", bssid);
726 kfree(ie); 726 kfree(ie);
727 } else 727 } else {
728 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "cfg80211 already has a bss\n"); 728 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "cfg80211 already has a bss\n");
729 }
729 730
730 return bss; 731 return bss;
731} 732}
@@ -970,7 +971,6 @@ static int ath6kl_set_probed_ssids(struct ath6kl *ar,
970 ssid_list[i].flag, 971 ssid_list[i].flag,
971 ssid_list[i].ssid.ssid_len, 972 ssid_list[i].ssid.ssid_len,
972 ssid_list[i].ssid.ssid); 973 ssid_list[i].ssid.ssid);
973
974 } 974 }
975 975
976 /* Make sure no old entries are left behind */ 976 /* Make sure no old entries are left behind */
@@ -1759,7 +1759,7 @@ static bool is_rate_ht40(s32 rate, u8 *mcs, bool *sgi)
1759} 1759}
1760 1760
1761static int ath6kl_get_station(struct wiphy *wiphy, struct net_device *dev, 1761static int ath6kl_get_station(struct wiphy *wiphy, struct net_device *dev,
1762 u8 *mac, struct station_info *sinfo) 1762 const u8 *mac, struct station_info *sinfo)
1763{ 1763{
1764 struct ath6kl *ar = ath6kl_priv(dev); 1764 struct ath6kl *ar = ath6kl_priv(dev);
1765 struct ath6kl_vif *vif = netdev_priv(dev); 1765 struct ath6kl_vif *vif = netdev_priv(dev);
@@ -1897,7 +1897,6 @@ static int ath6kl_wow_usr(struct ath6kl *ar, struct ath6kl_vif *vif,
1897 1897
1898 /* Configure the patterns that we received from the user. */ 1898 /* Configure the patterns that we received from the user. */
1899 for (i = 0; i < wow->n_patterns; i++) { 1899 for (i = 0; i < wow->n_patterns; i++) {
1900
1901 /* 1900 /*
1902 * Convert given nl80211 specific mask value to equivalent 1901 * Convert given nl80211 specific mask value to equivalent
1903 * driver specific mask value and send it to the chip along 1902 * driver specific mask value and send it to the chip along
@@ -2850,8 +2849,9 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
2850 if (p.prwise_crypto_type == 0) { 2849 if (p.prwise_crypto_type == 0) {
2851 p.prwise_crypto_type = NONE_CRYPT; 2850 p.prwise_crypto_type = NONE_CRYPT;
2852 ath6kl_set_cipher(vif, 0, true); 2851 ath6kl_set_cipher(vif, 0, true);
2853 } else if (info->crypto.n_ciphers_pairwise == 1) 2852 } else if (info->crypto.n_ciphers_pairwise == 1) {
2854 ath6kl_set_cipher(vif, info->crypto.ciphers_pairwise[0], true); 2853 ath6kl_set_cipher(vif, info->crypto.ciphers_pairwise[0], true);
2854 }
2855 2855
2856 switch (info->crypto.cipher_group) { 2856 switch (info->crypto.cipher_group) {
2857 case WLAN_CIPHER_SUITE_WEP40: 2857 case WLAN_CIPHER_SUITE_WEP40:
@@ -2897,7 +2897,6 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
2897 } 2897 }
2898 2898
2899 if (info->inactivity_timeout) { 2899 if (info->inactivity_timeout) {
2900
2901 inactivity_timeout = info->inactivity_timeout; 2900 inactivity_timeout = info->inactivity_timeout;
2902 2901
2903 if (ar->hw.flags & ATH6KL_HW_AP_INACTIVITY_MINS) 2902 if (ar->hw.flags & ATH6KL_HW_AP_INACTIVITY_MINS)
@@ -2975,7 +2974,7 @@ static int ath6kl_stop_ap(struct wiphy *wiphy, struct net_device *dev)
2975static const u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; 2974static const u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
2976 2975
2977static int ath6kl_del_station(struct wiphy *wiphy, struct net_device *dev, 2976static int ath6kl_del_station(struct wiphy *wiphy, struct net_device *dev,
2978 u8 *mac) 2977 const u8 *mac)
2979{ 2978{
2980 struct ath6kl *ar = ath6kl_priv(dev); 2979 struct ath6kl *ar = ath6kl_priv(dev);
2981 struct ath6kl_vif *vif = netdev_priv(dev); 2980 struct ath6kl_vif *vif = netdev_priv(dev);
@@ -2986,7 +2985,8 @@ static int ath6kl_del_station(struct wiphy *wiphy, struct net_device *dev,
2986} 2985}
2987 2986
2988static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev, 2987static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev,
2989 u8 *mac, struct station_parameters *params) 2988 const u8 *mac,
2989 struct station_parameters *params)
2990{ 2990{
2991 struct ath6kl *ar = ath6kl_priv(dev); 2991 struct ath6kl *ar = ath6kl_priv(dev);
2992 struct ath6kl_vif *vif = netdev_priv(dev); 2992 struct ath6kl_vif *vif = netdev_priv(dev);
diff --git a/drivers/net/wireless/ath/ath6kl/core.c b/drivers/net/wireless/ath/ath6kl/core.c
index 4b46adbe8c92..b0b652042760 100644
--- a/drivers/net/wireless/ath/ath6kl/core.c
+++ b/drivers/net/wireless/ath/ath6kl/core.c
@@ -45,9 +45,9 @@ module_param(testmode, uint, 0644);
45module_param(recovery_enable, uint, 0644); 45module_param(recovery_enable, uint, 0644);
46module_param(heart_beat_poll, uint, 0644); 46module_param(heart_beat_poll, uint, 0644);
47MODULE_PARM_DESC(recovery_enable, "Enable recovery from firmware error"); 47MODULE_PARM_DESC(recovery_enable, "Enable recovery from firmware error");
48MODULE_PARM_DESC(heart_beat_poll, "Enable fw error detection periodic" \ 48MODULE_PARM_DESC(heart_beat_poll,
49 "polling. This also specifies the polling interval in" \ 49 "Enable fw error detection periodic polling in msecs - Also set recovery_enable for this to be effective");
50 "msecs. Set reocvery_enable for this to be effective"); 50
51 51
52void ath6kl_core_tx_complete(struct ath6kl *ar, struct sk_buff *skb) 52void ath6kl_core_tx_complete(struct ath6kl *ar, struct sk_buff *skb)
53{ 53{
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index dbfd17d0a5fa..55c4064dd506 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -172,7 +172,6 @@ void ath6kl_dump_registers(struct ath6kl_device *dev,
172 struct ath6kl_irq_proc_registers *irq_proc_reg, 172 struct ath6kl_irq_proc_registers *irq_proc_reg,
173 struct ath6kl_irq_enable_reg *irq_enable_reg) 173 struct ath6kl_irq_enable_reg *irq_enable_reg)
174{ 174{
175
176 ath6kl_dbg(ATH6KL_DBG_IRQ, ("<------- Register Table -------->\n")); 175 ath6kl_dbg(ATH6KL_DBG_IRQ, ("<------- Register Table -------->\n"));
177 176
178 if (irq_proc_reg != NULL) { 177 if (irq_proc_reg != NULL) {
@@ -219,7 +218,6 @@ void ath6kl_dump_registers(struct ath6kl_device *dev,
219 "GMBOX lookahead alias 1: 0x%x\n", 218 "GMBOX lookahead alias 1: 0x%x\n",
220 irq_proc_reg->rx_gmbox_lkahd_alias[1]); 219 irq_proc_reg->rx_gmbox_lkahd_alias[1]);
221 } 220 }
222
223 } 221 }
224 222
225 if (irq_enable_reg != NULL) { 223 if (irq_enable_reg != NULL) {
@@ -1396,7 +1394,6 @@ static ssize_t ath6kl_create_qos_write(struct file *file,
1396 const char __user *user_buf, 1394 const char __user *user_buf,
1397 size_t count, loff_t *ppos) 1395 size_t count, loff_t *ppos)
1398{ 1396{
1399
1400 struct ath6kl *ar = file->private_data; 1397 struct ath6kl *ar = file->private_data;
1401 struct ath6kl_vif *vif; 1398 struct ath6kl_vif *vif;
1402 char buf[200]; 1399 char buf[200];
@@ -1575,7 +1572,6 @@ static ssize_t ath6kl_delete_qos_write(struct file *file,
1575 const char __user *user_buf, 1572 const char __user *user_buf,
1576 size_t count, loff_t *ppos) 1573 size_t count, loff_t *ppos)
1577{ 1574{
1578
1579 struct ath6kl *ar = file->private_data; 1575 struct ath6kl *ar = file->private_data;
1580 struct ath6kl_vif *vif; 1576 struct ath6kl_vif *vif;
1581 char buf[100]; 1577 char buf[100];
diff --git a/drivers/net/wireless/ath/ath6kl/debug.h b/drivers/net/wireless/ath/ath6kl/debug.h
index ca9ba005f287..e194c10d9f00 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.h
+++ b/drivers/net/wireless/ath/ath6kl/debug.h
@@ -97,8 +97,8 @@ static inline void ath6kl_dump_registers(struct ath6kl_device *dev,
97 struct ath6kl_irq_proc_registers *irq_proc_reg, 97 struct ath6kl_irq_proc_registers *irq_proc_reg,
98 struct ath6kl_irq_enable_reg *irq_en_reg) 98 struct ath6kl_irq_enable_reg *irq_en_reg)
99{ 99{
100
101} 100}
101
102static inline void dump_cred_dist_stats(struct htc_target *target) 102static inline void dump_cred_dist_stats(struct htc_target *target)
103{ 103{
104} 104}
diff --git a/drivers/net/wireless/ath/ath6kl/hif.c b/drivers/net/wireless/ath/ath6kl/hif.c
index fea7709b5dda..18c070850a09 100644
--- a/drivers/net/wireless/ath/ath6kl/hif.c
+++ b/drivers/net/wireless/ath/ath6kl/hif.c
@@ -37,7 +37,6 @@ static int ath6kl_hif_cp_scat_dma_buf(struct hif_scatter_req *req,
37 buf = req->virt_dma_buf; 37 buf = req->virt_dma_buf;
38 38
39 for (i = 0; i < req->scat_entries; i++) { 39 for (i = 0; i < req->scat_entries; i++) {
40
41 if (from_dma) 40 if (from_dma)
42 memcpy(req->scat_list[i].buf, buf, 41 memcpy(req->scat_list[i].buf, buf,
43 req->scat_list[i].len); 42 req->scat_list[i].len);
@@ -116,7 +115,6 @@ static void ath6kl_hif_dump_fw_crash(struct ath6kl *ar)
116 le32_to_cpu(regdump_val[i + 2]), 115 le32_to_cpu(regdump_val[i + 2]),
117 le32_to_cpu(regdump_val[i + 3])); 116 le32_to_cpu(regdump_val[i + 3]));
118 } 117 }
119
120} 118}
121 119
122static int ath6kl_hif_proc_dbg_intr(struct ath6kl_device *dev) 120static int ath6kl_hif_proc_dbg_intr(struct ath6kl_device *dev)
@@ -701,5 +699,4 @@ int ath6kl_hif_setup(struct ath6kl_device *dev)
701 699
702fail_setup: 700fail_setup:
703 return status; 701 return status;
704
705} 702}
diff --git a/drivers/net/wireless/ath/ath6kl/hif.h b/drivers/net/wireless/ath/ath6kl/hif.h
index 61f6b21fb0ae..dc6bd8cd9b83 100644
--- a/drivers/net/wireless/ath/ath6kl/hif.h
+++ b/drivers/net/wireless/ath/ath6kl/hif.h
@@ -197,9 +197,9 @@ struct hif_scatter_req {
197 /* bounce buffer for upper layers to copy to/from */ 197 /* bounce buffer for upper layers to copy to/from */
198 u8 *virt_dma_buf; 198 u8 *virt_dma_buf;
199 199
200 struct hif_scatter_item scat_list[1];
201
202 u32 scat_q_depth; 200 u32 scat_q_depth;
201
202 struct hif_scatter_item scat_list[0];
203}; 203};
204 204
205struct ath6kl_irq_proc_registers { 205struct ath6kl_irq_proc_registers {
diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
index 65e5b719093d..e481f14b9878 100644
--- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c
+++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
@@ -112,9 +112,9 @@ static void ath6kl_credit_init(struct ath6kl_htc_credit_info *cred_info,
112 if (cur_ep_dist->endpoint == ENDPOINT_0) 112 if (cur_ep_dist->endpoint == ENDPOINT_0)
113 continue; 113 continue;
114 114
115 if (cur_ep_dist->svc_id == WMI_CONTROL_SVC) 115 if (cur_ep_dist->svc_id == WMI_CONTROL_SVC) {
116 cur_ep_dist->cred_norm = cur_ep_dist->cred_per_msg; 116 cur_ep_dist->cred_norm = cur_ep_dist->cred_per_msg;
117 else { 117 } else {
118 /* 118 /*
119 * For the remaining data endpoints, we assume that 119 * For the remaining data endpoints, we assume that
120 * each cred_per_msg are the same. We use a simple 120 * each cred_per_msg are the same. We use a simple
@@ -129,7 +129,6 @@ static void ath6kl_credit_init(struct ath6kl_htc_credit_info *cred_info,
129 count = (count * 3) >> 2; 129 count = (count * 3) >> 2;
130 count = max(count, cur_ep_dist->cred_per_msg); 130 count = max(count, cur_ep_dist->cred_per_msg);
131 cur_ep_dist->cred_norm = count; 131 cur_ep_dist->cred_norm = count;
132
133 } 132 }
134 133
135 ath6kl_dbg(ATH6KL_DBG_CREDIT, 134 ath6kl_dbg(ATH6KL_DBG_CREDIT,
@@ -549,7 +548,6 @@ static int htc_check_credits(struct htc_target *target,
549 enum htc_endpoint_id eid, unsigned int len, 548 enum htc_endpoint_id eid, unsigned int len,
550 int *req_cred) 549 int *req_cred)
551{ 550{
552
553 *req_cred = (len > target->tgt_cred_sz) ? 551 *req_cred = (len > target->tgt_cred_sz) ?
554 DIV_ROUND_UP(len, target->tgt_cred_sz) : 1; 552 DIV_ROUND_UP(len, target->tgt_cred_sz) : 1;
555 553
@@ -608,7 +606,6 @@ static void ath6kl_htc_tx_pkts_get(struct htc_target *target,
608 unsigned int len; 606 unsigned int len;
609 607
610 while (true) { 608 while (true) {
611
612 flags = 0; 609 flags = 0;
613 610
614 if (list_empty(&endpoint->txq)) 611 if (list_empty(&endpoint->txq))
@@ -889,7 +886,6 @@ static void ath6kl_htc_tx_from_queue(struct htc_target *target,
889 ac = target->dev->ar->ep2ac_map[endpoint->eid]; 886 ac = target->dev->ar->ep2ac_map[endpoint->eid];
890 887
891 while (true) { 888 while (true) {
892
893 if (list_empty(&endpoint->txq)) 889 if (list_empty(&endpoint->txq))
894 break; 890 break;
895 891
@@ -1190,7 +1186,6 @@ static void ath6kl_htc_mbox_flush_txep(struct htc_target *target,
1190 list_add_tail(&packet->list, &container); 1186 list_add_tail(&packet->list, &container);
1191 htc_tx_complete(endpoint, &container); 1187 htc_tx_complete(endpoint, &container);
1192 } 1188 }
1193
1194} 1189}
1195 1190
1196static void ath6kl_htc_flush_txep_all(struct htc_target *target) 1191static void ath6kl_htc_flush_txep_all(struct htc_target *target)
@@ -1394,7 +1389,6 @@ static int ath6kl_htc_rx_setup(struct htc_target *target,
1394 1389
1395 ep_cb = ep->ep_cb; 1390 ep_cb = ep->ep_cb;
1396 for (j = 0; j < n_msg; j++) { 1391 for (j = 0; j < n_msg; j++) {
1397
1398 /* 1392 /*
1399 * Reset flag, any packets allocated using the 1393 * Reset flag, any packets allocated using the
1400 * rx_alloc() API cannot be recycled on 1394 * rx_alloc() API cannot be recycled on
@@ -1424,9 +1418,9 @@ static int ath6kl_htc_rx_setup(struct htc_target *target,
1424 } 1418 }
1425 } 1419 }
1426 1420
1427 if (list_empty(&ep->rx_bufq)) 1421 if (list_empty(&ep->rx_bufq)) {
1428 packet = NULL; 1422 packet = NULL;
1429 else { 1423 } else {
1430 packet = list_first_entry(&ep->rx_bufq, 1424 packet = list_first_entry(&ep->rx_bufq,
1431 struct htc_packet, list); 1425 struct htc_packet, list);
1432 list_del(&packet->list); 1426 list_del(&packet->list);
@@ -1487,7 +1481,6 @@ static int ath6kl_htc_rx_alloc(struct htc_target *target,
1487 spin_lock_bh(&target->rx_lock); 1481 spin_lock_bh(&target->rx_lock);
1488 1482
1489 for (i = 0; i < msg; i++) { 1483 for (i = 0; i < msg; i++) {
1490
1491 htc_hdr = (struct htc_frame_hdr *)&lk_ahds[i]; 1484 htc_hdr = (struct htc_frame_hdr *)&lk_ahds[i];
1492 1485
1493 if (htc_hdr->eid >= ENDPOINT_MAX) { 1486 if (htc_hdr->eid >= ENDPOINT_MAX) {
@@ -1708,7 +1701,6 @@ static int htc_parse_trailer(struct htc_target *target,
1708 lk_ahd = (struct htc_lookahead_report *) record_buf; 1701 lk_ahd = (struct htc_lookahead_report *) record_buf;
1709 if ((lk_ahd->pre_valid == ((~lk_ahd->post_valid) & 0xFF)) && 1702 if ((lk_ahd->pre_valid == ((~lk_ahd->post_valid) & 0xFF)) &&
1710 next_lk_ahds) { 1703 next_lk_ahds) {
1711
1712 ath6kl_dbg(ATH6KL_DBG_HTC, 1704 ath6kl_dbg(ATH6KL_DBG_HTC,
1713 "htc rx lk_ahd found pre_valid 0x%x post_valid 0x%x\n", 1705 "htc rx lk_ahd found pre_valid 0x%x post_valid 0x%x\n",
1714 lk_ahd->pre_valid, lk_ahd->post_valid); 1706 lk_ahd->pre_valid, lk_ahd->post_valid);
@@ -1755,7 +1747,6 @@ static int htc_parse_trailer(struct htc_target *target,
1755 } 1747 }
1756 1748
1757 return 0; 1749 return 0;
1758
1759} 1750}
1760 1751
1761static int htc_proc_trailer(struct htc_target *target, 1752static int htc_proc_trailer(struct htc_target *target,
@@ -1776,7 +1767,6 @@ static int htc_proc_trailer(struct htc_target *target,
1776 status = 0; 1767 status = 0;
1777 1768
1778 while (len > 0) { 1769 while (len > 0) {
1779
1780 if (len < sizeof(struct htc_record_hdr)) { 1770 if (len < sizeof(struct htc_record_hdr)) {
1781 status = -ENOMEM; 1771 status = -ENOMEM;
1782 break; 1772 break;
@@ -2098,7 +2088,6 @@ static int ath6kl_htc_rx_fetch(struct htc_target *target,
2098 } 2088 }
2099 2089
2100 if (!fetched_pkts) { 2090 if (!fetched_pkts) {
2101
2102 packet = list_first_entry(rx_pktq, struct htc_packet, 2091 packet = list_first_entry(rx_pktq, struct htc_packet,
2103 list); 2092 list);
2104 2093
@@ -2173,7 +2162,6 @@ int ath6kl_htc_rxmsg_pending_handler(struct htc_target *target,
2173 look_aheads[0] = msg_look_ahead; 2162 look_aheads[0] = msg_look_ahead;
2174 2163
2175 while (true) { 2164 while (true) {
2176
2177 /* 2165 /*
2178 * First lookahead sets the expected endpoint IDs for all 2166 * First lookahead sets the expected endpoint IDs for all
2179 * packets in a bundle. 2167 * packets in a bundle.
@@ -2825,8 +2813,9 @@ static int ath6kl_htc_reset(struct htc_target *target)
2825 packet->buf = packet->buf_start; 2813 packet->buf = packet->buf_start;
2826 packet->endpoint = ENDPOINT_0; 2814 packet->endpoint = ENDPOINT_0;
2827 list_add_tail(&packet->list, &target->free_ctrl_rxbuf); 2815 list_add_tail(&packet->list, &target->free_ctrl_rxbuf);
2828 } else 2816 } else {
2829 list_add_tail(&packet->list, &target->free_ctrl_txbuf); 2817 list_add_tail(&packet->list, &target->free_ctrl_txbuf);
2818 }
2830 } 2819 }
2831 2820
2832 return 0; 2821 return 0;
diff --git a/drivers/net/wireless/ath/ath6kl/htc_pipe.c b/drivers/net/wireless/ath/ath6kl/htc_pipe.c
index 67aa924ed8b3..756fe52a12c8 100644
--- a/drivers/net/wireless/ath/ath6kl/htc_pipe.c
+++ b/drivers/net/wireless/ath/ath6kl/htc_pipe.c
@@ -137,7 +137,6 @@ static void get_htc_packet_credit_based(struct htc_target *target,
137 credits_required = 0; 137 credits_required = 0;
138 138
139 } else { 139 } else {
140
141 if (ep->cred_dist.credits < credits_required) 140 if (ep->cred_dist.credits < credits_required)
142 break; 141 break;
143 142
@@ -169,7 +168,6 @@ static void get_htc_packet_credit_based(struct htc_target *target,
169 /* queue this packet into the caller's queue */ 168 /* queue this packet into the caller's queue */
170 list_add_tail(&packet->list, queue); 169 list_add_tail(&packet->list, queue);
171 } 170 }
172
173} 171}
174 172
175static void get_htc_packet(struct htc_target *target, 173static void get_htc_packet(struct htc_target *target,
@@ -279,7 +277,6 @@ static int htc_issue_packets(struct htc_target *target,
279 list_add(&packet->list, pkt_queue); 277 list_add(&packet->list, pkt_queue);
280 break; 278 break;
281 } 279 }
282
283 } 280 }
284 281
285 if (status != 0) { 282 if (status != 0) {
@@ -385,7 +382,6 @@ static enum htc_send_queue_result htc_try_send(struct htc_target *target,
385 */ 382 */
386 list_for_each_entry_safe(packet, tmp_pkt, 383 list_for_each_entry_safe(packet, tmp_pkt,
387 txq, list) { 384 txq, list) {
388
389 ath6kl_dbg(ATH6KL_DBG_HTC, 385 ath6kl_dbg(ATH6KL_DBG_HTC,
390 "%s: Indicat overflowed TX pkts: %p\n", 386 "%s: Indicat overflowed TX pkts: %p\n",
391 __func__, packet); 387 __func__, packet);
@@ -403,7 +399,6 @@ static enum htc_send_queue_result htc_try_send(struct htc_target *target,
403 list_move_tail(&packet->list, 399 list_move_tail(&packet->list,
404 &send_queue); 400 &send_queue);
405 } 401 }
406
407 } 402 }
408 403
409 if (list_empty(&send_queue)) { 404 if (list_empty(&send_queue)) {
@@ -454,7 +449,6 @@ static enum htc_send_queue_result htc_try_send(struct htc_target *target,
454 * enough transmit resources. 449 * enough transmit resources.
455 */ 450 */
456 while (true) { 451 while (true) {
457
458 if (get_queue_depth(&ep->txq) == 0) 452 if (get_queue_depth(&ep->txq) == 0)
459 break; 453 break;
460 454
@@ -495,8 +489,8 @@ static enum htc_send_queue_result htc_try_send(struct htc_target *target,
495 } 489 }
496 490
497 spin_lock_bh(&target->tx_lock); 491 spin_lock_bh(&target->tx_lock);
498
499 } 492 }
493
500 /* done with this endpoint, we can clear the count */ 494 /* done with this endpoint, we can clear the count */
501 ep->tx_proc_cnt = 0; 495 ep->tx_proc_cnt = 0;
502 spin_unlock_bh(&target->tx_lock); 496 spin_unlock_bh(&target->tx_lock);
@@ -1106,7 +1100,6 @@ free_skb:
1106 dev_kfree_skb(skb); 1100 dev_kfree_skb(skb);
1107 1101
1108 return status; 1102 return status;
1109
1110} 1103}
1111 1104
1112static void htc_flush_rx_queue(struct htc_target *target, 1105static void htc_flush_rx_queue(struct htc_target *target,
@@ -1258,7 +1251,6 @@ static int ath6kl_htc_pipe_conn_service(struct htc_target *target,
1258 tx_alloc = 0; 1251 tx_alloc = 0;
1259 1252
1260 } else { 1253 } else {
1261
1262 tx_alloc = htc_get_credit_alloc(target, conn_req->svc_id); 1254 tx_alloc = htc_get_credit_alloc(target, conn_req->svc_id);
1263 if (tx_alloc == 0) { 1255 if (tx_alloc == 0) {
1264 status = -ENOMEM; 1256 status = -ENOMEM;
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 4f316bdcbab5..d5ef211f261c 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -1192,7 +1192,6 @@ static int ath6kl_upload_board_file(struct ath6kl *ar)
1192 1192
1193 if (board_ext_address && 1193 if (board_ext_address &&
1194 ar->fw_board_len == (board_data_size + board_ext_data_size)) { 1194 ar->fw_board_len == (board_data_size + board_ext_data_size)) {
1195
1196 /* write extended board data */ 1195 /* write extended board data */
1197 ath6kl_dbg(ATH6KL_DBG_BOOT, 1196 ath6kl_dbg(ATH6KL_DBG_BOOT,
1198 "writing extended board data to 0x%x (%d B)\n", 1197 "writing extended board data to 0x%x (%d B)\n",
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index 5839fc23bdc7..d56554674da4 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -571,7 +571,6 @@ void ath6kl_scan_complete_evt(struct ath6kl_vif *vif, int status)
571 571
572static int ath6kl_commit_ch_switch(struct ath6kl_vif *vif, u16 channel) 572static int ath6kl_commit_ch_switch(struct ath6kl_vif *vif, u16 channel)
573{ 573{
574
575 struct ath6kl *ar = vif->ar; 574 struct ath6kl *ar = vif->ar;
576 575
577 vif->profile.ch = cpu_to_le16(channel); 576 vif->profile.ch = cpu_to_le16(channel);
@@ -600,7 +599,6 @@ static int ath6kl_commit_ch_switch(struct ath6kl_vif *vif, u16 channel)
600 599
601static void ath6kl_check_ch_switch(struct ath6kl *ar, u16 channel) 600static void ath6kl_check_ch_switch(struct ath6kl *ar, u16 channel)
602{ 601{
603
604 struct ath6kl_vif *vif; 602 struct ath6kl_vif *vif;
605 int res = 0; 603 int res = 0;
606 604
@@ -692,9 +690,9 @@ void ath6kl_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid, bool ismcast)
692 cfg80211_michael_mic_failure(vif->ndev, sta->mac, 690 cfg80211_michael_mic_failure(vif->ndev, sta->mac,
693 NL80211_KEYTYPE_PAIRWISE, keyid, 691 NL80211_KEYTYPE_PAIRWISE, keyid,
694 tsc, GFP_KERNEL); 692 tsc, GFP_KERNEL);
695 } else 693 } else {
696 ath6kl_cfg80211_tkip_micerr_event(vif, keyid, ismcast); 694 ath6kl_cfg80211_tkip_micerr_event(vif, keyid, ismcast);
697 695 }
698} 696}
699 697
700static void ath6kl_update_target_stats(struct ath6kl_vif *vif, u8 *ptr, u32 len) 698static void ath6kl_update_target_stats(struct ath6kl_vif *vif, u8 *ptr, u32 len)
@@ -1093,8 +1091,9 @@ static int ath6kl_open(struct net_device *dev)
1093 if (test_bit(CONNECTED, &vif->flags)) { 1091 if (test_bit(CONNECTED, &vif->flags)) {
1094 netif_carrier_on(dev); 1092 netif_carrier_on(dev);
1095 netif_wake_queue(dev); 1093 netif_wake_queue(dev);
1096 } else 1094 } else {
1097 netif_carrier_off(dev); 1095 netif_carrier_off(dev);
1096 }
1098 1097
1099 return 0; 1098 return 0;
1100} 1099}
@@ -1146,7 +1145,6 @@ static int ath6kl_set_features(struct net_device *dev,
1146 dev->features = features | NETIF_F_RXCSUM; 1145 dev->features = features | NETIF_F_RXCSUM;
1147 return err; 1146 return err;
1148 } 1147 }
1149
1150 } 1148 }
1151 1149
1152 return err; 1150 return err;
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index 7126bdd4236c..339d89f14d32 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -348,7 +348,7 @@ static int ath6kl_sdio_alloc_prep_scat_req(struct ath6kl_sdio *ar_sdio,
348 int i, scat_req_sz, scat_list_sz, size; 348 int i, scat_req_sz, scat_list_sz, size;
349 u8 *virt_buf; 349 u8 *virt_buf;
350 350
351 scat_list_sz = (n_scat_entry - 1) * sizeof(struct hif_scatter_item); 351 scat_list_sz = n_scat_entry * sizeof(struct hif_scatter_item);
352 scat_req_sz = sizeof(*s_req) + scat_list_sz; 352 scat_req_sz = sizeof(*s_req) + scat_list_sz;
353 353
354 if (!virt_scat) 354 if (!virt_scat)
@@ -425,8 +425,9 @@ static int ath6kl_sdio_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf,
425 memcpy(tbuf, buf, len); 425 memcpy(tbuf, buf, len);
426 426
427 bounced = true; 427 bounced = true;
428 } else 428 } else {
429 tbuf = buf; 429 tbuf = buf;
430 }
430 431
431 ret = ath6kl_sdio_io(ar_sdio->func, request, addr, tbuf, len); 432 ret = ath6kl_sdio_io(ar_sdio->func, request, addr, tbuf, len);
432 if ((request & HIF_READ) && bounced) 433 if ((request & HIF_READ) && bounced)
@@ -441,9 +442,9 @@ static int ath6kl_sdio_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf,
441static void __ath6kl_sdio_write_async(struct ath6kl_sdio *ar_sdio, 442static void __ath6kl_sdio_write_async(struct ath6kl_sdio *ar_sdio,
442 struct bus_request *req) 443 struct bus_request *req)
443{ 444{
444 if (req->scat_req) 445 if (req->scat_req) {
445 ath6kl_sdio_scat_rw(ar_sdio, req); 446 ath6kl_sdio_scat_rw(ar_sdio, req);
446 else { 447 } else {
447 void *context; 448 void *context;
448 int status; 449 int status;
449 450
@@ -656,7 +657,6 @@ static void ath6kl_sdio_scatter_req_add(struct ath6kl *ar,
656 list_add_tail(&s_req->list, &ar_sdio->scat_req); 657 list_add_tail(&s_req->list, &ar_sdio->scat_req);
657 658
658 spin_unlock_bh(&ar_sdio->scat_lock); 659 spin_unlock_bh(&ar_sdio->scat_lock);
659
660} 660}
661 661
662/* scatter gather read write request */ 662/* scatter gather read write request */
@@ -674,9 +674,9 @@ static int ath6kl_sdio_async_rw_scatter(struct ath6kl *ar,
674 "hif-scatter: total len: %d scatter entries: %d\n", 674 "hif-scatter: total len: %d scatter entries: %d\n",
675 scat_req->len, scat_req->scat_entries); 675 scat_req->len, scat_req->scat_entries);
676 676
677 if (request & HIF_SYNCHRONOUS) 677 if (request & HIF_SYNCHRONOUS) {
678 status = ath6kl_sdio_scat_rw(ar_sdio, scat_req->busrequest); 678 status = ath6kl_sdio_scat_rw(ar_sdio, scat_req->busrequest);
679 else { 679 } else {
680 spin_lock_bh(&ar_sdio->wr_async_lock); 680 spin_lock_bh(&ar_sdio->wr_async_lock);
681 list_add_tail(&scat_req->busrequest->list, &ar_sdio->wr_asyncq); 681 list_add_tail(&scat_req->busrequest->list, &ar_sdio->wr_asyncq);
682 spin_unlock_bh(&ar_sdio->wr_async_lock); 682 spin_unlock_bh(&ar_sdio->wr_async_lock);
@@ -856,7 +856,6 @@ static int ath6kl_sdio_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
856 856
857 if (ar->suspend_mode == WLAN_POWER_STATE_WOW || 857 if (ar->suspend_mode == WLAN_POWER_STATE_WOW ||
858 (!ar->suspend_mode && wow)) { 858 (!ar->suspend_mode && wow)) {
859
860 ret = ath6kl_set_sdio_pm_caps(ar); 859 ret = ath6kl_set_sdio_pm_caps(ar);
861 if (ret) 860 if (ret)
862 goto cut_pwr; 861 goto cut_pwr;
@@ -878,7 +877,6 @@ static int ath6kl_sdio_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
878 877
879 if (ar->suspend_mode == WLAN_POWER_STATE_DEEP_SLEEP || 878 if (ar->suspend_mode == WLAN_POWER_STATE_DEEP_SLEEP ||
880 !ar->suspend_mode || try_deepsleep) { 879 !ar->suspend_mode || try_deepsleep) {
881
882 flags = sdio_get_host_pm_caps(func); 880 flags = sdio_get_host_pm_caps(func);
883 if (!(flags & MMC_PM_KEEP_POWER)) 881 if (!(flags & MMC_PM_KEEP_POWER))
884 goto cut_pwr; 882 goto cut_pwr;
@@ -1061,7 +1059,6 @@ static int ath6kl_sdio_bmi_credits(struct ath6kl *ar)
1061 1059
1062 timeout = jiffies + msecs_to_jiffies(BMI_COMMUNICATION_TIMEOUT); 1060 timeout = jiffies + msecs_to_jiffies(BMI_COMMUNICATION_TIMEOUT);
1063 while (time_before(jiffies, timeout) && !ar->bmi.cmd_credits) { 1061 while (time_before(jiffies, timeout) && !ar->bmi.cmd_credits) {
1064
1065 /* 1062 /*
1066 * Hit the credit counter with a 4-byte access, the first byte 1063 * Hit the credit counter with a 4-byte access, the first byte
1067 * read will hit the counter and cause a decrement, while the 1064 * read will hit the counter and cause a decrement, while the
diff --git a/drivers/net/wireless/ath/ath6kl/target.h b/drivers/net/wireless/ath/ath6kl/target.h
index a580a629a0da..d5eeeae7711b 100644
--- a/drivers/net/wireless/ath/ath6kl/target.h
+++ b/drivers/net/wireless/ath/ath6kl/target.h
@@ -289,7 +289,7 @@ struct host_interest {
289 u32 hi_hp_rx_traffic_ratio; /* 0xd8 */ 289 u32 hi_hp_rx_traffic_ratio; /* 0xd8 */
290 290
291 /* test applications flags */ 291 /* test applications flags */
292 u32 hi_test_apps_related ; /* 0xdc */ 292 u32 hi_test_apps_related; /* 0xdc */
293 /* location of test script */ 293 /* location of test script */
294 u32 hi_ota_testscript; /* 0xe0 */ 294 u32 hi_ota_testscript; /* 0xe0 */
295 /* location of CAL data */ 295 /* location of CAL data */
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index ebb24045a8ae..40432fe7a5d2 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -125,8 +125,9 @@ static bool ath6kl_process_uapsdq(struct ath6kl_sta *conn,
125 *flags |= WMI_DATA_HDR_FLAGS_UAPSD; 125 *flags |= WMI_DATA_HDR_FLAGS_UAPSD;
126 spin_unlock_bh(&conn->psq_lock); 126 spin_unlock_bh(&conn->psq_lock);
127 return false; 127 return false;
128 } else if (!conn->apsd_info) 128 } else if (!conn->apsd_info) {
129 return false; 129 return false;
130 }
130 131
131 if (test_bit(WMM_ENABLED, &vif->flags)) { 132 if (test_bit(WMM_ENABLED, &vif->flags)) {
132 ether_type = be16_to_cpu(datap->h_proto); 133 ether_type = be16_to_cpu(datap->h_proto);
@@ -316,8 +317,9 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb,
316 cookie = NULL; 317 cookie = NULL;
317 ath6kl_err("wmi ctrl ep full, dropping pkt : 0x%p, len:%d\n", 318 ath6kl_err("wmi ctrl ep full, dropping pkt : 0x%p, len:%d\n",
318 skb, skb->len); 319 skb, skb->len);
319 } else 320 } else {
320 cookie = ath6kl_alloc_cookie(ar); 321 cookie = ath6kl_alloc_cookie(ar);
322 }
321 323
322 if (cookie == NULL) { 324 if (cookie == NULL) {
323 spin_unlock_bh(&ar->lock); 325 spin_unlock_bh(&ar->lock);
@@ -359,7 +361,7 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)
359 struct ath6kl_vif *vif = netdev_priv(dev); 361 struct ath6kl_vif *vif = netdev_priv(dev);
360 u32 map_no = 0; 362 u32 map_no = 0;
361 u16 htc_tag = ATH6KL_DATA_PKT_TAG; 363 u16 htc_tag = ATH6KL_DATA_PKT_TAG;
362 u8 ac = 99 ; /* initialize to unmapped ac */ 364 u8 ac = 99; /* initialize to unmapped ac */
363 bool chk_adhoc_ps_mapping = false; 365 bool chk_adhoc_ps_mapping = false;
364 int ret; 366 int ret;
365 struct wmi_tx_meta_v2 meta_v2; 367 struct wmi_tx_meta_v2 meta_v2;
@@ -449,8 +451,9 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)
449 if (ret) 451 if (ret)
450 goto fail_tx; 452 goto fail_tx;
451 } 453 }
452 } else 454 } else {
453 goto fail_tx; 455 goto fail_tx;
456 }
454 457
455 spin_lock_bh(&ar->lock); 458 spin_lock_bh(&ar->lock);
456 459
@@ -702,7 +705,6 @@ void ath6kl_tx_complete(struct htc_target *target,
702 705
703 /* reap completed packets */ 706 /* reap completed packets */
704 while (!list_empty(packet_queue)) { 707 while (!list_empty(packet_queue)) {
705
706 packet = list_first_entry(packet_queue, struct htc_packet, 708 packet = list_first_entry(packet_queue, struct htc_packet,
707 list); 709 list);
708 list_del(&packet->list); 710 list_del(&packet->list);
@@ -1089,8 +1091,9 @@ static void aggr_deque_frms(struct aggr_info_conn *agg_conn, u8 tid,
1089 else 1091 else
1090 skb_queue_tail(&rxtid->q, node->skb); 1092 skb_queue_tail(&rxtid->q, node->skb);
1091 node->skb = NULL; 1093 node->skb = NULL;
1092 } else 1094 } else {
1093 stats->num_hole++; 1095 stats->num_hole++;
1096 }
1094 1097
1095 rxtid->seq_next = ATH6KL_NEXT_SEQ_NO(rxtid->seq_next); 1098 rxtid->seq_next = ATH6KL_NEXT_SEQ_NO(rxtid->seq_next);
1096 idx = AGGR_WIN_IDX(rxtid->seq_next, rxtid->hold_q_sz); 1099 idx = AGGR_WIN_IDX(rxtid->seq_next, rxtid->hold_q_sz);
@@ -1211,7 +1214,7 @@ static bool aggr_process_recv_frm(struct aggr_info_conn *agg_conn, u8 tid,
1211 return is_queued; 1214 return is_queued;
1212 1215
1213 spin_lock_bh(&rxtid->lock); 1216 spin_lock_bh(&rxtid->lock);
1214 for (idx = 0 ; idx < rxtid->hold_q_sz; idx++) { 1217 for (idx = 0; idx < rxtid->hold_q_sz; idx++) {
1215 if (rxtid->hold_q[idx].skb) { 1218 if (rxtid->hold_q[idx].skb) {
1216 /* 1219 /*
1217 * There is a frame in the queue and no 1220 * There is a frame in the queue and no
@@ -1265,7 +1268,6 @@ static void ath6kl_uapsd_trigger_frame_rx(struct ath6kl_vif *vif,
1265 is_apsdq_empty_at_start = is_apsdq_empty; 1268 is_apsdq_empty_at_start = is_apsdq_empty;
1266 1269
1267 while ((!is_apsdq_empty) && (num_frames_to_deliver)) { 1270 while ((!is_apsdq_empty) && (num_frames_to_deliver)) {
1268
1269 spin_lock_bh(&conn->psq_lock); 1271 spin_lock_bh(&conn->psq_lock);
1270 skb = skb_dequeue(&conn->apsdq); 1272 skb = skb_dequeue(&conn->apsdq);
1271 is_apsdq_empty = skb_queue_empty(&conn->apsdq); 1273 is_apsdq_empty = skb_queue_empty(&conn->apsdq);
@@ -1606,16 +1608,18 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
1606 if (!conn) 1608 if (!conn)
1607 return; 1609 return;
1608 aggr_conn = conn->aggr_conn; 1610 aggr_conn = conn->aggr_conn;
1609 } else 1611 } else {
1610 aggr_conn = vif->aggr_cntxt->aggr_conn; 1612 aggr_conn = vif->aggr_cntxt->aggr_conn;
1613 }
1611 1614
1612 if (aggr_process_recv_frm(aggr_conn, tid, seq_no, 1615 if (aggr_process_recv_frm(aggr_conn, tid, seq_no,
1613 is_amsdu, skb)) { 1616 is_amsdu, skb)) {
1614 /* aggregation code will handle the skb */ 1617 /* aggregation code will handle the skb */
1615 return; 1618 return;
1616 } 1619 }
1617 } else if (!is_broadcast_ether_addr(datap->h_dest)) 1620 } else if (!is_broadcast_ether_addr(datap->h_dest)) {
1618 vif->net_stats.multicast++; 1621 vif->net_stats.multicast++;
1622 }
1619 1623
1620 ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb); 1624 ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb);
1621} 1625}
@@ -1710,8 +1714,9 @@ void aggr_recv_addba_req_evt(struct ath6kl_vif *vif, u8 tid_mux, u16 seq_no,
1710 sta = ath6kl_find_sta_by_aid(vif->ar, aid); 1714 sta = ath6kl_find_sta_by_aid(vif->ar, aid);
1711 if (sta) 1715 if (sta)
1712 aggr_conn = sta->aggr_conn; 1716 aggr_conn = sta->aggr_conn;
1713 } else 1717 } else {
1714 aggr_conn = vif->aggr_cntxt->aggr_conn; 1718 aggr_conn = vif->aggr_cntxt->aggr_conn;
1719 }
1715 1720
1716 if (!aggr_conn) 1721 if (!aggr_conn)
1717 return; 1722 return;
@@ -1766,7 +1771,6 @@ void aggr_conn_init(struct ath6kl_vif *vif, struct aggr_info *aggr_info,
1766 skb_queue_head_init(&rxtid->q); 1771 skb_queue_head_init(&rxtid->q);
1767 spin_lock_init(&rxtid->lock); 1772 spin_lock_init(&rxtid->lock);
1768 } 1773 }
1769
1770} 1774}
1771 1775
1772struct aggr_info *aggr_init(struct ath6kl_vif *vif) 1776struct aggr_info *aggr_init(struct ath6kl_vif *vif)
@@ -1806,8 +1810,9 @@ void aggr_recv_delba_req_evt(struct ath6kl_vif *vif, u8 tid_mux)
1806 sta = ath6kl_find_sta_by_aid(vif->ar, aid); 1810 sta = ath6kl_find_sta_by_aid(vif->ar, aid);
1807 if (sta) 1811 if (sta)
1808 aggr_conn = sta->aggr_conn; 1812 aggr_conn = sta->aggr_conn;
1809 } else 1813 } else {
1810 aggr_conn = vif->aggr_cntxt->aggr_conn; 1814 aggr_conn = vif->aggr_cntxt->aggr_conn;
1815 }
1811 1816
1812 if (!aggr_conn) 1817 if (!aggr_conn)
1813 return; 1818 return;
diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
index 56c3fd5cef65..3afc5a463d06 100644
--- a/drivers/net/wireless/ath/ath6kl/usb.c
+++ b/drivers/net/wireless/ath/ath6kl/usb.c
@@ -236,7 +236,6 @@ static void ath6kl_usb_free_pipe_resources(struct ath6kl_usb_pipe *pipe)
236 break; 236 break;
237 kfree(urb_context); 237 kfree(urb_context);
238 } 238 }
239
240} 239}
241 240
242static void ath6kl_usb_cleanup_pipe_resources(struct ath6kl_usb *ar_usb) 241static void ath6kl_usb_cleanup_pipe_resources(struct ath6kl_usb *ar_usb)
@@ -245,7 +244,6 @@ static void ath6kl_usb_cleanup_pipe_resources(struct ath6kl_usb *ar_usb)
245 244
246 for (i = 0; i < ATH6KL_USB_PIPE_MAX; i++) 245 for (i = 0; i < ATH6KL_USB_PIPE_MAX; i++)
247 ath6kl_usb_free_pipe_resources(&ar_usb->pipes[i]); 246 ath6kl_usb_free_pipe_resources(&ar_usb->pipes[i]);
248
249} 247}
250 248
251static u8 ath6kl_usb_get_logical_pipe_num(struct ath6kl_usb *ar_usb, 249static u8 ath6kl_usb_get_logical_pipe_num(struct ath6kl_usb *ar_usb,
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 8b4ce28e3ce8..4d7f9e4712e9 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -289,8 +289,9 @@ int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, u8 if_idx,
289 ath6kl_wmi_determine_user_priority(((u8 *) llc_hdr) + 289 ath6kl_wmi_determine_user_priority(((u8 *) llc_hdr) +
290 sizeof(struct ath6kl_llc_snap_hdr), 290 sizeof(struct ath6kl_llc_snap_hdr),
291 layer2_priority); 291 layer2_priority);
292 } else 292 } else {
293 usr_pri = layer2_priority & 0x7; 293 usr_pri = layer2_priority & 0x7;
294 }
294 295
295 /* 296 /*
296 * Queue the EAPOL frames in the same WMM_AC_VO queue 297 * Queue the EAPOL frames in the same WMM_AC_VO queue
@@ -359,8 +360,9 @@ int ath6kl_wmi_dot11_hdr_remove(struct wmi *wmi, struct sk_buff *skb)
359 hdr_size = roundup(sizeof(struct ieee80211_qos_hdr), 360 hdr_size = roundup(sizeof(struct ieee80211_qos_hdr),
360 sizeof(u32)); 361 sizeof(u32));
361 skb_pull(skb, hdr_size); 362 skb_pull(skb, hdr_size);
362 } else if (sub_type == cpu_to_le16(IEEE80211_STYPE_DATA)) 363 } else if (sub_type == cpu_to_le16(IEEE80211_STYPE_DATA)) {
363 skb_pull(skb, sizeof(struct ieee80211_hdr_3addr)); 364 skb_pull(skb, sizeof(struct ieee80211_hdr_3addr));
365 }
364 366
365 datap = skb->data; 367 datap = skb->data;
366 llc_hdr = (struct ath6kl_llc_snap_hdr *)(datap); 368 llc_hdr = (struct ath6kl_llc_snap_hdr *)(datap);
@@ -936,7 +938,6 @@ ath6kl_regd_find_country_by_rd(u16 regdmn)
936 938
937static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len) 939static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len)
938{ 940{
939
940 struct ath6kl_wmi_regdomain *ev; 941 struct ath6kl_wmi_regdomain *ev;
941 struct country_code_to_enum_rd *country = NULL; 942 struct country_code_to_enum_rd *country = NULL;
942 struct reg_dmn_pair_mapping *regpair = NULL; 943 struct reg_dmn_pair_mapping *regpair = NULL;
@@ -946,10 +947,9 @@ static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len)
946 ev = (struct ath6kl_wmi_regdomain *) datap; 947 ev = (struct ath6kl_wmi_regdomain *) datap;
947 reg_code = le32_to_cpu(ev->reg_code); 948 reg_code = le32_to_cpu(ev->reg_code);
948 949
949 if ((reg_code >> ATH6KL_COUNTRY_RD_SHIFT) & COUNTRY_ERD_FLAG) 950 if ((reg_code >> ATH6KL_COUNTRY_RD_SHIFT) & COUNTRY_ERD_FLAG) {
950 country = ath6kl_regd_find_country((u16) reg_code); 951 country = ath6kl_regd_find_country((u16) reg_code);
951 else if (!(((u16) reg_code & WORLD_SKU_MASK) == WORLD_SKU_PREFIX)) { 952 } else if (!(((u16) reg_code & WORLD_SKU_MASK) == WORLD_SKU_PREFIX)) {
952
953 regpair = ath6kl_get_regpair((u16) reg_code); 953 regpair = ath6kl_get_regpair((u16) reg_code);
954 country = ath6kl_regd_find_country_by_rd((u16) reg_code); 954 country = ath6kl_regd_find_country_by_rd((u16) reg_code);
955 if (regpair) 955 if (regpair)
@@ -1499,7 +1499,6 @@ static int ath6kl_wmi_cac_event_rx(struct wmi *wmi, u8 *datap, int len,
1499 1499
1500 if ((reply->cac_indication == CAC_INDICATION_ADMISSION_RESP) && 1500 if ((reply->cac_indication == CAC_INDICATION_ADMISSION_RESP) &&
1501 (reply->status_code != IEEE80211_TSPEC_STATUS_ADMISS_ACCEPTED)) { 1501 (reply->status_code != IEEE80211_TSPEC_STATUS_ADMISS_ACCEPTED)) {
1502
1503 ts = (struct ieee80211_tspec_ie *) &(reply->tspec_suggestion); 1502 ts = (struct ieee80211_tspec_ie *) &(reply->tspec_suggestion);
1504 tsinfo = le16_to_cpu(ts->tsinfo); 1503 tsinfo = le16_to_cpu(ts->tsinfo);
1505 tsid = (tsinfo >> IEEE80211_WMM_IE_TSPEC_TID_SHIFT) & 1504 tsid = (tsinfo >> IEEE80211_WMM_IE_TSPEC_TID_SHIFT) &
@@ -1530,7 +1529,6 @@ static int ath6kl_wmi_cac_event_rx(struct wmi *wmi, u8 *datap, int len,
1530 * for delete qos stream from AP 1529 * for delete qos stream from AP
1531 */ 1530 */
1532 else if (reply->cac_indication == CAC_INDICATION_DELETE) { 1531 else if (reply->cac_indication == CAC_INDICATION_DELETE) {
1533
1534 ts = (struct ieee80211_tspec_ie *) &(reply->tspec_suggestion); 1532 ts = (struct ieee80211_tspec_ie *) &(reply->tspec_suggestion);
1535 tsinfo = le16_to_cpu(ts->tsinfo); 1533 tsinfo = le16_to_cpu(ts->tsinfo);
1536 ts_id = ((tsinfo >> IEEE80211_WMM_IE_TSPEC_TID_SHIFT) & 1534 ts_id = ((tsinfo >> IEEE80211_WMM_IE_TSPEC_TID_SHIFT) &
@@ -2322,7 +2320,7 @@ int ath6kl_wmi_addkey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index,
2322 return ret; 2320 return ret;
2323} 2321}
2324 2322
2325int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 if_idx, u8 *krk) 2323int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 if_idx, const u8 *krk)
2326{ 2324{
2327 struct sk_buff *skb; 2325 struct sk_buff *skb;
2328 struct wmi_add_krk_cmd *cmd; 2326 struct wmi_add_krk_cmd *cmd;
@@ -2479,7 +2477,6 @@ static int ath6kl_wmi_sync_point(struct wmi *wmi, u8 if_idx)
2479 goto free_data_skb; 2477 goto free_data_skb;
2480 2478
2481 for (index = 0; index < num_pri_streams; index++) { 2479 for (index = 0; index < num_pri_streams; index++) {
2482
2483 if (WARN_ON(!data_sync_bufs[index].skb)) 2480 if (WARN_ON(!data_sync_bufs[index].skb))
2484 goto free_data_skb; 2481 goto free_data_skb;
2485 2482
@@ -2704,7 +2701,6 @@ static void ath6kl_wmi_relinquish_implicit_pstream_credits(struct wmi *wmi)
2704 2701
2705 for (i = 0; i < WMM_NUM_AC; i++) { 2702 for (i = 0; i < WMM_NUM_AC; i++) {
2706 if (stream_exist & (1 << i)) { 2703 if (stream_exist & (1 << i)) {
2707
2708 /* 2704 /*
2709 * FIXME: Is this lock & unlock inside 2705 * FIXME: Is this lock & unlock inside
2710 * for loop correct? may need rework. 2706 * for loop correct? may need rework.
@@ -2870,8 +2866,9 @@ int ath6kl_wmi_set_host_sleep_mode_cmd(struct wmi *wmi, u8 if_idx,
2870 if (host_mode == ATH6KL_HOST_MODE_ASLEEP) { 2866 if (host_mode == ATH6KL_HOST_MODE_ASLEEP) {
2871 ath6kl_wmi_relinquish_implicit_pstream_credits(wmi); 2867 ath6kl_wmi_relinquish_implicit_pstream_credits(wmi);
2872 cmd->asleep = cpu_to_le32(1); 2868 cmd->asleep = cpu_to_le32(1);
2873 } else 2869 } else {
2874 cmd->awake = cpu_to_le32(1); 2870 cmd->awake = cpu_to_le32(1);
2871 }
2875 2872
2876 ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, 2873 ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb,
2877 WMI_SET_HOST_SLEEP_MODE_CMDID, 2874 WMI_SET_HOST_SLEEP_MODE_CMDID,
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 5c702ae4d9f8..bb23fc00111d 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -898,7 +898,6 @@ struct wmi_start_scan_cmd {
898 * flags here 898 * flags here
899 */ 899 */
900enum wmi_scan_ctrl_flags_bits { 900enum wmi_scan_ctrl_flags_bits {
901
902 /* set if can scan in the connect cmd */ 901 /* set if can scan in the connect cmd */
903 CONNECT_SCAN_CTRL_FLAGS = 0x01, 902 CONNECT_SCAN_CTRL_FLAGS = 0x01,
904 903
@@ -2617,7 +2616,7 @@ int ath6kl_wmi_addkey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index,
2617 u8 *key_material, 2616 u8 *key_material,
2618 u8 key_op_ctrl, u8 *mac_addr, 2617 u8 key_op_ctrl, u8 *mac_addr,
2619 enum wmi_sync_flag sync_flag); 2618 enum wmi_sync_flag sync_flag);
2620int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 if_idx, u8 *krk); 2619int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 if_idx, const u8 *krk);
2621int ath6kl_wmi_deletekey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index); 2620int ath6kl_wmi_deletekey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index);
2622int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, u8 if_idx, const u8 *bssid, 2621int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, u8 if_idx, const u8 *bssid,
2623 const u8 *pmkid, bool set); 2622 const u8 *pmkid, bool set);