Commit 91aac563 authored by David S. Miller's avatar David S. Miller

Merge tag 'wireless-drivers-for-davem-2017-09-08' of...

Merge tag 'wireless-drivers-for-davem-2017-09-08' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers

Kalle Valo says:

====================
wireless-drivers fixes for 4.14

Few fixes to regressions introduced in the last one or two releases.
The iwlwifi fix is for a regression reported by Linus.

rtlwifi

* fix two antenna selection related bugs

iwlwifi

* fix regression with older firmwares

brcmfmac

* workaround firmware crash for bcm4345
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 7906b00f f957dd3c
...@@ -159,7 +159,8 @@ void brcmf_feat_attach(struct brcmf_pub *drvr) ...@@ -159,7 +159,8 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
brcmf_feat_firmware_capabilities(ifp); brcmf_feat_firmware_capabilities(ifp);
memset(&gscan_cfg, 0, sizeof(gscan_cfg)); memset(&gscan_cfg, 0, sizeof(gscan_cfg));
if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID) if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID &&
drvr->bus_if->chip != BRCM_CC_4345_CHIP_ID)
brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN,
"pfn_gscan_cfg", "pfn_gscan_cfg",
&gscan_cfg, sizeof(gscan_cfg)); &gscan_cfg, sizeof(gscan_cfg));
......
...@@ -378,6 +378,7 @@ enum iwl_ucode_tlv_capa { ...@@ -378,6 +378,7 @@ enum iwl_ucode_tlv_capa {
IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG = (__force iwl_ucode_tlv_capa_t)80, IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG = (__force iwl_ucode_tlv_capa_t)80,
IWL_UCODE_TLV_CAPA_LQM_SUPPORT = (__force iwl_ucode_tlv_capa_t)81, IWL_UCODE_TLV_CAPA_LQM_SUPPORT = (__force iwl_ucode_tlv_capa_t)81,
IWL_UCODE_TLV_CAPA_TX_POWER_ACK = (__force iwl_ucode_tlv_capa_t)84, IWL_UCODE_TLV_CAPA_TX_POWER_ACK = (__force iwl_ucode_tlv_capa_t)84,
IWL_UCODE_TLV_CAPA_LED_CMD_SUPPORT = (__force iwl_ucode_tlv_capa_t)86,
IWL_UCODE_TLV_CAPA_MLME_OFFLOAD = (__force iwl_ucode_tlv_capa_t)96, IWL_UCODE_TLV_CAPA_MLME_OFFLOAD = (__force iwl_ucode_tlv_capa_t)96,
NUM_IWL_UCODE_TLV_CAPA NUM_IWL_UCODE_TLV_CAPA
......
...@@ -92,7 +92,8 @@ static void iwl_mvm_send_led_fw_cmd(struct iwl_mvm *mvm, bool on) ...@@ -92,7 +92,8 @@ static void iwl_mvm_send_led_fw_cmd(struct iwl_mvm *mvm, bool on)
static void iwl_mvm_led_set(struct iwl_mvm *mvm, bool on) static void iwl_mvm_led_set(struct iwl_mvm *mvm, bool on)
{ {
if (mvm->cfg->device_family >= IWL_DEVICE_FAMILY_8000) { if (fw_has_capa(&mvm->fw->ucode_capa,
IWL_UCODE_TLV_CAPA_LED_CMD_SUPPORT)) {
iwl_mvm_send_led_fw_cmd(mvm, on); iwl_mvm_send_led_fw_cmd(mvm, on);
return; return;
} }
......
...@@ -1183,7 +1183,10 @@ static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist, ...@@ -1183,7 +1183,10 @@ static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist,
} }
/* fixed internal switch S1->WiFi, S0->BT */ /* fixed internal switch S1->WiFi, S0->BT */
btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0); if (board_info->btdm_ant_pos == BTC_ANTENNA_AT_MAIN_PORT)
btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0);
else
btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280);
switch (antpos_type) { switch (antpos_type) {
case BTC_ANT_WIFI_AT_MAIN: case BTC_ANT_WIFI_AT_MAIN:
......
...@@ -173,6 +173,16 @@ static u8 halbtc_get_wifi_central_chnl(struct btc_coexist *btcoexist) ...@@ -173,6 +173,16 @@ static u8 halbtc_get_wifi_central_chnl(struct btc_coexist *btcoexist)
u8 rtl_get_hwpg_single_ant_path(struct rtl_priv *rtlpriv) u8 rtl_get_hwpg_single_ant_path(struct rtl_priv *rtlpriv)
{ {
struct rtl_mod_params *mod_params = rtlpriv->cfg->mod_params;
/* override ant_num / ant_path */
if (mod_params->ant_sel) {
rtlpriv->btcoexist.btc_info.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);
}
return rtlpriv->btcoexist.btc_info.single_ant_path; return rtlpriv->btcoexist.btc_info.single_ant_path;
} }
...@@ -183,6 +193,7 @@ u8 rtl_get_hwpg_bt_type(struct rtl_priv *rtlpriv) ...@@ -183,6 +193,7 @@ u8 rtl_get_hwpg_bt_type(struct rtl_priv *rtlpriv)
u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv) u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv)
{ {
struct rtl_mod_params *mod_params = rtlpriv->cfg->mod_params;
u8 num; u8 num;
if (rtlpriv->btcoexist.btc_info.ant_num == ANT_X2) if (rtlpriv->btcoexist.btc_info.ant_num == ANT_X2)
...@@ -190,6 +201,10 @@ u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv) ...@@ -190,6 +201,10 @@ u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv)
else else
num = 1; num = 1;
/* override ant_num / ant_path */
if (mod_params->ant_sel)
num = (mod_params->ant_sel == 1 ? ANT_X2 : ANT_X1) + 1;
return num; return num;
} }
...@@ -876,7 +891,7 @@ bool exhalbtc_bind_bt_coex_withadapter(void *adapter) ...@@ -876,7 +891,7 @@ bool exhalbtc_bind_bt_coex_withadapter(void *adapter)
{ {
struct btc_coexist *btcoexist = &gl_bt_coexist; struct btc_coexist *btcoexist = &gl_bt_coexist;
struct rtl_priv *rtlpriv = adapter; struct rtl_priv *rtlpriv = adapter;
u8 ant_num = 2, chip_type, single_ant_path = 0; u8 ant_num = 2, chip_type;
if (btcoexist->binded) if (btcoexist->binded)
return false; return false;
...@@ -911,12 +926,6 @@ bool exhalbtc_bind_bt_coex_withadapter(void *adapter) ...@@ -911,12 +926,6 @@ bool exhalbtc_bind_bt_coex_withadapter(void *adapter)
ant_num = rtl_get_hwpg_ant_num(rtlpriv); ant_num = rtl_get_hwpg_ant_num(rtlpriv);
exhalbtc_set_ant_num(rtlpriv, BT_COEX_ANT_TYPE_PG, ant_num); exhalbtc_set_ant_num(rtlpriv, BT_COEX_ANT_TYPE_PG, ant_num);
/* set default antenna position to main port */
btcoexist->board_info.btdm_ant_pos = BTC_ANTENNA_AT_MAIN_PORT;
single_ant_path = rtl_get_hwpg_single_ant_path(rtlpriv);
exhalbtc_set_single_ant_path(single_ant_path);
if (rtl_get_hwpg_package_type(rtlpriv) == 0) if (rtl_get_hwpg_package_type(rtlpriv) == 0)
btcoexist->board_info.tfbga_package = false; btcoexist->board_info.tfbga_package = false;
else if (rtl_get_hwpg_package_type(rtlpriv) == 1) else if (rtl_get_hwpg_package_type(rtlpriv) == 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment