Patch "rtlwifi: btcoexist: Implement antenna selection" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
rtlwifi: btcoexist: Implement antenna selection
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
rtlwifi-btcoexist-implement-antenna-selection.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
baa1702290953295e421f0f433e2b1ff4815827cMon Sep 17 00:00:00 2001
From: Larry Finger <[email protected]>
Date: Wed, 16 Mar 2016 13:33:35 -0500
Subject: rtlwifi: btcoexist: Implement antenna selection
From: Larry Finger <[email protected]>
commit baa1702290953295e421f0f433e2b1ff4815827c upstream.
The previous patch added an option to rtl8723be to manually select the antenna for those cases when only a single antenna is present, and the on-board EEPROM is incorrectly programmed. This patch implements the necessary changes in the Bluetooth coexistence driver.
--- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 9 ++- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 27 +++++++++- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 2 drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 5 + 4 files changed, 38 insertions(+), 5 deletions(-)
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c +7 -2
@@ -1203,7 +1203,6 @@ static void btc8723b2ant_set_ant_path(st/* Force GNT_BT to low */ btcoexist->btc_write_1byte_bitmask (btcoexist,0x765 ,0x18 ,0x0 ); - btcoexist->btc_write_2byte (btcoexist,0x948 ,0x0 );if (board_info->btdm_ant_pos ==BTC_ANTENNA_AT_MAIN_PORT ) {/* tell firmware "no antenna inverse" */
@@ -1211,19 +1210,25 @@ static void btc8723b2ant_set_ant_path(st h2c_parameter[1 ] =1 ;/* ext switch type */ btcoexist->btc_fill_h2c (btcoexist,0x65 ,2 , h2c_parameter); + btcoexist->btc_write_2byte (btcoexist,0x948 ,0x0 ); }else {/* tell firmware "antenna inverse" */ h2c_parameter[0 ] =1 ; h2c_parameter[1 ] =1 ;/* ext switch type */ btcoexist->btc_fill_h2c (btcoexist,0x65 ,2 , h2c_parameter); + btcoexist->btc_write_2byte (btcoexist,0x948 ,0x280 ); } }/* ext switch setting */ if (use_ext_switch) {/* fixed internal switch S1->WiFi, S0->BT */ - btcoexist->btc_write_2byte (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) {case BTC_ANT_WIFI_AT_MAIN :/* ext switch main at wifi */
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +26 -1
@@ -965,13 +965,38 @@ void exhalbtc_set_chip_type(u8 chip_type } } -void exhalbtc_set_ant_num (u8 type,u8 ant_num) +void exhalbtc_set_ant_num (struct rtl_priv *rtlpriv,u8 type,u8 ant_num) {if (BT_COEX_ANT_TYPE_PG == type) { gl_bt_coexist.board_info.pg_ant_num = ant_num; gl_bt_coexist.board_info.btdm_ant_num = ant_num; +/* The antenna position: +* Main (default) or Aux for pgAntNum=2 && btdmAntNum =1. +* The antenna position should be determined by +* auto-detect mechanism. +* The following is assumed to main, +* and those must be modified +* if y auto-detect mechanism is ready +*/ +if ((gl_bt_coexist.board_info.pg_ant_num ==2 ) && + (gl_bt_coexist.board_info.btdm_ant_num ==1 )) + gl_bt_coexist.board_info.btdm_ant_pos = +BTC_ANTENNA_AT_MAIN_PORT ; +else + gl_bt_coexist.board_info.btdm_ant_pos = +BTC_ANTENNA_AT_MAIN_PORT ; }else if (BT_COEX_ANT_TYPE_ANTDIV == type) { gl_bt_coexist.board_info.btdm_ant_num = ant_num; + gl_bt_coexist.board_info.btdm_ant_pos = +BTC_ANTENNA_AT_MAIN_PORT ; + }else if (type ==BT_COEX_ANT_TYPE_DETECTED ) { + gl_bt_coexist.board_info.btdm_ant_num = ant_num; +if (rtlpriv->cfg->mod_params->ant_sel ==1 ) + gl_bt_coexist.board_info.btdm_ant_pos = +BTC_ANTENNA_AT_AUX_PORT ; +else + gl_bt_coexist.board_info.btdm_ant_pos = +BTC_ANTENNA_AT_MAIN_PORT ; } }
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h +1 -1
@@ -535,7 +535,7 @@ void exhalbtc_set_bt_patch_version(u16 bvoid exhalbtc_update_min_bt_rssi (char bt_rssi);void exhalbtc_set_bt_exist (bool bt_exist);void exhalbtc_set_chip_type (u8 chip_type); -void exhalbtc_set_ant_num (u8 type,u8 ant_num); +void exhalbtc_set_ant_num (struct rtl_priv *rtlpriv,u8 type,u8 ant_num);void exhalbtc_display_bt_coex_info (struct btc_coexist *btcoexist);void exhalbtc_signal_compensation (struct btc_coexist *btcoexist,u8 *rssi_wifi,u8 *rssi_bt);
drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c +4 -1
@@ -72,7 +72,10 @@ void rtl_btc_init_hal_vars(struct rtl_pr __func__, bt_type);exhalbtc_set_chip_type (bt_type); -exhalbtc_set_ant_num (BT_COEX_ANT_TYPE_PG , ant_num); +if (rtlpriv->cfg->mod_params->ant_sel ==1 ) +exhalbtc_set_ant_num (rtlpriv,BT_COEX_ANT_TYPE_DETECTED ,1 ); +else +exhalbtc_set_ant_num (rtlpriv,BT_COEX_ANT_TYPE_PG , ant_num); }void rtl_btc_init_hw_config (struct rtl_priv *rtlpriv)
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/rtlwifi-pci-use-dev_kfree_skb_irq-instead-of-kfree_skb-in-rtl_pci_reset_trx_ring.patch queue-4.4/rtlwifi-fix-logic-error-in-enter-exit-power-save-mode.patch queue-4.4/rtlwifi-rtl8723be-add-antenna-select-module-parameter.patch queue-4.4/rtlwifi-btcoexist-implement-antenna-selection.patch