ath10k: Fix spelling mistake in comments.
PATCH 1/2 ath10k: Fix spelling mistake in comments.
From: Ben Greear <[email protected]>
Simple typo fix.
--- drivers/net/wireless/ath/ath10k/wmi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/wmi.h +2 -2
@@ -2340,9 +2340,9 @@ struct wmi_pdev_param_map {#define WMI_PDEV_PARAM_UNSUPPORTED 0enum wmi_pdev_param { -/* TX chian mask */ +/* TX chain mask */ WMI_PDEV_PARAM_TX_CHAIN_MASK =0x1 , -/* RX chian mask */ +/* RX chain mask */ WMI_PDEV_PARAM_RX_CHAIN_MASK ,/* TX power limit for 2G Radio */ WMI_PDEV_PARAM_TXPOWER_LIMIT2G ,
Signature · 1 line
1.7.11.7
PATCH 2/2 ath10k: support get/set antenna configurations.
From: Ben Greear <[email protected]>
Tested with CT firmware, but should work on standard firmware as well.
Verified that target's tx/rx chain register is set appropriately, and that the tx rate goes down as number of chains decrease, but I did not actually try to verify antenna ceased to transmit when disabled.
--- drivers/net/wireless/ath/ath10k/core.h | 5 +++ drivers/net/wireless/ath/ath10k/mac.c | 64 ++++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.c | 5 +++ 3 files changed, 74 insertions(+)
drivers/net/wireless/ath/ath10k/core.h +5 -0
@@ -472,6 +472,11 @@ struct ath10k {u32 dfs_block_radar_events;int install_key_rv;/* Store error code from key-install */ +unsigned char supp_tx_chainmask; +unsigned char supp_rx_chainmask; +unsigned char cfg_tx_chainmask; +unsigned char cfg_rx_chainmask; +struct wmi_pdev_set_wmm_params_arg wmm_params;struct completion install_key_done;
drivers/net/wireless/ath/ath10k/mac.c +64 -0
88 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/wmi.c +5 -0
@@ -2601,6 +2601,8 @@ static int ath10k_wmi_main_cmd_init(struct ath10k *ar) config.ast_skid_limit =__cpu_to_le32 (TARGET_AST_SKID_LIMIT ); config.tx_chain_mask =__cpu_to_le32 (TARGET_TX_CHAIN_MASK ); config.rx_chain_mask =__cpu_to_le32 (TARGET_RX_CHAIN_MASK ); + ar->supp_tx_chainmask =TARGET_TX_CHAIN_MASK ; + ar->supp_rx_chainmask =TARGET_RX_CHAIN_MASK ; config.rx_timeout_pri_vo =__cpu_to_le32 (TARGET_RX_TIMEOUT_LO_PRI ); config.rx_timeout_pri_vi =__cpu_to_le32 (TARGET_RX_TIMEOUT_LO_PRI ); config.rx_timeout_pri_be =__cpu_to_le32 (TARGET_RX_TIMEOUT_LO_PRI );
@@ -2721,6 +2723,9 @@ static int ath10k_wmi_10x_cmd_init(struct ath10k *ar) config.num_tids =__cpu_to_le32 (TARGET_10X_NUM_TIDS ); config.tx_chain_mask =__cpu_to_le32 (TARGET_10X_TX_CHAIN_MASK ); config.rx_chain_mask =__cpu_to_le32 (TARGET_10X_RX_CHAIN_MASK ); +/* TODO: Have to deal with 2x2 chips if/when the come out. */ + ar->supp_tx_chainmask =TARGET_10X_TX_CHAIN_MASK ; + ar->supp_rx_chainmask =TARGET_10X_RX_CHAIN_MASK ; config.rx_timeout_pri_vo =__cpu_to_le32 (TARGET_10X_RX_TIMEOUT_LO_PRI ); config.rx_timeout_pri_vi =__cpu_to_le32 (TARGET_10X_RX_TIMEOUT_LO_PRI ); config.rx_timeout_pri_be =__cpu_to_le32 (TARGET_10X_RX_TIMEOUT_LO_PRI );
Signature · 1 line
1.7.11.7
Re: [PATCH 2/2] ath10k: support get/set antenna configurations.
Quoted 22 lines · On 7 May 2014 23:50, <[email protected]> wrote:
From: Ben Greear <[email protected]>
Tested with CT firmware, but should work on standard firmware as well.
Verified that target's tx/rx chain register is set appropriately, and that the tx rate goes down as number of chains decrease, but I did not actually try to verify antenna ceased to transmit when disabled.
Signed-off-by Ben Greear <[email protected]>--- drivers/net/wireless/ath/ath10k/core.h | 5 +++ drivers/net/wireless/ath/ath10k/mac.c | 64 ++++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.c | 5 +++ 3 files changed, 74 insertions(+)drivers/net/wireless/ath/ath10k/core.h +0
-0
drivers/net/wireless/ath/ath10k/core.h struct ath10k { · line 478
Quoted 7 lines
drivers/net/wireless/ath/ath10k/core.h +4
-0@@ -472,6 +472,11 @@ struct ath10k {u32 dfs_block_radar_events;int install_key_rv;/* Store error code from key-install */ +unsigned char supp_tx_chainmask; +unsigned char supp_rx_chainmask; +unsigned char cfg_tx_chainmask; +unsigned char cfg_rx_chainmask;
It's probably a good idea to note these are protected by conf_mutex.
Quoted 13 lines
drivers/net/wireless/ath/ath10k/core.h +1
-0+struct wmi_pdev_set_wmm_params_arg wmm_params;struct completion install_key_done;drivers/net/wireless/ath/ath10k/mac.c +1
-0@@ -2483,6 +2483,61 @@ void ath10k_halt(struct ath10k *ar)spin_unlock_bh (&ar->data_lock); } +static int ath10k_get_antenna (struct ieee80211_hw *hw,u32 *tx_ant,u32 *rx_ant)
drivers/net/wireless/ath/ath10k/mac.c void ath10k_halt(struct ath10k *ar) · line 2496
Quoted 10 lines
drivers/net/wireless/ath/ath10k/mac.c +10
-0+{ +struct ath10k *ar = hw->priv; + +if (ar->cfg_tx_chainmask) { + *tx_ant = ar->cfg_tx_chainmask; + *rx_ant = ar->cfg_rx_chainmask; + }else { + *tx_ant = ar->supp_tx_chainmask; + *rx_ant = ar->supp_rx_chainmask; + }
Shouldn't this be protected by conf_mutex?
drivers/net/wireless/ath/ath10k/mac.c void ath10k_halt(struct ath10k *ar) · line 2503
Quoted 7 lines
drivers/net/wireless/ath/ath10k/mac.c +7
-0+return 0 ; +} + +static int __ath10k_set_antenna (struct ath10k *ar,u32 tx_ant,u32 rx_ant) +{ +int ret; +
+lockdep_assert_held(&ar->conf_mutex);
drivers/net/wireless/ath/ath10k/mac.c void ath10k_halt(struct ath10k *ar) · line 2507
Quoted 4 lines
drivers/net/wireless/ath/ath10k/mac.c +4
-0+ ar->cfg_tx_chainmask = tx_ant; + ar->cfg_rx_chainmask = rx_ant; + +if (ar->state !=ATH10K_STATE_ON )
This won't update set antenna during hw restart. You should accept ATH10K_STATE_RESTARTED here too.
Quoted 9 lines
drivers/net/wireless/ath/ath10k/mac.c +9
-0+return 0 ; + + ret =ath10k_wmi_pdev_set_param (ar, ar->wmi.pdev_param->tx_chain_mask, + tx_ant); +if (ret) { +ath10k_warn ("failed to set tx-chainmask: %d, req 0x%x\n" , + ret, tx_ant); +return ret; + }
drivers/net/wireless/ath/ath10k/mac.c void ath10k_halt(struct ath10k *ar) · line 2526
Quoted 10 lines
drivers/net/wireless/ath/ath10k/mac.c +10
-0+ + ret =ath10k_wmi_pdev_set_param (ar, ar->wmi.pdev_param->rx_chain_mask, + rx_ant); +if (ret) { +ath10k_warn ("failed to set rx-chainmask: %d, req 0x%x\n" , + ret, rx_ant); +return ret; + } + +return ret;
return 0 is probably fine here too.
Michał
Quoted 5 lines · [email protected] writes:
From: Ben Greear <[email protected]>
Simple typo fix.
Signed-off-by Ben Greear <[email protected]>
Thanks, patch 1 applied with a cosmetic change to the title.
Patch 2 dropped as there's a new version in the queue.
Signature · 1 line
Kalle Valo