rtlwifi: Fix regression caused by commit d86e647688

In commit d86e647688 ("rtlwifi: rtl818x: constify local structures"),
the configuration struct for most of the drivers was changed to be
constant. The problem is that five of the modified drivers need to be
able to update the firmware name based on the exact model of the card.
As the file names were stored in one of the members of that struct,
these drivers would fail with a kernel BUG splat when they tried to
update the firmware name.

Rather than reverting the previous commit, I used a suggestion by
Johannes Berg and made the firmware file name pointers be local to
the routines that update the software variables.

The configuration struct of rtl8192cu, which was not touched in the
previous patch, is now constantfied.

Fixes: d86e647688 ("rtlwifi: rtl818x: constify local structures")
Suggested-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> # 4.8
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Larry Finger 2016-10-12 13:54:04 -05:00 committed by Kalle Valo
parent 29d5e6fbd6
commit cf4747d753
11 changed files with 45 additions and 51 deletions

View File

@ -111,7 +111,7 @@ static void rtl_fw_do_work(const struct firmware *firmware, void *context,
if (!err) if (!err)
goto found_alt; goto found_alt;
} }
pr_err("Firmware %s not available\n", rtlpriv->cfg->fw_name); pr_err("Selected firmware is not available\n");
rtlpriv->max_fw_size = 0; rtlpriv->max_fw_size = 0;
return; return;
} }

View File

@ -86,6 +86,7 @@ int rtl88e_init_sw_vars(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
u8 tid; u8 tid;
char *fw_name;
rtl8188ee_bt_reg_init(hw); rtl8188ee_bt_reg_init(hw);
rtlpriv->dm.dm_initialgain_enable = 1; rtlpriv->dm.dm_initialgain_enable = 1;
@ -169,10 +170,10 @@ int rtl88e_init_sw_vars(struct ieee80211_hw *hw)
return 1; return 1;
} }
rtlpriv->cfg->fw_name = "rtlwifi/rtl8188efw.bin"; fw_name = "rtlwifi/rtl8188efw.bin";
rtlpriv->max_fw_size = 0x8000; rtlpriv->max_fw_size = 0x8000;
pr_info("Using firmware %s\n", rtlpriv->cfg->fw_name); pr_info("Using firmware %s\n", fw_name);
err = request_firmware_nowait(THIS_MODULE, 1, rtlpriv->cfg->fw_name, err = request_firmware_nowait(THIS_MODULE, 1, fw_name,
rtlpriv->io.dev, GFP_KERNEL, hw, rtlpriv->io.dev, GFP_KERNEL, hw,
rtl_fw_cb); rtl_fw_cb);
if (err) { if (err) {
@ -284,7 +285,6 @@ static const struct rtl_hal_cfg rtl88ee_hal_cfg = {
.bar_id = 2, .bar_id = 2,
.write_readback = true, .write_readback = true,
.name = "rtl88e_pci", .name = "rtl88e_pci",
.fw_name = "rtlwifi/rtl8188efw.bin",
.ops = &rtl8188ee_hal_ops, .ops = &rtl8188ee_hal_ops,
.mod_params = &rtl88ee_mod_params, .mod_params = &rtl88ee_mod_params,

View File

@ -96,6 +96,7 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
char *fw_name = "rtlwifi/rtl8192cfwU.bin";
rtl8192ce_bt_reg_init(hw); rtl8192ce_bt_reg_init(hw);
@ -167,15 +168,12 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)
} }
/* request fw */ /* request fw */
if (IS_VENDOR_UMC_A_CUT(rtlhal->version) && if (IS_81XXC_VENDOR_UMC_B_CUT(rtlhal->version))
!IS_92C_SERIAL(rtlhal->version)) fw_name = "rtlwifi/rtl8192cfwU_B.bin";
rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cfwU.bin";
else if (IS_81XXC_VENDOR_UMC_B_CUT(rtlhal->version))
rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cfwU_B.bin";
rtlpriv->max_fw_size = 0x4000; rtlpriv->max_fw_size = 0x4000;
pr_info("Using firmware %s\n", rtlpriv->cfg->fw_name); pr_info("Using firmware %s\n", fw_name);
err = request_firmware_nowait(THIS_MODULE, 1, rtlpriv->cfg->fw_name, err = request_firmware_nowait(THIS_MODULE, 1, fw_name,
rtlpriv->io.dev, GFP_KERNEL, hw, rtlpriv->io.dev, GFP_KERNEL, hw,
rtl_fw_cb); rtl_fw_cb);
if (err) { if (err) {
@ -262,7 +260,6 @@ static const struct rtl_hal_cfg rtl92ce_hal_cfg = {
.bar_id = 2, .bar_id = 2,
.write_readback = true, .write_readback = true,
.name = "rtl92c_pci", .name = "rtl92c_pci",
.fw_name = "rtlwifi/rtl8192cfw.bin",
.ops = &rtl8192ce_hal_ops, .ops = &rtl8192ce_hal_ops,
.mod_params = &rtl92ce_mod_params, .mod_params = &rtl92ce_mod_params,

View File

@ -59,6 +59,7 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
int err; int err;
char *fw_name;
rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_initialgain_enable = true;
rtlpriv->dm.dm_flag = 0; rtlpriv->dm.dm_flag = 0;
@ -77,18 +78,18 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw)
} }
if (IS_VENDOR_UMC_A_CUT(rtlpriv->rtlhal.version) && if (IS_VENDOR_UMC_A_CUT(rtlpriv->rtlhal.version) &&
!IS_92C_SERIAL(rtlpriv->rtlhal.version)) { !IS_92C_SERIAL(rtlpriv->rtlhal.version)) {
rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cufw_A.bin"; fw_name = "rtlwifi/rtl8192cufw_A.bin";
} else if (IS_81XXC_VENDOR_UMC_B_CUT(rtlpriv->rtlhal.version)) { } else if (IS_81XXC_VENDOR_UMC_B_CUT(rtlpriv->rtlhal.version)) {
rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cufw_B.bin"; fw_name = "rtlwifi/rtl8192cufw_B.bin";
} else { } else {
rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cufw_TMSC.bin"; fw_name = "rtlwifi/rtl8192cufw_TMSC.bin";
} }
/* provide name of alternative file */ /* provide name of alternative file */
rtlpriv->cfg->alt_fw_name = "rtlwifi/rtl8192cufw.bin"; rtlpriv->cfg->alt_fw_name = "rtlwifi/rtl8192cufw.bin";
pr_info("Loading firmware %s\n", rtlpriv->cfg->fw_name); pr_info("Loading firmware %s\n", fw_name);
rtlpriv->max_fw_size = 0x4000; rtlpriv->max_fw_size = 0x4000;
err = request_firmware_nowait(THIS_MODULE, 1, err = request_firmware_nowait(THIS_MODULE, 1,
rtlpriv->cfg->fw_name, rtlpriv->io.dev, fw_name, rtlpriv->io.dev,
GFP_KERNEL, hw, rtl_fw_cb); GFP_KERNEL, hw, rtl_fw_cb);
return err; return err;
} }
@ -187,7 +188,6 @@ static struct rtl_hal_usbint_cfg rtl92cu_interface_cfg = {
static struct rtl_hal_cfg rtl92cu_hal_cfg = { static struct rtl_hal_cfg rtl92cu_hal_cfg = {
.name = "rtl92c_usb", .name = "rtl92c_usb",
.fw_name = "rtlwifi/rtl8192cufw.bin",
.ops = &rtl8192cu_hal_ops, .ops = &rtl8192cu_hal_ops,
.mod_params = &rtl92cu_mod_params, .mod_params = &rtl92cu_mod_params,
.usb_interface_cfg = &rtl92cu_interface_cfg, .usb_interface_cfg = &rtl92cu_interface_cfg,

View File

@ -92,6 +92,7 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw)
u8 tid; u8 tid;
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
char *fw_name = "rtlwifi/rtl8192defw.bin";
rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_initialgain_enable = true;
rtlpriv->dm.dm_flag = 0; rtlpriv->dm.dm_flag = 0;
@ -181,10 +182,10 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw)
rtlpriv->max_fw_size = 0x8000; rtlpriv->max_fw_size = 0x8000;
pr_info("Driver for Realtek RTL8192DE WLAN interface\n"); pr_info("Driver for Realtek RTL8192DE WLAN interface\n");
pr_info("Loading firmware file %s\n", rtlpriv->cfg->fw_name); pr_info("Loading firmware file %s\n", fw_name);
/* request fw */ /* request fw */
err = request_firmware_nowait(THIS_MODULE, 1, rtlpriv->cfg->fw_name, err = request_firmware_nowait(THIS_MODULE, 1, fw_name,
rtlpriv->io.dev, GFP_KERNEL, hw, rtlpriv->io.dev, GFP_KERNEL, hw,
rtl_fw_cb); rtl_fw_cb);
if (err) { if (err) {
@ -266,7 +267,6 @@ static const struct rtl_hal_cfg rtl92de_hal_cfg = {
.bar_id = 2, .bar_id = 2,
.write_readback = true, .write_readback = true,
.name = "rtl8192de", .name = "rtl8192de",
.fw_name = "rtlwifi/rtl8192defw.bin",
.ops = &rtl8192de_hal_ops, .ops = &rtl8192de_hal_ops,
.mod_params = &rtl92de_mod_params, .mod_params = &rtl92de_mod_params,

View File

@ -91,6 +91,7 @@ int rtl92ee_init_sw_vars(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
int err = 0; int err = 0;
char *fw_name;
rtl92ee_bt_reg_init(hw); rtl92ee_bt_reg_init(hw);
rtlpci->msi_support = rtlpriv->cfg->mod_params->msi_support; rtlpci->msi_support = rtlpriv->cfg->mod_params->msi_support;
@ -170,11 +171,11 @@ int rtl92ee_init_sw_vars(struct ieee80211_hw *hw)
} }
/* request fw */ /* request fw */
rtlpriv->cfg->fw_name = "rtlwifi/rtl8192eefw.bin"; fw_name = "rtlwifi/rtl8192eefw.bin";
rtlpriv->max_fw_size = 0x8000; rtlpriv->max_fw_size = 0x8000;
pr_info("Using firmware %s\n", rtlpriv->cfg->fw_name); pr_info("Using firmware %s\n", fw_name);
err = request_firmware_nowait(THIS_MODULE, 1, rtlpriv->cfg->fw_name, err = request_firmware_nowait(THIS_MODULE, 1, fw_name,
rtlpriv->io.dev, GFP_KERNEL, hw, rtlpriv->io.dev, GFP_KERNEL, hw,
rtl_fw_cb); rtl_fw_cb);
if (err) { if (err) {
@ -266,7 +267,6 @@ static const struct rtl_hal_cfg rtl92ee_hal_cfg = {
.bar_id = 2, .bar_id = 2,
.write_readback = true, .write_readback = true,
.name = "rtl92ee_pci", .name = "rtl92ee_pci",
.fw_name = "rtlwifi/rtl8192eefw.bin",
.ops = &rtl8192ee_hal_ops, .ops = &rtl8192ee_hal_ops,
.mod_params = &rtl92ee_mod_params, .mod_params = &rtl92ee_mod_params,

View File

@ -89,12 +89,13 @@ static void rtl92se_fw_cb(const struct firmware *firmware, void *context)
struct ieee80211_hw *hw = context; struct ieee80211_hw *hw = context;
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rt_firmware *pfirmware = NULL; struct rt_firmware *pfirmware = NULL;
char *fw_name = "rtlwifi/rtl8192sefw.bin";
RT_TRACE(rtlpriv, COMP_ERR, DBG_LOUD, RT_TRACE(rtlpriv, COMP_ERR, DBG_LOUD,
"Firmware callback routine entered!\n"); "Firmware callback routine entered!\n");
complete(&rtlpriv->firmware_loading_complete); complete(&rtlpriv->firmware_loading_complete);
if (!firmware) { if (!firmware) {
pr_err("Firmware %s not available\n", rtlpriv->cfg->fw_name); pr_err("Firmware %s not available\n", fw_name);
rtlpriv->max_fw_size = 0; rtlpriv->max_fw_size = 0;
return; return;
} }
@ -117,6 +118,7 @@ static int rtl92s_init_sw_vars(struct ieee80211_hw *hw)
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
int err = 0; int err = 0;
u16 earlyrxthreshold = 7; u16 earlyrxthreshold = 7;
char *fw_name = "rtlwifi/rtl8192sefw.bin";
rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_initialgain_enable = true;
rtlpriv->dm.dm_flag = 0; rtlpriv->dm.dm_flag = 0;
@ -214,9 +216,9 @@ static int rtl92s_init_sw_vars(struct ieee80211_hw *hw)
rtlpriv->max_fw_size = RTL8190_MAX_FIRMWARE_CODE_SIZE*2 + rtlpriv->max_fw_size = RTL8190_MAX_FIRMWARE_CODE_SIZE*2 +
sizeof(struct fw_hdr); sizeof(struct fw_hdr);
pr_info("Driver for Realtek RTL8192SE/RTL8191SE\n" pr_info("Driver for Realtek RTL8192SE/RTL8191SE\n"
"Loading firmware %s\n", rtlpriv->cfg->fw_name); "Loading firmware %s\n", fw_name);
/* request fw */ /* request fw */
err = request_firmware_nowait(THIS_MODULE, 1, rtlpriv->cfg->fw_name, err = request_firmware_nowait(THIS_MODULE, 1, fw_name,
rtlpriv->io.dev, GFP_KERNEL, hw, rtlpriv->io.dev, GFP_KERNEL, hw,
rtl92se_fw_cb); rtl92se_fw_cb);
if (err) { if (err) {
@ -310,7 +312,6 @@ static const struct rtl_hal_cfg rtl92se_hal_cfg = {
.bar_id = 1, .bar_id = 1,
.write_readback = false, .write_readback = false,
.name = "rtl92s_pci", .name = "rtl92s_pci",
.fw_name = "rtlwifi/rtl8192sefw.bin",
.ops = &rtl8192se_hal_ops, .ops = &rtl8192se_hal_ops,
.mod_params = &rtl92se_mod_params, .mod_params = &rtl92se_mod_params,

View File

@ -94,6 +94,7 @@ int rtl8723e_init_sw_vars(struct ieee80211_hw *hw)
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
int err = 0; int err = 0;
char *fw_name = "rtlwifi/rtl8723fw.bin";
rtl8723e_bt_reg_init(hw); rtl8723e_bt_reg_init(hw);
@ -176,14 +177,12 @@ int rtl8723e_init_sw_vars(struct ieee80211_hw *hw)
return 1; return 1;
} }
if (IS_VENDOR_8723_A_CUT(rtlhal->version)) if (IS_81xxC_VENDOR_UMC_B_CUT(rtlhal->version))
rtlpriv->cfg->fw_name = "rtlwifi/rtl8723fw.bin"; fw_name = "rtlwifi/rtl8723fw_B.bin";
else if (IS_81xxC_VENDOR_UMC_B_CUT(rtlhal->version))
rtlpriv->cfg->fw_name = "rtlwifi/rtl8723fw_B.bin";
rtlpriv->max_fw_size = 0x6000; rtlpriv->max_fw_size = 0x6000;
pr_info("Using firmware %s\n", rtlpriv->cfg->fw_name); pr_info("Using firmware %s\n", fw_name);
err = request_firmware_nowait(THIS_MODULE, 1, rtlpriv->cfg->fw_name, err = request_firmware_nowait(THIS_MODULE, 1, fw_name,
rtlpriv->io.dev, GFP_KERNEL, hw, rtlpriv->io.dev, GFP_KERNEL, hw,
rtl_fw_cb); rtl_fw_cb);
if (err) { if (err) {
@ -280,7 +279,6 @@ static const struct rtl_hal_cfg rtl8723e_hal_cfg = {
.bar_id = 2, .bar_id = 2,
.write_readback = true, .write_readback = true,
.name = "rtl8723e_pci", .name = "rtl8723e_pci",
.fw_name = "rtlwifi/rtl8723efw.bin",
.ops = &rtl8723e_hal_ops, .ops = &rtl8723e_hal_ops,
.mod_params = &rtl8723e_mod_params, .mod_params = &rtl8723e_mod_params,
.maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL, .maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL,

View File

@ -91,6 +91,7 @@ int rtl8723be_init_sw_vars(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
char *fw_name = "rtlwifi/rtl8723befw.bin";
rtl8723be_bt_reg_init(hw); rtl8723be_bt_reg_init(hw);
rtlpriv->btcoexist.btc_ops = rtl_btc_get_ops_pointer(); rtlpriv->btcoexist.btc_ops = rtl_btc_get_ops_pointer();
@ -184,8 +185,8 @@ int rtl8723be_init_sw_vars(struct ieee80211_hw *hw)
} }
rtlpriv->max_fw_size = 0x8000; rtlpriv->max_fw_size = 0x8000;
pr_info("Using firmware %s\n", rtlpriv->cfg->fw_name); pr_info("Using firmware %s\n", fw_name);
err = request_firmware_nowait(THIS_MODULE, 1, rtlpriv->cfg->fw_name, err = request_firmware_nowait(THIS_MODULE, 1, fw_name,
rtlpriv->io.dev, GFP_KERNEL, hw, rtlpriv->io.dev, GFP_KERNEL, hw,
rtl_fw_cb); rtl_fw_cb);
if (err) { if (err) {
@ -280,7 +281,6 @@ static const struct rtl_hal_cfg rtl8723be_hal_cfg = {
.bar_id = 2, .bar_id = 2,
.write_readback = true, .write_readback = true,
.name = "rtl8723be_pci", .name = "rtl8723be_pci",
.fw_name = "rtlwifi/rtl8723befw.bin",
.ops = &rtl8723be_hal_ops, .ops = &rtl8723be_hal_ops,
.mod_params = &rtl8723be_mod_params, .mod_params = &rtl8723be_mod_params,
.maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL, .maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL,

View File

@ -93,6 +93,7 @@ int rtl8821ae_init_sw_vars(struct ieee80211_hw *hw)
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
char *fw_name, *wowlan_fw_name;
rtl8821ae_bt_reg_init(hw); rtl8821ae_bt_reg_init(hw);
rtlpriv->btcoexist.btc_ops = rtl_btc_get_ops_pointer(); rtlpriv->btcoexist.btc_ops = rtl_btc_get_ops_pointer();
@ -203,17 +204,17 @@ int rtl8821ae_init_sw_vars(struct ieee80211_hw *hw)
} }
if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) { if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) {
rtlpriv->cfg->fw_name = "rtlwifi/rtl8812aefw.bin"; fw_name = "rtlwifi/rtl8812aefw.bin";
rtlpriv->cfg->wowlan_fw_name = "rtlwifi/rtl8812aefw_wowlan.bin"; wowlan_fw_name = "rtlwifi/rtl8812aefw_wowlan.bin";
} else { } else {
rtlpriv->cfg->fw_name = "rtlwifi/rtl8821aefw.bin"; fw_name = "rtlwifi/rtl8821aefw.bin";
rtlpriv->cfg->wowlan_fw_name = "rtlwifi/rtl8821aefw_wowlan.bin"; wowlan_fw_name = "rtlwifi/rtl8821aefw_wowlan.bin";
} }
rtlpriv->max_fw_size = 0x8000; rtlpriv->max_fw_size = 0x8000;
/*load normal firmware*/ /*load normal firmware*/
pr_info("Using firmware %s\n", rtlpriv->cfg->fw_name); pr_info("Using firmware %s\n", fw_name);
err = request_firmware_nowait(THIS_MODULE, 1, rtlpriv->cfg->fw_name, err = request_firmware_nowait(THIS_MODULE, 1, fw_name,
rtlpriv->io.dev, GFP_KERNEL, hw, rtlpriv->io.dev, GFP_KERNEL, hw,
rtl_fw_cb); rtl_fw_cb);
if (err) { if (err) {
@ -222,9 +223,9 @@ int rtl8821ae_init_sw_vars(struct ieee80211_hw *hw)
return 1; return 1;
} }
/*load wowlan firmware*/ /*load wowlan firmware*/
pr_info("Using firmware %s\n", rtlpriv->cfg->wowlan_fw_name); pr_info("Using firmware %s\n", wowlan_fw_name);
err = request_firmware_nowait(THIS_MODULE, 1, err = request_firmware_nowait(THIS_MODULE, 1,
rtlpriv->cfg->wowlan_fw_name, wowlan_fw_name,
rtlpriv->io.dev, GFP_KERNEL, hw, rtlpriv->io.dev, GFP_KERNEL, hw,
rtl_wowlan_fw_cb); rtl_wowlan_fw_cb);
if (err) { if (err) {
@ -320,7 +321,6 @@ static const struct rtl_hal_cfg rtl8821ae_hal_cfg = {
.bar_id = 2, .bar_id = 2,
.write_readback = true, .write_readback = true,
.name = "rtl8821ae_pci", .name = "rtl8821ae_pci",
.fw_name = "rtlwifi/rtl8821aefw.bin",
.ops = &rtl8821ae_hal_ops, .ops = &rtl8821ae_hal_ops,
.mod_params = &rtl8821ae_mod_params, .mod_params = &rtl8821ae_mod_params,
.maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL, .maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL,

View File

@ -2278,9 +2278,7 @@ struct rtl_hal_cfg {
u8 bar_id; u8 bar_id;
bool write_readback; bool write_readback;
char *name; char *name;
char *fw_name;
char *alt_fw_name; char *alt_fw_name;
char *wowlan_fw_name;
struct rtl_hal_ops *ops; struct rtl_hal_ops *ops;
struct rtl_mod_params *mod_params; struct rtl_mod_params *mod_params;
struct rtl_hal_usbint_cfg *usb_interface_cfg; struct rtl_hal_usbint_cfg *usb_interface_cfg;