aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2011-06-24 14:00:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-06-24 14:00:24 -0400
commitacc468f5f9616ba564b772ac8a3aef218bff6bb3 (patch)
tree02bb0277daadc820c7a6c40c2f50ef299665d241 /drivers
parent5c18e80be9ff362f6523b097d495bb2e2f939946 (diff)
parent9935d12651c9e54ad266e17cd542ec717ccd0fc8 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into for-davem
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c13
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192cu/sw.c20
2 files changed, 32 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 9f8ccae93317..254b64ba4bf6 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -1624,6 +1624,16 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
1624 pci_read_config_byte(pdev, 0x8, &revisionid); 1624 pci_read_config_byte(pdev, 0x8, &revisionid);
1625 pci_read_config_word(pdev, 0x3C, &irqline); 1625 pci_read_config_word(pdev, 0x3C, &irqline);
1626 1626
1627 /* PCI ID 0x10ec:0x8192 occurs for both RTL8192E, which uses
1628 * r8192e_pci, and RTL8192SE, which uses this driver. If the
1629 * revision ID is RTL_PCI_REVISION_ID_8192PCIE (0x01), then
1630 * the correct driver is r8192e_pci, thus this routine should
1631 * return false.
1632 */
1633 if (deviceid == RTL_PCI_8192SE_DID &&
1634 revisionid == RTL_PCI_REVISION_ID_8192PCIE)
1635 return false;
1636
1627 if (deviceid == RTL_PCI_8192_DID || 1637 if (deviceid == RTL_PCI_8192_DID ||
1628 deviceid == RTL_PCI_0044_DID || 1638 deviceid == RTL_PCI_0044_DID ||
1629 deviceid == RTL_PCI_0047_DID || 1639 deviceid == RTL_PCI_0047_DID ||
@@ -1856,7 +1866,8 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
1856 pci_write_config_byte(pdev, 0x04, 0x07); 1866 pci_write_config_byte(pdev, 0x04, 0x07);
1857 1867
1858 /* find adapter */ 1868 /* find adapter */
1859 _rtl_pci_find_adapter(pdev, hw); 1869 if (!_rtl_pci_find_adapter(pdev, hw))
1870 goto fail3;
1860 1871
1861 /* Init IO handler */ 1872 /* Init IO handler */
1862 _rtl_pci_io_handler_init(&pdev->dev, hw); 1873 _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");
53static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) 53static 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