diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-06-28 13:53:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-28 13:56:21 -0400 |
commit | 3be3fdb58ad22f67c5fd12548c88cefe3f726588 (patch) | |
tree | 0c5c4e509c37098671df55a20b7e9aadb3d74db8 /drivers/net/wireless | |
parent | 77b7023afe93b5e3bdcf2c0faaa5e5caafb6ef44 (diff) | |
parent | 5ee0a58d8ca443e80ed8712c86c9938360b79cac (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-tx.c
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-2000.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 20 |
10 files changed, 65 insertions, 27 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index 2daca80f086f..e57fad9f1f09 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <net/mac80211.h> | 34 | #include <net/mac80211.h> |
35 | #include <linux/etherdevice.h> | 35 | #include <linux/etherdevice.h> |
36 | #include <asm/unaligned.h> | 36 | #include <asm/unaligned.h> |
37 | #include <linux/stringify.h> | ||
37 | 38 | ||
38 | #include "iwl-eeprom.h" | 39 | #include "iwl-eeprom.h" |
39 | #include "iwl-dev.h" | 40 | #include "iwl-dev.h" |
@@ -53,10 +54,10 @@ | |||
53 | #define IWL100_UCODE_API_MIN 5 | 54 | #define IWL100_UCODE_API_MIN 5 |
54 | 55 | ||
55 | #define IWL1000_FW_PRE "iwlwifi-1000-" | 56 | #define IWL1000_FW_PRE "iwlwifi-1000-" |
56 | #define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE #api ".ucode" | 57 | #define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode" |
57 | 58 | ||
58 | #define IWL100_FW_PRE "iwlwifi-100-" | 59 | #define IWL100_FW_PRE "iwlwifi-100-" |
59 | #define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE #api ".ucode" | 60 | #define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode" |
60 | 61 | ||
61 | 62 | ||
62 | /* | 63 | /* |
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c index 1c1330035ca9..64ed1f247df0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <net/mac80211.h> | 34 | #include <net/mac80211.h> |
35 | #include <linux/etherdevice.h> | 35 | #include <linux/etherdevice.h> |
36 | #include <asm/unaligned.h> | 36 | #include <asm/unaligned.h> |
37 | #include <linux/stringify.h> | ||
37 | 38 | ||
38 | #include "iwl-eeprom.h" | 39 | #include "iwl-eeprom.h" |
39 | #include "iwl-dev.h" | 40 | #include "iwl-dev.h" |
@@ -56,13 +57,13 @@ | |||
56 | #define IWL105_UCODE_API_MIN 5 | 57 | #define IWL105_UCODE_API_MIN 5 |
57 | 58 | ||
58 | #define IWL2030_FW_PRE "iwlwifi-2030-" | 59 | #define IWL2030_FW_PRE "iwlwifi-2030-" |
59 | #define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE #api ".ucode" | 60 | #define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE __stringify(api) ".ucode" |
60 | 61 | ||
61 | #define IWL2000_FW_PRE "iwlwifi-2000-" | 62 | #define IWL2000_FW_PRE "iwlwifi-2000-" |
62 | #define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE #api ".ucode" | 63 | #define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE __stringify(api) ".ucode" |
63 | 64 | ||
64 | #define IWL105_FW_PRE "iwlwifi-105-" | 65 | #define IWL105_FW_PRE "iwlwifi-105-" |
65 | #define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE #api ".ucode" | 66 | #define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE __stringify(api) ".ucode" |
66 | 67 | ||
67 | static void iwl2000_set_ct_threshold(struct iwl_priv *priv) | 68 | static void iwl2000_set_ct_threshold(struct iwl_priv *priv) |
68 | { | 69 | { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 937a8f12afa7..269dfdb9fe1a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <net/mac80211.h> | 35 | #include <net/mac80211.h> |
36 | #include <linux/etherdevice.h> | 36 | #include <linux/etherdevice.h> |
37 | #include <asm/unaligned.h> | 37 | #include <asm/unaligned.h> |
38 | #include <linux/stringify.h> | ||
38 | 39 | ||
39 | #include "iwl-eeprom.h" | 40 | #include "iwl-eeprom.h" |
40 | #include "iwl-dev.h" | 41 | #include "iwl-dev.h" |
@@ -55,10 +56,10 @@ | |||
55 | #define IWL5150_UCODE_API_MIN 1 | 56 | #define IWL5150_UCODE_API_MIN 1 |
56 | 57 | ||
57 | #define IWL5000_FW_PRE "iwlwifi-5000-" | 58 | #define IWL5000_FW_PRE "iwlwifi-5000-" |
58 | #define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE #api ".ucode" | 59 | #define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode" |
59 | 60 | ||
60 | #define IWL5150_FW_PRE "iwlwifi-5150-" | 61 | #define IWL5150_FW_PRE "iwlwifi-5150-" |
61 | #define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE #api ".ucode" | 62 | #define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode" |
62 | 63 | ||
63 | /* NIC configuration for 5000 series */ | 64 | /* NIC configuration for 5000 series */ |
64 | static void iwl5000_nic_config(struct iwl_priv *priv) | 65 | static void iwl5000_nic_config(struct iwl_priv *priv) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 3fcc0925d542..f1c1db76b9da 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <net/mac80211.h> | 34 | #include <net/mac80211.h> |
35 | #include <linux/etherdevice.h> | 35 | #include <linux/etherdevice.h> |
36 | #include <asm/unaligned.h> | 36 | #include <asm/unaligned.h> |
37 | #include <linux/stringify.h> | ||
37 | 38 | ||
38 | #include "iwl-eeprom.h" | 39 | #include "iwl-eeprom.h" |
39 | #include "iwl-dev.h" | 40 | #include "iwl-dev.h" |
@@ -56,16 +57,16 @@ | |||
56 | #define IWL6000G2_UCODE_API_MIN 4 | 57 | #define IWL6000G2_UCODE_API_MIN 4 |
57 | 58 | ||
58 | #define IWL6000_FW_PRE "iwlwifi-6000-" | 59 | #define IWL6000_FW_PRE "iwlwifi-6000-" |
59 | #define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode" | 60 | #define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode" |
60 | 61 | ||
61 | #define IWL6050_FW_PRE "iwlwifi-6050-" | 62 | #define IWL6050_FW_PRE "iwlwifi-6050-" |
62 | #define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode" | 63 | #define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE __stringify(api) ".ucode" |
63 | 64 | ||
64 | #define IWL6005_FW_PRE "iwlwifi-6000g2a-" | 65 | #define IWL6005_FW_PRE "iwlwifi-6000g2a-" |
65 | #define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE #api ".ucode" | 66 | #define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE __stringify(api) ".ucode" |
66 | 67 | ||
67 | #define IWL6030_FW_PRE "iwlwifi-6000g2b-" | 68 | #define IWL6030_FW_PRE "iwlwifi-6000g2b-" |
68 | #define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE #api ".ucode" | 69 | #define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode" |
69 | 70 | ||
70 | static void iwl6000_set_ct_threshold(struct iwl_priv *priv) | 71 | static void iwl6000_set_ct_threshold(struct iwl_priv *priv) |
71 | { | 72 | { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index f0eabbc07c95..7f16d1203057 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1704,6 +1704,7 @@ int iwl_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
1704 | struct iwl_rxon_context *ctx = iwl_rxon_ctx_from_vif(vif); | 1704 | struct iwl_rxon_context *ctx = iwl_rxon_ctx_from_vif(vif); |
1705 | struct iwl_rxon_context *bss_ctx = &priv->contexts[IWL_RXON_CTX_BSS]; | 1705 | struct iwl_rxon_context *bss_ctx = &priv->contexts[IWL_RXON_CTX_BSS]; |
1706 | struct iwl_rxon_context *tmp; | 1706 | struct iwl_rxon_context *tmp; |
1707 | enum nl80211_iftype newviftype = newtype; | ||
1707 | u32 interface_modes; | 1708 | u32 interface_modes; |
1708 | int err; | 1709 | int err; |
1709 | 1710 | ||
@@ -1759,7 +1760,7 @@ int iwl_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
1759 | 1760 | ||
1760 | /* success */ | 1761 | /* success */ |
1761 | iwl_teardown_interface(priv, vif, true); | 1762 | iwl_teardown_interface(priv, vif, true); |
1762 | vif->type = newtype; | 1763 | vif->type = newviftype; |
1763 | vif->p2p = newp2p; | 1764 | vif->p2p = newp2p; |
1764 | err = iwl_setup_interface(priv, ctx); | 1765 | err = iwl_setup_interface(priv, ctx); |
1765 | WARN_ON(err); | 1766 | WARN_ON(err); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index cf8fc9afa1ea..e72d2279fc5d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -126,7 +126,7 @@ static inline u8 iwl_tfd_get_num_tbs(struct iwl_tfd *tfd) | |||
126 | } | 126 | } |
127 | 127 | ||
128 | static void iwlagn_unmap_tfd(struct iwl_priv *priv, struct iwl_cmd_meta *meta, | 128 | static void iwlagn_unmap_tfd(struct iwl_priv *priv, struct iwl_cmd_meta *meta, |
129 | struct iwl_tfd *tfd) | 129 | struct iwl_tfd *tfd, enum dma_data_direction dma_dir) |
130 | { | 130 | { |
131 | int i; | 131 | int i; |
132 | int num_tbs; | 132 | int num_tbs; |
@@ -150,7 +150,7 @@ static void iwlagn_unmap_tfd(struct iwl_priv *priv, struct iwl_cmd_meta *meta, | |||
150 | /* Unmap chunks, if any. */ | 150 | /* Unmap chunks, if any. */ |
151 | for (i = 1; i < num_tbs; i++) | 151 | for (i = 1; i < num_tbs; i++) |
152 | dma_unmap_single(priv->bus.dev, iwl_tfd_tb_get_addr(tfd, i), | 152 | dma_unmap_single(priv->bus.dev, iwl_tfd_tb_get_addr(tfd, i), |
153 | iwl_tfd_tb_get_len(tfd, i), DMA_TO_DEVICE); | 153 | iwl_tfd_tb_get_len(tfd, i), dma_dir); |
154 | } | 154 | } |
155 | 155 | ||
156 | /** | 156 | /** |
@@ -166,7 +166,8 @@ void iwlagn_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq) | |||
166 | struct iwl_tfd *tfd_tmp = txq->tfds; | 166 | struct iwl_tfd *tfd_tmp = txq->tfds; |
167 | int index = txq->q.read_ptr; | 167 | int index = txq->q.read_ptr; |
168 | 168 | ||
169 | iwlagn_unmap_tfd(priv, &txq->meta[index], &tfd_tmp[index]); | 169 | iwlagn_unmap_tfd(priv, &txq->meta[index], &tfd_tmp[index], |
170 | DMA_TO_DEVICE); | ||
170 | 171 | ||
171 | /* free SKB */ | 172 | /* free SKB */ |
172 | if (txq->txb) { | 173 | if (txq->txb) { |
@@ -309,7 +310,8 @@ void iwl_cmd_queue_unmap(struct iwl_priv *priv) | |||
309 | i = get_cmd_index(q, q->read_ptr); | 310 | i = get_cmd_index(q, q->read_ptr); |
310 | 311 | ||
311 | if (txq->meta[i].flags & CMD_MAPPED) { | 312 | if (txq->meta[i].flags & CMD_MAPPED) { |
312 | iwlagn_unmap_tfd(priv, &txq->meta[i], &txq->tfds[i]); | 313 | iwlagn_unmap_tfd(priv, &txq->meta[i], &txq->tfds[i], |
314 | DMA_BIDIRECTIONAL); | ||
313 | txq->meta[i].flags = 0; | 315 | txq->meta[i].flags = 0; |
314 | } | 316 | } |
315 | 317 | ||
@@ -531,12 +533,7 @@ out_free_arrays: | |||
531 | void iwl_tx_queue_reset(struct iwl_priv *priv, struct iwl_tx_queue *txq, | 533 | void iwl_tx_queue_reset(struct iwl_priv *priv, struct iwl_tx_queue *txq, |
532 | int slots_num, u32 txq_id) | 534 | int slots_num, u32 txq_id) |
533 | { | 535 | { |
534 | int actual_slots = slots_num; | 536 | memset(txq->meta, 0, sizeof(struct iwl_cmd_meta) * slots_num); |
535 | |||
536 | if (txq_id == priv->cmd_queue) | ||
537 | actual_slots++; | ||
538 | |||
539 | memset(txq->meta, 0, sizeof(struct iwl_cmd_meta) * actual_slots); | ||
540 | 537 | ||
541 | txq->need_update = 0; | 538 | txq->need_update = 0; |
542 | 539 | ||
@@ -696,10 +693,11 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
696 | if (!(cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY)) | 693 | if (!(cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY)) |
697 | continue; | 694 | continue; |
698 | phys_addr = dma_map_single(priv->bus.dev, (void *)cmd->data[i], | 695 | phys_addr = dma_map_single(priv->bus.dev, (void *)cmd->data[i], |
699 | cmd->len[i], DMA_TO_DEVICE); | 696 | cmd->len[i], DMA_BIDIRECTIONAL); |
700 | if (dma_mapping_error(priv->bus.dev, phys_addr)) { | 697 | if (dma_mapping_error(priv->bus.dev, phys_addr)) { |
701 | iwlagn_unmap_tfd(priv, out_meta, | 698 | iwlagn_unmap_tfd(priv, out_meta, |
702 | &txq->tfds[q->write_ptr]); | 699 | &txq->tfds[q->write_ptr], |
700 | DMA_BIDIRECTIONAL); | ||
703 | idx = -ENOMEM; | 701 | idx = -ENOMEM; |
704 | goto out; | 702 | goto out; |
705 | } | 703 | } |
@@ -803,7 +801,7 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) | |||
803 | cmd = txq->cmd[cmd_index]; | 801 | cmd = txq->cmd[cmd_index]; |
804 | meta = &txq->meta[cmd_index]; | 802 | meta = &txq->meta[cmd_index]; |
805 | 803 | ||
806 | iwlagn_unmap_tfd(priv, meta, &txq->tfds[index]); | 804 | iwlagn_unmap_tfd(priv, meta, &txq->tfds[index], DMA_BIDIRECTIONAL); |
807 | 805 | ||
808 | /* Input error checking is done when commands are added to queue. */ | 806 | /* Input error checking is done when commands are added to queue. */ |
809 | if (meta->flags & CMD_WANT_SKB) { | 807 | if (meta->flags & CMD_WANT_SKB) { |
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 660831ce293c..687c1f223497 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -1288,6 +1288,8 @@ int mwifiex_register_cfg80211(struct net_device *dev, u8 *mac, | |||
1288 | 1288 | ||
1289 | *(unsigned long *) wdev_priv = (unsigned long) priv; | 1289 | *(unsigned long *) wdev_priv = (unsigned long) priv; |
1290 | 1290 | ||
1291 | set_wiphy_dev(wdev->wiphy, (struct device *) priv->adapter->dev); | ||
1292 | |||
1291 | ret = wiphy_register(wdev->wiphy); | 1293 | ret = wiphy_register(wdev->wiphy); |
1292 | if (ret < 0) { | 1294 | if (ret < 0) { |
1293 | dev_err(priv->adapter->dev, "%s: registering cfg80211 device\n", | 1295 | dev_err(priv->adapter->dev, "%s: registering cfg80211 device\n", |
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 32261189bcef..aeac3cc4dbe4 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -2474,6 +2474,7 @@ struct mwl8k_cmd_set_hw_spec { | |||
2474 | * faster client. | 2474 | * faster client. |
2475 | */ | 2475 | */ |
2476 | #define MWL8K_SET_HW_SPEC_FLAG_ENABLE_LIFE_TIME_EXPIRY 0x00000400 | 2476 | #define MWL8K_SET_HW_SPEC_FLAG_ENABLE_LIFE_TIME_EXPIRY 0x00000400 |
2477 | #define MWL8K_SET_HW_SPEC_FLAG_GENERATE_CCMP_HDR 0x00000200 | ||
2477 | #define MWL8K_SET_HW_SPEC_FLAG_HOST_DECR_MGMT 0x00000080 | 2478 | #define MWL8K_SET_HW_SPEC_FLAG_HOST_DECR_MGMT 0x00000080 |
2478 | #define MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_PROBERESP 0x00000020 | 2479 | #define MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_PROBERESP 0x00000020 |
2479 | #define MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_BEACON 0x00000010 | 2480 | #define MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_BEACON 0x00000010 |
@@ -2510,7 +2511,8 @@ static int mwl8k_cmd_set_hw_spec(struct ieee80211_hw *hw) | |||
2510 | cmd->flags = cpu_to_le32(MWL8K_SET_HW_SPEC_FLAG_HOST_DECR_MGMT | | 2511 | cmd->flags = cpu_to_le32(MWL8K_SET_HW_SPEC_FLAG_HOST_DECR_MGMT | |
2511 | MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_PROBERESP | | 2512 | MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_PROBERESP | |
2512 | MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_BEACON | | 2513 | MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_BEACON | |
2513 | MWL8K_SET_HW_SPEC_FLAG_ENABLE_LIFE_TIME_EXPIRY); | 2514 | MWL8K_SET_HW_SPEC_FLAG_ENABLE_LIFE_TIME_EXPIRY | |
2515 | MWL8K_SET_HW_SPEC_FLAG_GENERATE_CCMP_HDR); | ||
2514 | cmd->num_tx_desc_per_queue = cpu_to_le32(MWL8K_TX_DESCS); | 2516 | cmd->num_tx_desc_per_queue = cpu_to_le32(MWL8K_TX_DESCS); |
2515 | cmd->total_rxd = cpu_to_le32(MWL8K_RX_DESCS); | 2517 | cmd->total_rxd = cpu_to_le32(MWL8K_RX_DESCS); |
2516 | 2518 | ||
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index ad39af462f87..6a15f368ebb9 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -1615,6 +1615,16 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, | |||
1615 | pci_read_config_byte(pdev, 0x8, &revisionid); | 1615 | pci_read_config_byte(pdev, 0x8, &revisionid); |
1616 | pci_read_config_word(pdev, 0x3C, &irqline); | 1616 | pci_read_config_word(pdev, 0x3C, &irqline); |
1617 | 1617 | ||
1618 | /* PCI ID 0x10ec:0x8192 occurs for both RTL8192E, which uses | ||
1619 | * r8192e_pci, and RTL8192SE, which uses this driver. If the | ||
1620 | * revision ID is RTL_PCI_REVISION_ID_8192PCIE (0x01), then | ||
1621 | * the correct driver is r8192e_pci, thus this routine should | ||
1622 | * return false. | ||
1623 | */ | ||
1624 | if (deviceid == RTL_PCI_8192SE_DID && | ||
1625 | revisionid == RTL_PCI_REVISION_ID_8192PCIE) | ||
1626 | return false; | ||
1627 | |||
1618 | if (deviceid == RTL_PCI_8192_DID || | 1628 | if (deviceid == RTL_PCI_8192_DID || |
1619 | deviceid == RTL_PCI_0044_DID || | 1629 | deviceid == RTL_PCI_0044_DID || |
1620 | deviceid == RTL_PCI_0047_DID || | 1630 | deviceid == RTL_PCI_0047_DID || |
@@ -1847,7 +1857,8 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, | |||
1847 | pci_write_config_byte(pdev, 0x04, 0x07); | 1857 | pci_write_config_byte(pdev, 0x04, 0x07); |
1848 | 1858 | ||
1849 | /* find adapter */ | 1859 | /* find adapter */ |
1850 | _rtl_pci_find_adapter(pdev, hw); | 1860 | if (!_rtl_pci_find_adapter(pdev, hw)) |
1861 | goto fail3; | ||
1851 | 1862 | ||
1852 | /* Init IO handler */ | 1863 | /* Init IO handler */ |
1853 | _rtl_pci_io_handler_init(&pdev->dev, hw); | 1864 | _rtl_pci_io_handler_init(&pdev->dev, hw); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c index bee7c1480f63..092e342c19df 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | |||
@@ -53,6 +53,8 @@ MODULE_FIRMWARE("rtlwifi/rtl8192cufw.bin"); | |||
53 | static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) | 53 | static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) |
54 | { | 54 | { |
55 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 55 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
56 | const struct firmware *firmware; | ||
57 | int err; | ||
56 | 58 | ||
57 | rtlpriv->dm.dm_initialgain_enable = 1; | 59 | rtlpriv->dm.dm_initialgain_enable = 1; |
58 | rtlpriv->dm.dm_flag = 0; | 60 | rtlpriv->dm.dm_flag = 0; |
@@ -64,6 +66,24 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) | |||
64 | ("Can't alloc buffer for fw.\n")); | 66 | ("Can't alloc buffer for fw.\n")); |
65 | return 1; | 67 | return 1; |
66 | } | 68 | } |
69 | /* request fw */ | ||
70 | err = request_firmware(&firmware, rtlpriv->cfg->fw_name, | ||
71 | rtlpriv->io.dev); | ||
72 | if (err) { | ||
73 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | ||
74 | ("Failed to request firmware!\n")); | ||
75 | return 1; | ||
76 | } | ||
77 | if (firmware->size > 0x4000) { | ||
78 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | ||
79 | ("Firmware is too big!\n")); | ||
80 | release_firmware(firmware); | ||
81 | return 1; | ||
82 | } | ||
83 | memcpy(rtlpriv->rtlhal.pfirmware, firmware->data, firmware->size); | ||
84 | rtlpriv->rtlhal.fwsize = firmware->size; | ||
85 | release_firmware(firmware); | ||
86 | |||
67 | return 0; | 87 | return 0; |
68 | } | 88 | } |
69 | 89 | ||