diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-04-10 09:58:06 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-04-10 09:58:06 -0400 |
commit | 029d3ac9722d23e4f3b65656878cb3e4d9e280d4 (patch) | |
tree | a36c7979ab8735455128fd34e678bc6888d5c2ea | |
parent | f34c4a35d87949fbb0e0f31eba3c054e9f8199ba (diff) | |
parent | 5869e795e07ded955744ab99765d0f183f825f97 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar5008_phy.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/beacon.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_core.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_debugfs.c | 35 | ||||
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_mgmt.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_sdio.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_usb.c | 26 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.c | 10 |
12 files changed, 66 insertions, 62 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index 3b3e91057a4c..00fb8badbacc 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c | |||
@@ -1004,11 +1004,9 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah, | |||
1004 | case ATH9K_ANI_FIRSTEP_LEVEL:{ | 1004 | case ATH9K_ANI_FIRSTEP_LEVEL:{ |
1005 | u32 level = param; | 1005 | u32 level = param; |
1006 | 1006 | ||
1007 | value = level * 2; | 1007 | value = level; |
1008 | REG_RMW_FIELD(ah, AR_PHY_FIND_SIG, | 1008 | REG_RMW_FIELD(ah, AR_PHY_FIND_SIG, |
1009 | AR_PHY_FIND_SIG_FIRSTEP, value); | 1009 | AR_PHY_FIND_SIG_FIRSTEP, value); |
1010 | REG_RMW_FIELD(ah, AR_PHY_FIND_SIG_LOW, | ||
1011 | AR_PHY_FIND_SIG_FIRSTEP_LOW, value); | ||
1012 | 1010 | ||
1013 | if (level != aniState->firstepLevel) { | 1011 | if (level != aniState->firstepLevel) { |
1014 | ath_dbg(common, ANI, | 1012 | ath_dbg(common, ANI, |
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 471e0f624e81..bd9e634879e6 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c | |||
@@ -312,10 +312,9 @@ static void ath9k_csa_update_vif(void *data, u8 *mac, struct ieee80211_vif *vif) | |||
312 | 312 | ||
313 | void ath9k_csa_update(struct ath_softc *sc) | 313 | void ath9k_csa_update(struct ath_softc *sc) |
314 | { | 314 | { |
315 | ieee80211_iterate_active_interfaces(sc->hw, | 315 | ieee80211_iterate_active_interfaces_atomic(sc->hw, |
316 | IEEE80211_IFACE_ITER_NORMAL, | 316 | IEEE80211_IFACE_ITER_NORMAL, |
317 | ath9k_csa_update_vif, | 317 | ath9k_csa_update_vif, sc); |
318 | sc); | ||
319 | } | 318 | } |
320 | 319 | ||
321 | void ath9k_beacon_tasklet(unsigned long data) | 320 | void ath9k_beacon_tasklet(unsigned long data) |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index e8149e3dbdd5..289f3d8924b5 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |||
@@ -471,8 +471,11 @@ static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv, | |||
471 | if (!txok || !vif || !txs) | 471 | if (!txok || !vif || !txs) |
472 | goto send_mac80211; | 472 | goto send_mac80211; |
473 | 473 | ||
474 | if (txs->ts_flags & ATH9K_HTC_TXSTAT_ACK) | 474 | if (txs->ts_flags & ATH9K_HTC_TXSTAT_ACK) { |
475 | tx_info->flags |= IEEE80211_TX_STAT_ACK; | 475 | tx_info->flags |= IEEE80211_TX_STAT_ACK; |
476 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) | ||
477 | tx_info->flags |= IEEE80211_TX_STAT_AMPDU; | ||
478 | } | ||
476 | 479 | ||
477 | if (txs->ts_flags & ATH9K_HTC_TXSTAT_FILT) | 480 | if (txs->ts_flags & ATH9K_HTC_TXSTAT_FILT) |
478 | tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED; | 481 | tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED; |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index c0a4e866edca..cbbb02a6b13b 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -670,6 +670,7 @@ static const struct ieee80211_iface_combination if_comb[] = { | |||
670 | .num_different_channels = 1, | 670 | .num_different_channels = 1, |
671 | .beacon_int_infra_match = true, | 671 | .beacon_int_infra_match = true, |
672 | }, | 672 | }, |
673 | #ifdef CONFIG_ATH9K_DFS_CERTIFIED | ||
673 | { | 674 | { |
674 | .limits = if_dfs_limits, | 675 | .limits = if_dfs_limits, |
675 | .n_limits = ARRAY_SIZE(if_dfs_limits), | 676 | .n_limits = ARRAY_SIZE(if_dfs_limits), |
@@ -679,6 +680,7 @@ static const struct ieee80211_iface_combination if_comb[] = { | |||
679 | .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | | 680 | .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | |
680 | BIT(NL80211_CHAN_WIDTH_20), | 681 | BIT(NL80211_CHAN_WIDTH_20), |
681 | } | 682 | } |
683 | #endif | ||
682 | }; | 684 | }; |
683 | 685 | ||
684 | static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) | 686 | static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) |
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 05ee7f10cc8f..24ccbe96e0c8 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -5176,22 +5176,22 @@ static void b43_nphy_channel_setup(struct b43_wldev *dev, | |||
5176 | int ch = new_channel->hw_value; | 5176 | int ch = new_channel->hw_value; |
5177 | 5177 | ||
5178 | u16 old_band_5ghz; | 5178 | u16 old_band_5ghz; |
5179 | u32 tmp32; | 5179 | u16 tmp16; |
5180 | 5180 | ||
5181 | old_band_5ghz = | 5181 | old_band_5ghz = |
5182 | b43_phy_read(dev, B43_NPHY_BANDCTL) & B43_NPHY_BANDCTL_5GHZ; | 5182 | b43_phy_read(dev, B43_NPHY_BANDCTL) & B43_NPHY_BANDCTL_5GHZ; |
5183 | if (new_channel->band == IEEE80211_BAND_5GHZ && !old_band_5ghz) { | 5183 | if (new_channel->band == IEEE80211_BAND_5GHZ && !old_band_5ghz) { |
5184 | tmp32 = b43_read32(dev, B43_MMIO_PSM_PHY_HDR); | 5184 | tmp16 = b43_read16(dev, B43_MMIO_PSM_PHY_HDR); |
5185 | b43_write32(dev, B43_MMIO_PSM_PHY_HDR, tmp32 | 4); | 5185 | b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16 | 4); |
5186 | b43_phy_set(dev, B43_PHY_B_BBCFG, 0xC000); | 5186 | b43_phy_set(dev, B43_PHY_B_BBCFG, 0xC000); |
5187 | b43_write32(dev, B43_MMIO_PSM_PHY_HDR, tmp32); | 5187 | b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16); |
5188 | b43_phy_set(dev, B43_NPHY_BANDCTL, B43_NPHY_BANDCTL_5GHZ); | 5188 | b43_phy_set(dev, B43_NPHY_BANDCTL, B43_NPHY_BANDCTL_5GHZ); |
5189 | } else if (new_channel->band == IEEE80211_BAND_2GHZ && old_band_5ghz) { | 5189 | } else if (new_channel->band == IEEE80211_BAND_2GHZ && old_band_5ghz) { |
5190 | b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ); | 5190 | b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ); |
5191 | tmp32 = b43_read32(dev, B43_MMIO_PSM_PHY_HDR); | 5191 | tmp16 = b43_read16(dev, B43_MMIO_PSM_PHY_HDR); |
5192 | b43_write32(dev, B43_MMIO_PSM_PHY_HDR, tmp32 | 4); | 5192 | b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16 | 4); |
5193 | b43_phy_mask(dev, B43_PHY_B_BBCFG, 0x3FFF); | 5193 | b43_phy_mask(dev, B43_PHY_B_BBCFG, 0x3FFF); |
5194 | b43_write32(dev, B43_MMIO_PSM_PHY_HDR, tmp32); | 5194 | b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16); |
5195 | } | 5195 | } |
5196 | 5196 | ||
5197 | b43_chantab_phy_upload(dev, e); | 5197 | b43_chantab_phy_upload(dev, e); |
diff --git a/drivers/net/wireless/rsi/rsi_91x_core.c b/drivers/net/wireless/rsi/rsi_91x_core.c index e89535e86caf..1a8d32138593 100644 --- a/drivers/net/wireless/rsi/rsi_91x_core.c +++ b/drivers/net/wireless/rsi/rsi_91x_core.c | |||
@@ -102,10 +102,10 @@ static u8 rsi_core_determine_hal_queue(struct rsi_common *common) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | get_queue_num: | 104 | get_queue_num: |
105 | q_num = 0; | ||
106 | recontend_queue = false; | 105 | recontend_queue = false; |
107 | 106 | ||
108 | q_num = rsi_determine_min_weight_queue(common); | 107 | q_num = rsi_determine_min_weight_queue(common); |
108 | |||
109 | q_len = skb_queue_len(&common->tx_queue[ii]); | 109 | q_len = skb_queue_len(&common->tx_queue[ii]); |
110 | ii = q_num; | 110 | ii = q_num; |
111 | 111 | ||
@@ -118,7 +118,9 @@ get_queue_num: | |||
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | common->tx_qinfo[q_num].pkt_contended = 0; | 121 | if (q_num < NUM_EDCA_QUEUES) |
122 | common->tx_qinfo[q_num].pkt_contended = 0; | ||
123 | |||
122 | /* Adjust the back off values for all queues again */ | 124 | /* Adjust the back off values for all queues again */ |
123 | recontend_queue = rsi_recalculate_weights(common); | 125 | recontend_queue = rsi_recalculate_weights(common); |
124 | 126 | ||
diff --git a/drivers/net/wireless/rsi/rsi_91x_debugfs.c b/drivers/net/wireless/rsi/rsi_91x_debugfs.c index 7e4ef4554411..c466246a323f 100644 --- a/drivers/net/wireless/rsi/rsi_91x_debugfs.c +++ b/drivers/net/wireless/rsi/rsi_91x_debugfs.c | |||
@@ -289,32 +289,29 @@ int rsi_init_dbgfs(struct rsi_hw *adapter) | |||
289 | const struct rsi_dbg_files *files; | 289 | const struct rsi_dbg_files *files; |
290 | 290 | ||
291 | dev_dbgfs = kzalloc(sizeof(*dev_dbgfs), GFP_KERNEL); | 291 | dev_dbgfs = kzalloc(sizeof(*dev_dbgfs), GFP_KERNEL); |
292 | if (!dev_dbgfs) | ||
293 | return -ENOMEM; | ||
294 | |||
292 | adapter->dfsentry = dev_dbgfs; | 295 | adapter->dfsentry = dev_dbgfs; |
293 | 296 | ||
294 | snprintf(devdir, sizeof(devdir), "%s", | 297 | snprintf(devdir, sizeof(devdir), "%s", |
295 | wiphy_name(adapter->hw->wiphy)); | 298 | wiphy_name(adapter->hw->wiphy)); |
296 | dev_dbgfs->subdir = debugfs_create_dir(devdir, NULL); | ||
297 | 299 | ||
298 | if (IS_ERR(dev_dbgfs->subdir)) { | 300 | dev_dbgfs->subdir = debugfs_create_dir(devdir, NULL); |
299 | if (dev_dbgfs->subdir == ERR_PTR(-ENODEV)) | ||
300 | rsi_dbg(ERR_ZONE, | ||
301 | "%s:Debugfs has not been mounted\n", __func__); | ||
302 | else | ||
303 | rsi_dbg(ERR_ZONE, "debugfs:%s not created\n", devdir); | ||
304 | 301 | ||
305 | adapter->dfsentry = NULL; | 302 | if (!dev_dbgfs->subdir) { |
306 | kfree(dev_dbgfs); | 303 | kfree(dev_dbgfs); |
307 | return (int)PTR_ERR(dev_dbgfs->subdir); | 304 | return -ENOMEM; |
308 | } else { | 305 | } |
309 | for (ii = 0; ii < adapter->num_debugfs_entries; ii++) { | 306 | |
310 | files = &dev_debugfs_files[ii]; | 307 | for (ii = 0; ii < adapter->num_debugfs_entries; ii++) { |
311 | dev_dbgfs->rsi_files[ii] = | 308 | files = &dev_debugfs_files[ii]; |
312 | debugfs_create_file(files->name, | 309 | dev_dbgfs->rsi_files[ii] = |
313 | files->perms, | 310 | debugfs_create_file(files->name, |
314 | dev_dbgfs->subdir, | 311 | files->perms, |
315 | common, | 312 | dev_dbgfs->subdir, |
316 | &files->fops); | 313 | common, |
317 | } | 314 | &files->fops); |
318 | } | 315 | } |
319 | return 0; | 316 | return 0; |
320 | } | 317 | } |
diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c index 2361a6849ad7..73694295648f 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c +++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c | |||
@@ -738,7 +738,7 @@ int rsi_hal_load_key(struct rsi_common *common, | |||
738 | * | 738 | * |
739 | * Return: 0 on success, corresponding error code on failure. | 739 | * Return: 0 on success, corresponding error code on failure. |
740 | */ | 740 | */ |
741 | static u8 rsi_load_bootup_params(struct rsi_common *common) | 741 | static int rsi_load_bootup_params(struct rsi_common *common) |
742 | { | 742 | { |
743 | struct sk_buff *skb; | 743 | struct sk_buff *skb; |
744 | struct rsi_boot_params *boot_params; | 744 | struct rsi_boot_params *boot_params; |
@@ -1272,6 +1272,7 @@ int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg) | |||
1272 | { | 1272 | { |
1273 | s32 msg_len = (le16_to_cpu(*(__le16 *)&msg[0]) & 0x0fff); | 1273 | s32 msg_len = (le16_to_cpu(*(__le16 *)&msg[0]) & 0x0fff); |
1274 | u16 msg_type = (msg[2]); | 1274 | u16 msg_type = (msg[2]); |
1275 | int ret; | ||
1275 | 1276 | ||
1276 | rsi_dbg(FSM_ZONE, "%s: Msg Len: %d, Msg Type: %4x\n", | 1277 | rsi_dbg(FSM_ZONE, "%s: Msg Len: %d, Msg Type: %4x\n", |
1277 | __func__, msg_len, msg_type); | 1278 | __func__, msg_len, msg_type); |
@@ -1284,8 +1285,9 @@ int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg) | |||
1284 | if (common->fsm_state == FSM_CARD_NOT_READY) { | 1285 | if (common->fsm_state == FSM_CARD_NOT_READY) { |
1285 | rsi_set_default_parameters(common); | 1286 | rsi_set_default_parameters(common); |
1286 | 1287 | ||
1287 | if (rsi_load_bootup_params(common)) | 1288 | ret = rsi_load_bootup_params(common); |
1288 | return -ENOMEM; | 1289 | if (ret) |
1290 | return ret; | ||
1289 | else | 1291 | else |
1290 | common->fsm_state = FSM_BOOT_PARAMS_SENT; | 1292 | common->fsm_state = FSM_BOOT_PARAMS_SENT; |
1291 | } else { | 1293 | } else { |
diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c index 852453f386e2..2e39d38d6a9e 100644 --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c | |||
@@ -756,12 +756,13 @@ fail: | |||
756 | static void rsi_disconnect(struct sdio_func *pfunction) | 756 | static void rsi_disconnect(struct sdio_func *pfunction) |
757 | { | 757 | { |
758 | struct rsi_hw *adapter = sdio_get_drvdata(pfunction); | 758 | struct rsi_hw *adapter = sdio_get_drvdata(pfunction); |
759 | struct rsi_91x_sdiodev *dev = | 759 | struct rsi_91x_sdiodev *dev; |
760 | (struct rsi_91x_sdiodev *)adapter->rsi_dev; | ||
761 | 760 | ||
762 | if (!adapter) | 761 | if (!adapter) |
763 | return; | 762 | return; |
764 | 763 | ||
764 | dev = (struct rsi_91x_sdiodev *)adapter->rsi_dev; | ||
765 | |||
765 | dev->write_fail = 2; | 766 | dev->write_fail = 2; |
766 | rsi_mac80211_detach(adapter); | 767 | rsi_mac80211_detach(adapter); |
767 | 768 | ||
diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c b/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c index f1cb99cafed8..20d11ccfffe3 100644 --- a/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c +++ b/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | |||
@@ -247,7 +247,7 @@ static int rsi_process_pkt(struct rsi_common *common) | |||
247 | if (!common->rx_data_pkt) { | 247 | if (!common->rx_data_pkt) { |
248 | rsi_dbg(ERR_ZONE, "%s: Failed in memory allocation\n", | 248 | rsi_dbg(ERR_ZONE, "%s: Failed in memory allocation\n", |
249 | __func__); | 249 | __func__); |
250 | return -1; | 250 | return -ENOMEM; |
251 | } | 251 | } |
252 | 252 | ||
253 | status = rsi_sdio_host_intf_read_pkt(adapter, | 253 | status = rsi_sdio_host_intf_read_pkt(adapter, |
@@ -260,12 +260,10 @@ static int rsi_process_pkt(struct rsi_common *common) | |||
260 | } | 260 | } |
261 | 261 | ||
262 | status = rsi_read_pkt(common, rcv_pkt_len); | 262 | status = rsi_read_pkt(common, rcv_pkt_len); |
263 | kfree(common->rx_data_pkt); | ||
264 | return status; | ||
265 | 263 | ||
266 | fail: | 264 | fail: |
267 | kfree(common->rx_data_pkt); | 265 | kfree(common->rx_data_pkt); |
268 | return -1; | 266 | return status; |
269 | } | 267 | } |
270 | 268 | ||
271 | /** | 269 | /** |
diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c index bb1bf96670eb..4c46e5631e2f 100644 --- a/drivers/net/wireless/rsi/rsi_91x_usb.c +++ b/drivers/net/wireless/rsi/rsi_91x_usb.c | |||
@@ -154,24 +154,30 @@ static int rsi_usb_reg_read(struct usb_device *usbdev, | |||
154 | u16 *value, | 154 | u16 *value, |
155 | u16 len) | 155 | u16 len) |
156 | { | 156 | { |
157 | u8 temp_buf[4]; | 157 | u8 *buf; |
158 | int status = 0; | 158 | int status = -ENOMEM; |
159 | |||
160 | buf = kmalloc(0x04, GFP_KERNEL); | ||
161 | if (!buf) | ||
162 | return status; | ||
159 | 163 | ||
160 | status = usb_control_msg(usbdev, | 164 | status = usb_control_msg(usbdev, |
161 | usb_rcvctrlpipe(usbdev, 0), | 165 | usb_rcvctrlpipe(usbdev, 0), |
162 | USB_VENDOR_REGISTER_READ, | 166 | USB_VENDOR_REGISTER_READ, |
163 | USB_TYPE_VENDOR, | 167 | USB_TYPE_VENDOR, |
164 | ((reg & 0xffff0000) >> 16), (reg & 0xffff), | 168 | ((reg & 0xffff0000) >> 16), (reg & 0xffff), |
165 | (void *)temp_buf, | 169 | (void *)buf, |
166 | len, | 170 | len, |
167 | HZ * 5); | 171 | HZ * 5); |
168 | 172 | ||
169 | *value = (temp_buf[0] | (temp_buf[1] << 8)); | 173 | *value = (buf[0] | (buf[1] << 8)); |
170 | if (status < 0) { | 174 | if (status < 0) { |
171 | rsi_dbg(ERR_ZONE, | 175 | rsi_dbg(ERR_ZONE, |
172 | "%s: Reg read failed with error code :%d\n", | 176 | "%s: Reg read failed with error code :%d\n", |
173 | __func__, status); | 177 | __func__, status); |
174 | } | 178 | } |
179 | kfree(buf); | ||
180 | |||
175 | return status; | 181 | return status; |
176 | } | 182 | } |
177 | 183 | ||
@@ -190,8 +196,12 @@ static int rsi_usb_reg_write(struct usb_device *usbdev, | |||
190 | u16 value, | 196 | u16 value, |
191 | u16 len) | 197 | u16 len) |
192 | { | 198 | { |
193 | u8 usb_reg_buf[4]; | 199 | u8 *usb_reg_buf; |
194 | int status = 0; | 200 | int status = -ENOMEM; |
201 | |||
202 | usb_reg_buf = kmalloc(0x04, GFP_KERNEL); | ||
203 | if (!usb_reg_buf) | ||
204 | return status; | ||
195 | 205 | ||
196 | usb_reg_buf[0] = (value & 0x00ff); | 206 | usb_reg_buf[0] = (value & 0x00ff); |
197 | usb_reg_buf[1] = (value & 0xff00) >> 8; | 207 | usb_reg_buf[1] = (value & 0xff00) >> 8; |
@@ -212,6 +222,8 @@ static int rsi_usb_reg_write(struct usb_device *usbdev, | |||
212 | "%s: Reg write failed with error code :%d\n", | 222 | "%s: Reg write failed with error code :%d\n", |
213 | __func__, status); | 223 | __func__, status); |
214 | } | 224 | } |
225 | kfree(usb_reg_buf); | ||
226 | |||
215 | return status; | 227 | return status; |
216 | } | 228 | } |
217 | 229 | ||
@@ -286,7 +298,7 @@ int rsi_usb_write_register_multiple(struct rsi_hw *adapter, | |||
286 | return -ENOMEM; | 298 | return -ENOMEM; |
287 | 299 | ||
288 | while (count) { | 300 | while (count) { |
289 | transfer = min_t(int, count, 4096); | 301 | transfer = (u8)(min_t(u32, count, 4096)); |
290 | memcpy(buf, data, transfer); | 302 | memcpy(buf, data, transfer); |
291 | status = usb_control_msg(dev->usbdev, | 303 | status = usb_control_msg(dev->usbdev, |
292 | usb_sndctrlpipe(dev->usbdev, 0), | 304 | usb_sndctrlpipe(dev->usbdev, 0), |
diff --git a/drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.c index b6722de64a31..33da3dfcfa4f 100644 --- a/drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.c +++ b/drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.c | |||
@@ -625,17 +625,7 @@ bool exhalbtc_initlize_variables(struct rtl_priv *adapter) | |||
625 | else | 625 | else |
626 | btcoexist->binded = true; | 626 | btcoexist->binded = true; |
627 | 627 | ||
628 | #if (defined(CONFIG_PCI_HCI)) | ||
629 | btcoexist->chip_interface = BTC_INTF_PCI; | ||
630 | #elif (defined(CONFIG_USB_HCI)) | ||
631 | btcoexist->chip_interface = BTC_INTF_USB; | ||
632 | #elif (defined(CONFIG_SDIO_HCI)) | ||
633 | btcoexist->chip_interface = BTC_INTF_SDIO; | ||
634 | #elif (defined(CONFIG_GSPI_HCI)) | ||
635 | btcoexist->chip_interface = BTC_INTF_GSPI; | ||
636 | #else | ||
637 | btcoexist->chip_interface = BTC_INTF_UNKNOWN; | 628 | btcoexist->chip_interface = BTC_INTF_UNKNOWN; |
638 | #endif | ||
639 | 629 | ||
640 | if (NULL == btcoexist->adapter) | 630 | if (NULL == btcoexist->adapter) |
641 | btcoexist->adapter = adapter; | 631 | btcoexist->adapter = adapter; |