aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2011-06-21 11:48:31 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-06-22 15:47:59 -0400
commit9935d12651c9e54ad266e17cd542ec717ccd0fc8 (patch)
tree1ea306c28301373c10bfe9d0bbace86d7203ce14 /drivers
parentfa7ccfb17033bfb5bca86f6b909cab0b807efbc0 (diff)
rtl8192cu: Fix missing firmware load
In commit 3ac5e26a1e935469a8bdae1d624bc3b59d1fcdc5 entitled "rtlwifi: rtl8192c-common: Change common firmware routines for addition of rtl8192se and rtl8192de", the firmware loading code was moved. Unfortunately, some necessary code was dropped for rtl8192cu. The dmesg output shows the following: rtl8192c: Loading firmware file rtlwifi/rtl8192cufw.bin rtl8192c_common:_rtl92c_fw_free_to_go():<0-0> Polling FW ready fail!! REG_MCUFWDL:0x00000006 . rtl8192c_common:rtl92c_download_fw():<0-0> Firmware is not ready to run! In addition, the interface will authenticate and associate, but cannot transfer data. This is reported as Kernel Bug #38012. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192cu/sw.c20
1 files changed, 20 insertions, 0 deletions
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