Skip to content

Commit

Permalink
rtlwifi: rtl8723ae: First attempt at ant_sel
Browse files Browse the repository at this point in the history
This change is only compile tested.

Signed-off-by: Larry Finger <[email protected]>
  • Loading branch information
lwfinger committed Dec 15, 2016
1 parent 621f4f3 commit d1a04f5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions rtl8723ae/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2379,6 +2379,7 @@ void rtl8723e_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw,
bool auto_load_fail, u8 *hwinfo)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mod_params *mod_params = rtlpriv->cfg->mod_params;
u8 value;
u32 tmpu_32;

Expand All @@ -2403,6 +2404,14 @@ void rtl8723e_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw,
}

rtl8723e_bt_var_init(hw);
/* override ant_num / ant_path */
if (mod_params->ant_sel) {
rtlpriv->btcoexist.eeprom_bt_ant_num =
(mod_params->ant_sel == 1 ? ANT_X2 : ANT_X1);

rtlpriv->btcoexist.btc_info.single_ant_path =
(mod_params->ant_sel == 1 ? 0 : 1);
}
}

void rtl8723e_bt_reg_init(struct ieee80211_hw *hw)
Expand Down
6 changes: 5 additions & 1 deletion rtl8723ae/sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ static struct rtl_mod_params rtl8723e_mod_params = {
.debug = 0,
.msi_support = false,
.disable_watchdog = false,
.ant_sel = 0,
};

static const struct rtl_hal_cfg rtl8723e_hal_cfg = {
Expand Down Expand Up @@ -389,13 +390,16 @@ module_param_named(fwlps, rtl8723e_mod_params.fwctrl_lps, bool, 0444);
module_param_named(msi, rtl8723e_mod_params.msi_support, bool, 0444);
module_param_named(disable_watchdog, rtl8723e_mod_params.disable_watchdog,
bool, 0444);
module_param_named(ant_sel, rtl8723e_mod_params.ant_sel, int, 0444);
MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 1)\n");
MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n");
MODULE_PARM_DESC(msi, "Set to 1 to use MSI interrupts mode (default 0)\n");
MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)");
MODULE_PARM_DESC(disable_watchdog, "Set to 1 to disable the watchdog (default 0)\n");
MODULE_PARM_DESC(disable_watchdog,
"Set to 1 to disable the watchdog (default 0)\n");
MODULE_PARM_DESC(ant_sel, "Set to 1 or 2 to force antenna number (default 0)\n");

static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume);

Expand Down

0 comments on commit d1a04f5

Please sign in to comment.