Skip to content

Commit

Permalink
rtlwifi: rtl8723be: Fix module parameter initialization
Browse files Browse the repository at this point in the history
[ Upstream commit 7079604ddb83f428359feace3aeaf8a9f435be4a ]

This driver has a number of errors in the module initialization. These
include the following:

Parameter msi_support is stored in two places - one is removed.
Paramters sw_crypto and disable_watchdog were never stored in the final
locations, nor were they initialized properly.

Signed-off-by: Larry Finger <[email protected]>
Cc: Stable <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Martinusbe <[email protected]>
  • Loading branch information
sashalevin authored and Martinusbe committed Jul 24, 2017
1 parent dd98388 commit 01d6343
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/net/wireless/rtlwifi/rtl8723be/sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ int rtl8723be_init_sw_vars(struct ieee80211_hw *hw)
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));

rtl8723be_bt_reg_init(hw);
rtlpci->msi_support = rtlpriv->cfg->mod_params->msi_support;
rtlpriv->btcoexist.btc_ops = rtl_btc_get_ops_pointer();

rtlpriv->dm.dm_initialgain_enable = 1;
Expand Down Expand Up @@ -151,6 +150,10 @@ int rtl8723be_init_sw_vars(struct ieee80211_hw *hw)
rtlpriv->psc.swctrl_lps = rtlpriv->cfg->mod_params->swctrl_lps;
rtlpriv->psc.fwctrl_lps = rtlpriv->cfg->mod_params->fwctrl_lps;
rtlpci->msi_support = rtlpriv->cfg->mod_params->msi_support;
rtlpriv->cfg->mod_params->sw_crypto =
rtlpriv->cfg->mod_params->sw_crypto;
rtlpriv->cfg->mod_params->disable_watchdog =
rtlpriv->cfg->mod_params->disable_watchdog;
if (rtlpriv->cfg->mod_params->disable_watchdog)
pr_info("watchdog disabled\n");
rtlpriv->psc.reg_fwctrl_lps = 3;
Expand Down Expand Up @@ -267,6 +270,9 @@ static struct rtl_mod_params rtl8723be_mod_params = {
.inactiveps = true,
.swctrl_lps = false,
.fwctrl_lps = true,
.msi_support = false,
.disable_watchdog = false,
.debug = DBG_EMERG,
};

static struct rtl_hal_cfg rtl8723be_hal_cfg = {
Expand Down

0 comments on commit 01d6343

Please sign in to comment.