Permalink
Browse files

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…

…t/linville/wireless-next into for-davem

Conflicts:
	drivers/net/wireless/iwlwifi/dvm/tx.c
	drivers/net/wireless/ti/wlcore/sdio.c
	drivers/net/wireless/ti/wlcore/spi.c
  • Loading branch information...
2 parents 4153577 + 9e97d14 commit 98d5fac2330779e6eea6431a90b44c7476260dcc @linvjw linvjw committed Feb 18, 2013
Showing with 12,387 additions and 3,236 deletions.
  1. +5 −5 arch/arm/mach-omap2/board-omap3evm.c
  2. +4 −0 drivers/net/wireless/ath/ath5k/phy.c
  3. +2 −0 drivers/net/wireless/ath/ath5k/reset.c
  4. +73 −44 drivers/net/wireless/ath/ath6kl/cfg80211.c
  5. +0 −2 drivers/net/wireless/ath/ath6kl/cfg80211.h
  6. +1 −1 drivers/net/wireless/ath/ath6kl/core.h
  7. +20 −6 drivers/net/wireless/ath/ath6kl/htc_pipe.c
  8. +1 −35 drivers/net/wireless/ath/ath6kl/init.c
  9. +2 −4 drivers/net/wireless/ath/ath6kl/usb.c
  10. +21 −9 drivers/net/wireless/ath/ath6kl/wmi.c
  11. +6 −0 drivers/net/wireless/ath/ath6kl/wmi.h
  12. +1 −0 drivers/net/wireless/ath/ath9k/ath9k.h
  13. +87 −26 drivers/net/wireless/ath/ath9k/beacon.c
  14. +5 −8 drivers/net/wireless/ath/ath9k/main.c
  15. +1 −1 drivers/net/wireless/ath/ath9k/rc.c
  16. +1 −1 drivers/net/wireless/ath/ath9k/recv.c
  17. +2 −3 drivers/net/wireless/ath/ath9k/xmit.c
  18. +1 −1 drivers/net/wireless/ath/carl9170/main.c
  19. +1 −1 drivers/net/wireless/ath/wil6210/cfg80211.c
  20. +1 −1 drivers/net/wireless/ath/wil6210/wmi.c
  21. +2 −1 drivers/net/wireless/brcm80211/brcmfmac/Makefile
  22. +48 −9 drivers/net/wireless/brcm80211/brcmfmac/dhd.h
  23. +4 −15 drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
  24. +8 −0 drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c
  25. +190 −121 drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
  26. +5 −20 drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
  27. +5 −6 drivers/net/wireless/brcm80211/brcmfmac/fweh.c
  28. +5 −1 drivers/net/wireless/brcm80211/brcmfmac/fweh.h
  29. +5 −2 drivers/net/wireless/brcm80211/brcmfmac/fwil.c
  30. +66 −0 drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h
  31. +2,277 −0 drivers/net/wireless/brcm80211/brcmfmac/p2p.c
  32. +183 −0 drivers/net/wireless/brcm80211/brcmfmac/p2p.h
  33. +3 −8 drivers/net/wireless/brcm80211/brcmfmac/usb.c
  34. +999 −376 drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
  35. +111 −2 drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
  36. +1 −2 drivers/net/wireless/brcm80211/brcmsmac/channel.c
  37. +31 −34 drivers/net/wireless/brcm80211/brcmsmac/main.c
  38. +27 −24 drivers/net/wireless/iwlegacy/3945-mac.c
  39. +22 −16 drivers/net/wireless/iwlegacy/4965-mac.c
  40. +1 −2 drivers/net/wireless/iwlegacy/4965-rs.c
  41. +18 −14 drivers/net/wireless/iwlegacy/common.c
  42. +1 −1 drivers/net/wireless/iwlwifi/dvm/agn.h
  43. +18 −0 drivers/net/wireless/iwlwifi/dvm/commands.h
  44. +134 −32 drivers/net/wireless/iwlwifi/dvm/mac80211.c
  45. +5 −7 drivers/net/wireless/iwlwifi/dvm/rs.c
  46. +1 −1 drivers/net/wireless/iwlwifi/dvm/rx.c
  47. +2 −3 drivers/net/wireless/iwlwifi/dvm/rxon.c
  48. +14 −26 drivers/net/wireless/iwlwifi/dvm/sta.c
  49. +17 −9 drivers/net/wireless/iwlwifi/dvm/tx.c
  50. +6 −4 drivers/net/wireless/iwlwifi/iwl-op-mode.h
  51. +27 −2 drivers/net/wireless/iwlwifi/iwl-trans.h
  52. +144 −30 drivers/net/wireless/iwlwifi/mvm/d3.c
  53. +3 −0 drivers/net/wireless/iwlwifi/mvm/fw-api.h
  54. +0 −4 drivers/net/wireless/iwlwifi/mvm/fw.c
  55. +5 −1 drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
  56. +13 −7 drivers/net/wireless/iwlwifi/mvm/mac80211.c
  57. +22 −19 drivers/net/wireless/iwlwifi/mvm/ops.c
  58. +1 −1 drivers/net/wireless/iwlwifi/mvm/power.c
  59. +24 −5 drivers/net/wireless/iwlwifi/mvm/quota.c
  60. +7 −23 drivers/net/wireless/iwlwifi/mvm/rs.c
  61. +1 −1 drivers/net/wireless/iwlwifi/mvm/rx.c
  62. +32 −8 drivers/net/wireless/iwlwifi/mvm/sta.c
  63. +5 −1 drivers/net/wireless/iwlwifi/mvm/sta.h
  64. +87 −145 drivers/net/wireless/iwlwifi/mvm/time-event.c
  65. +6 −6 drivers/net/wireless/iwlwifi/mvm/tx.c
  66. +1 −2 drivers/net/wireless/iwlwifi/pcie/internal.h
  67. +25 −15 drivers/net/wireless/iwlwifi/pcie/rx.c
  68. +4 −7 drivers/net/wireless/iwlwifi/pcie/trans.c
  69. +4 −4 drivers/net/wireless/iwlwifi/pcie/tx.c
  70. +4 −4 drivers/net/wireless/libertas/cfg.c
  71. +1 −0 drivers/net/wireless/mac80211_hwsim.c
  72. +2 −2 drivers/net/wireless/mwifiex/Kconfig
  73. +1 −1 drivers/net/wireless/mwifiex/cfg80211.c
  74. +501 −268 drivers/net/wireless/mwifiex/pcie.c
  75. +181 −34 drivers/net/wireless/mwifiex/pcie.h
  76. +1 −1 drivers/net/wireless/mwifiex/scan.c
  77. +3 −8 drivers/net/wireless/mwifiex/sta_ioctl.c
  78. +2 −0 drivers/net/wireless/mwl8k.c
  79. +2 −2 drivers/net/wireless/orinoco/scan.c
  80. +1 −1 drivers/net/wireless/p54/p54usb.c
  81. +2 −2 drivers/net/wireless/rndis_wlan.c
  82. +9 −3 drivers/net/wireless/rt2x00/rt2400pci.c
  83. +5 −2 drivers/net/wireless/rt2x00/rt2500pci.c
  84. +21 −0 drivers/net/wireless/rt2x00/rt2800usb.c
  85. +3 −1 drivers/net/wireless/rt2x00/rt2x00.h
  86. +20 −11 drivers/net/wireless/rt2x00/rt2x00queue.c
  87. +25 −25 drivers/net/wireless/rtlwifi/Kconfig
  88. +3 −4 drivers/net/wireless/rtlwifi/base.c
  89. +9 −3 drivers/net/wireless/rtlwifi/rc.c
  90. +3 −3 drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
  91. +2 −3 drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
  92. +1 −1 drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
  93. +8 −1 drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
  94. +1 −2 drivers/net/wireless/rtlwifi/rtl8192de/hw.c
  95. +1 −2 drivers/net/wireless/rtlwifi/rtl8192de/trx.c
  96. +1 −2 drivers/net/wireless/rtlwifi/rtl8192se/hw.c
  97. +1 −2 drivers/net/wireless/rtlwifi/rtl8192se/trx.c
  98. +1 −2 drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
  99. +1 −2 drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
  100. +3 −2 drivers/net/wireless/rtlwifi/usb.c
  101. +2 −1 drivers/net/wireless/rtlwifi/usb.h
  102. +9 −0 drivers/net/wireless/ti/Kconfig
  103. +3 −1 drivers/net/wireless/ti/Makefile
  104. 0 drivers/net/wireless/ti/{wlcore/wl12xx_platform_data.c → wilink_platform_data.c}
  105. +5 −1 drivers/net/wireless/ti/wl1251/event.c
  106. +19 −5 drivers/net/wireless/ti/wl1251/main.c
  107. +2 −1 drivers/net/wireless/ti/wl12xx/main.c
  108. +4 −3 drivers/net/wireless/ti/wl18xx/conf.h
  109. +6 −1 drivers/net/wireless/ti/wl18xx/main.c
  110. +0 −5 drivers/net/wireless/ti/wlcore/Kconfig
  111. +0 −3 drivers/net/wireless/ti/wlcore/Makefile
  112. +2 −2 drivers/net/wireless/ti/wlcore/boot.c
  113. +5 −3 drivers/net/wireless/ti/wlcore/cmd.c
  114. +7 −11 drivers/net/wireless/ti/wlcore/main.c
  115. +22 −13 drivers/net/wireless/ti/wlcore/sdio.c
  116. +29 −11 drivers/net/wireless/ti/wlcore/spi.c
  117. +0 −1 drivers/net/wireless/ti/wlcore/wlcore.h
  118. +5 −0 drivers/net/wireless/ti/wlcore/wlcore_i.h
  119. +1 −0 drivers/nfc/Kconfig
  120. +1 −0 drivers/nfc/Makefile
  121. +35 −0 drivers/nfc/microread/Kconfig
  122. +10 −0 drivers/nfc/microread/Makefile
  123. +340 −0 drivers/nfc/microread/i2c.c
  124. +246 −0 drivers/nfc/microread/mei.c
  125. +728 −0 drivers/nfc/microread/microread.c
  126. +33 −0 drivers/nfc/microread/microread.h
  127. +3 −5 drivers/nfc/pn533.c
  128. +1 −1 drivers/staging/wlan-ng/cfg80211.c
  129. +49 −1 include/linux/ieee80211.h
  130. +35 −0 include/linux/platform_data/microread.h
  131. +11 −5 include/linux/wl12xx.h
  132. +205 −21 include/net/cfg80211.h
  133. +112 −58 include/net/mac80211.h
  134. +269 −5 include/uapi/linux/nl80211.h
  135. +11 −0 net/mac80211/Kconfig
  136. +2 −1 net/mac80211/Makefile
  137. +78 −17 net/mac80211/cfg.c
  138. +136 −19 net/mac80211/chan.c
  139. +10 −0 net/mac80211/debug.h
  140. +2 −4 net/mac80211/debugfs.c
  141. +5 −0 net/mac80211/debugfs_netdev.c
  142. +3 −2 net/mac80211/debugfs_sta.c
  143. +47 −7 net/mac80211/driver-ops.h
  144. +77 −33 net/mac80211/ht.c
  145. +22 −31 net/mac80211/ibss.c
  146. +96 −100 net/mac80211/ieee80211_i.h
  147. +44 −88 net/mac80211/iface.c
  148. +24 −18 net/mac80211/main.c
  149. +270 −14 net/mac80211/mesh.c
  150. +31 −9 net/mac80211/mesh.h
  151. +30 −19 net/mac80211/mesh_hwmp.c
  152. +7 −5 net/mac80211/mesh_pathtbl.c
  153. +104 −16 net/mac80211/mesh_plink.c
  154. +598 −0 net/mac80211/mesh_ps.c
  155. +648 −433 net/mac80211/mlme.c
  156. +15 −20 net/mac80211/offchannel.c
  157. +12 −0 net/mac80211/pm.c
  158. +2 −0 net/mac80211/rate.h
  159. +29 −0 net/mac80211/rc80211_minstrel.c
  160. +2 −0 net/mac80211/rc80211_minstrel.h
  161. +145 −36 net/mac80211/rc80211_minstrel_ht.c
  162. +4 −1 net/mac80211/rc80211_minstrel_ht.h
  163. +69 −43 net/mac80211/rc80211_minstrel_ht_debugfs.c
  164. +101 −60 net/mac80211/rx.c
  165. +23 −43 net/mac80211/scan.c
  166. +26 −12 net/mac80211/sta_info.c
  167. +16 −4 net/mac80211/sta_info.h
  168. +16 −9 net/mac80211/status.c
  169. +4 −6 net/mac80211/tkip.c
  170. +22 −1 net/mac80211/trace.h
  171. +47 −62 net/mac80211/tx.c
  172. +69 −13 net/mac80211/util.c
  173. +166 −6 net/mac80211/vht.c
  174. +11 −2 net/mac80211/wme.c
  175. +2 −3 net/mac80211/wpa.c
  176. +2 −3 net/nfc/llcp/llcp.c
  177. +139 −3 net/wireless/chan.c
  178. +6 −2 net/wireless/core.c
  179. +33 −2 net/wireless/core.h
  180. +2 −2 net/wireless/ibss.c
  181. +128 −8 net/wireless/mlme.c
  182. +729 −54 net/wireless/nl80211.c
  183. +7 −0 net/wireless/nl80211.h
  184. +18 −2 net/wireless/reg.c
  185. +335 −295 net/wireless/scan.c
  186. +8 −8 net/wireless/sme.c
  187. +0 −2 net/wireless/sysfs.c
  188. +80 −0 net/wireless/trace.h
  189. +1 −1 net/wireless/util.c
@@ -309,7 +309,7 @@ static struct omap2_hsmmc_info mmc[] = {
.gpio_wp = 63,
.deferred = true,
},
-#ifdef CONFIG_WL12XX_PLATFORM_DATA
+#ifdef CONFIG_WILINK_PLATFORM_DATA
{
.name = "wl1271",
.mmc = 2,
@@ -450,7 +450,7 @@ static struct regulator_init_data omap3evm_vio = {
.consumer_supplies = omap3evm_vio_supply,
};
-#ifdef CONFIG_WL12XX_PLATFORM_DATA
+#ifdef CONFIG_WILINK_PLATFORM_DATA
#define OMAP3EVM_WLAN_PMENA_GPIO (150)
#define OMAP3EVM_WLAN_IRQ_GPIO (149)
@@ -563,7 +563,7 @@ static struct omap_board_mux omap35x_board_mux[] __initdata = {
OMAP_PIN_OFF_NONE),
OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
OMAP_PIN_OFF_NONE),
-#ifdef CONFIG_WL12XX_PLATFORM_DATA
+#ifdef CONFIG_WILINK_PLATFORM_DATA
/* WLAN IRQ - GPIO 149 */
OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
@@ -601,7 +601,7 @@ static struct omap_board_mux omap36x_board_mux[] __initdata = {
OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-#ifdef CONFIG_WL12XX_PLATFORM_DATA
+#ifdef CONFIG_WILINK_PLATFORM_DATA
/* WLAN IRQ - GPIO 149 */
OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
@@ -637,7 +637,7 @@ static struct gpio omap3_evm_ehci_gpios[] __initdata = {
static void __init omap3_evm_wl12xx_init(void)
{
-#ifdef CONFIG_WL12XX_PLATFORM_DATA
+#ifdef CONFIG_WILINK_PLATFORM_DATA
int ret;
/* WL12xx WLAN Init */
@@ -1613,6 +1613,10 @@ ath5k_hw_update_noise_floor(struct ath5k_hw *ah)
ah->ah_cal_mask |= AR5K_CALIBRATION_NF;
ee_mode = ath5k_eeprom_mode_from_channel(ah->ah_current_channel);
+ if (WARN_ON(ee_mode < 0)) {
+ ah->ah_cal_mask &= ~AR5K_CALIBRATION_NF;
+ return;
+ }
/* completed NF calibration, test threshold */
nf = ath5k_hw_read_measured_noise_floor(ah);
@@ -985,6 +985,8 @@ ath5k_hw_commit_eeprom_settings(struct ath5k_hw *ah,
return;
ee_mode = ath5k_eeprom_mode_from_channel(channel);
+ if (WARN_ON(ee_mode < 0))
+ return;
/* Adjust power delta for channel 14 */
if (channel->center_freq == 2484)
@@ -427,6 +427,30 @@ static bool ath6kl_is_tx_pending(struct ath6kl *ar)
return ar->tx_pending[ath6kl_wmi_get_control_ep(ar->wmi)] == 0;
}
+static void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif,
+ bool enable)
+{
+ int err;
+
+ if (WARN_ON(!test_bit(WMI_READY, &vif->ar->flag)))
+ return;
+
+ if (vif->nw_type != INFRA_NETWORK)
+ return;
+
+ if (!test_bit(ATH6KL_FW_CAPABILITY_BMISS_ENHANCE,
+ vif->ar->fw_capabilities))
+ return;
+
+ ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s fw bmiss enhance\n",
+ enable ? "enable" : "disable");
+
+ err = ath6kl_wmi_sta_bmiss_enhance_cmd(vif->ar->wmi,
+ vif->fw_vif_idx, enable);
+ if (err)
+ ath6kl_err("failed to %s enhanced bmiss detection: %d\n",
+ enable ? "enable" : "disable", err);
+}
static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_connect_params *sme)
@@ -616,13 +640,13 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
vif->req_bssid, vif->ch_hint,
ar->connect_ctrl_flags, nw_subtype);
- /* disable background scan if period is 0 */
- if (sme->bg_scan_period == 0)
+ if (sme->bg_scan_period == 0) {
+ /* disable background scan if period is 0 */
sme->bg_scan_period = 0xffff;
-
- /* configure default value if not specified */
- if (sme->bg_scan_period == -1)
+ } else if (sme->bg_scan_period == -1) {
+ /* configure default value if not specified */
sme->bg_scan_period = DEFAULT_BG_SCAN_PERIOD;
+ }
ath6kl_wmi_scanparams_cmd(ar->wmi, vif->fw_vif_idx, 0, 0,
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,
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "ad-hoc %s selected\n",
nw_type & ADHOC_CREATOR ? "creator" : "joiner");
cfg80211_ibss_joined(vif->ndev, bssid, GFP_KERNEL);
- cfg80211_put_bss(bss);
+ cfg80211_put_bss(ar->wiphy, bss);
return;
}
@@ -778,7 +802,7 @@ void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel,
assoc_req_ie, assoc_req_len,
assoc_resp_ie, assoc_resp_len,
WLAN_STATUS_SUCCESS, GFP_KERNEL);
- cfg80211_put_bss(bss);
+ cfg80211_put_bss(ar->wiphy, bss);
} else if (vif->sme_state == SME_CONNECTED) {
/* inform roam event to cfg80211 */
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,
return -EIO;
if (pmgmt) {
- ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: max perf\n", __func__);
+ ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: rec power\n", __func__);
mode.pwr_mode = REC_POWER;
} else {
- ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: rec power\n", __func__);
+ ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: max perf\n", __func__);
mode.pwr_mode = MAX_PERF_POWER;
}
@@ -1509,7 +1533,7 @@ static int ath6kl_cfg80211_del_iface(struct wiphy *wiphy,
list_del(&vif->list);
spin_unlock_bh(&ar->list_lock);
- ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag));
+ ath6kl_cfg80211_vif_stop(vif, test_bit(WMI_READY, &ar->flag));
ath6kl_cfg80211_vif_cleanup(vif);
@@ -1559,17 +1583,13 @@ static int ath6kl_cfg80211_change_iface(struct wiphy *wiphy,
set_iface_type:
switch (type) {
case NL80211_IFTYPE_STATION:
+ case NL80211_IFTYPE_P2P_CLIENT:
vif->next_mode = INFRA_NETWORK;
break;
case NL80211_IFTYPE_ADHOC:
vif->next_mode = ADHOC_NETWORK;
break;
case NL80211_IFTYPE_AP:
- vif->next_mode = AP_NETWORK;
- break;
- case NL80211_IFTYPE_P2P_CLIENT:
- vif->next_mode = INFRA_NETWORK;
- break;
case NL80211_IFTYPE_P2P_GO:
vif->next_mode = AP_NETWORK;
break;
@@ -1778,14 +1798,14 @@ static int ath6kl_get_station(struct wiphy *wiphy, struct net_device *dev,
if (vif->target_stats.rx_byte) {
sinfo->rx_bytes = vif->target_stats.rx_byte;
- sinfo->filled |= STATION_INFO_RX_BYTES;
+ sinfo->filled |= STATION_INFO_RX_BYTES64;
sinfo->rx_packets = vif->target_stats.rx_pkt;
sinfo->filled |= STATION_INFO_RX_PACKETS;
}
if (vif->target_stats.tx_byte) {
sinfo->tx_bytes = vif->target_stats.tx_byte;
- sinfo->filled |= STATION_INFO_TX_BYTES;
+ sinfo->filled |= STATION_INFO_TX_BYTES64;
sinfo->tx_packets = vif->target_stats.tx_pkt;
sinfo->filled |= STATION_INFO_TX_PACKETS;
}
@@ -2673,30 +2693,6 @@ static int ath6kl_set_ies(struct ath6kl_vif *vif,
return 0;
}
-void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif, bool enable)
-{
- int err;
-
- if (WARN_ON(!test_bit(WMI_READY, &vif->ar->flag)))
- return;
-
- if (vif->nw_type != INFRA_NETWORK)
- return;
-
- if (!test_bit(ATH6KL_FW_CAPABILITY_BMISS_ENHANCE,
- vif->ar->fw_capabilities))
- return;
-
- ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s fw bmiss enhance\n",
- enable ? "enable" : "disable");
-
- err = ath6kl_wmi_sta_bmiss_enhance_cmd(vif->ar->wmi,
- vif->fw_vif_idx, enable);
- if (err)
- ath6kl_err("failed to %s enhanced bmiss detection: %d\n",
- enable ? "enable" : "disable", err);
-}
-
static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon,
u8 *rsn_capab)
{
@@ -2776,9 +2772,11 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
ar->ap_mode_bkey.valid = false;
- /* TODO:
- * info->interval
- */
+ ret = ath6kl_wmi_ap_set_beacon_intvl_cmd(ar->wmi, vif->fw_vif_idx,
+ info->beacon_interval);
+
+ if (ret)
+ ath6kl_warn("Failed to set beacon interval: %d\n", ret);
ret = ath6kl_wmi_ap_set_dtim_cmd(ar->wmi, vif->fw_vif_idx,
info->dtim_period);
@@ -3557,6 +3555,37 @@ static int ath6kl_cfg80211_vif_init(struct ath6kl_vif *vif)
return 0;
}
+void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, bool wmi_ready)
+{
+ static u8 bcast_mac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+ bool discon_issued;
+
+ netif_stop_queue(vif->ndev);
+
+ clear_bit(WLAN_ENABLED, &vif->flags);
+
+ if (wmi_ready) {
+ discon_issued = test_bit(CONNECTED, &vif->flags) ||
+ test_bit(CONNECT_PEND, &vif->flags);
+ ath6kl_disconnect(vif);
+ del_timer(&vif->disconnect_timer);
+
+ if (discon_issued)
+ ath6kl_disconnect_event(vif, DISCONNECT_CMD,
+ (vif->nw_type & AP_NETWORK) ?
+ bcast_mac : vif->bssid,
+ 0, NULL, 0);
+ }
+
+ if (vif->scan_req) {
+ cfg80211_scan_done(vif->scan_req, true);
+ vif->scan_req = NULL;
+ }
+
+ /* need to clean up enhanced bmiss detection fw state */
+ ath6kl_cfg80211_sta_bmiss_enhance(vif, false);
+}
+
void ath6kl_cfg80211_vif_cleanup(struct ath6kl_vif *vif)
{
struct ath6kl *ar = vif->ar;
@@ -61,7 +61,5 @@ void ath6kl_cfg80211_cleanup(struct ath6kl *ar);
struct ath6kl *ath6kl_cfg80211_create(void);
void ath6kl_cfg80211_destroy(struct ath6kl *ar);
-/* TODO: remove this once ath6kl_vif_cleanup() is moved to cfg80211.c */
-void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif, bool enable);
#endif /* ATH6KL_CFG80211_H */
@@ -940,7 +940,7 @@ void ath6kl_reset_device(struct ath6kl *ar, u32 target_type,
bool wait_fot_compltn, bool cold_reset);
void ath6kl_init_control_info(struct ath6kl_vif *vif);
struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar);
-void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready);
+void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, bool wmi_ready);
int ath6kl_init_hw_start(struct ath6kl *ar);
int ath6kl_init_hw_stop(struct ath6kl *ar);
int ath6kl_init_fetch_firmwares(struct ath6kl *ar);
@@ -509,9 +509,7 @@ static void destroy_htc_txctrl_packet(struct htc_packet *packet)
{
struct sk_buff *skb;
skb = packet->skb;
- if (skb != NULL)
- dev_kfree_skb(skb);
-
+ dev_kfree_skb(skb);
kfree(packet);
}
@@ -969,6 +967,22 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb,
u16 payload_len;
int status = 0;
+ /*
+ * ar->htc_target can be NULL due to a race condition that can occur
+ * during driver initialization(we do 'ath6kl_hif_power_on' before
+ * initializing 'ar->htc_target' via 'ath6kl_htc_create').
+ * 'ath6kl_hif_power_on' assigns 'ath6kl_recv_complete' as
+ * usb_complete_t/callback function for 'usb_fill_bulk_urb'.
+ * Thus the possibility of ar->htc_target being NULL
+ * via ath6kl_recv_complete -> ath6kl_usb_io_comp_work.
+ */
+ if (WARN_ON_ONCE(!target)) {
+ ath6kl_err("Target not yet initialized\n");
+ status = -EINVAL;
+ goto free_skb;
+ }
+
+
netdata = skb->data;
netlen = skb->len;
@@ -1054,6 +1068,7 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb,
dev_kfree_skb(skb);
skb = NULL;
+
goto free_skb;
}
@@ -1089,8 +1104,7 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb,
skb = NULL;
free_skb:
- if (skb != NULL)
- dev_kfree_skb(skb);
+ dev_kfree_skb(skb);
return status;
@@ -1184,7 +1198,7 @@ static void reset_endpoint_states(struct htc_target *target)
INIT_LIST_HEAD(&ep->pipe.tx_lookup_queue);
INIT_LIST_HEAD(&ep->rx_bufq);
ep->target = target;
- ep->pipe.tx_credit_flow_enabled = (bool) 1; /* FIXME */
+ ep->pipe.tx_credit_flow_enabled = true;
}
}
Oops, something went wrong.

0 comments on commit 98d5fac

Please sign in to comment.