ath10k: Add support for TID specific configuration
v2 cover ath10k: Add support for TID specific configuration
Add TID specific configuration for noack, retry count, aggregation, Tx rate and RTS_CTS control. Here if noack is enabled for the TID then aggregation should be disabled and Tx rate should be and retry count will be 0. Also add support for reset TID configuration.
Tamizh Chelvam (4):
ath10k: Add wmi command support for station specific TID config
ath10k: Move rate mask validation function up in the file
ath10k: Add new api to support TID specific configuration
ath10k: Add new api to support reset TID config
v2:
* Fixed warnings reported by kernel test robot <[email protected]>
drivers/net/wireless/ath/ath10k/core.c | 4 + drivers/net/wireless/ath/ath10k/core.h | 20 + drivers/net/wireless/ath/ath10k/mac.c | 837 ++++++++++++++++++++++++++---- drivers/net/wireless/ath/ath10k/txrx.c | 11 +- drivers/net/wireless/ath/ath10k/wmi-ops.h | 19 + drivers/net/wireless/ath/ath10k/wmi.c | 35 ++ drivers/net/wireless/ath/ath10k/wmi.h | 72 +++ 7 files changed, 905 insertions(+), 93 deletions(-)
Signature · 7 lines
1.9.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
PATCH v2 1/4 ath10k: Add wmi command support for station specific TID config
This patch adds WMI interface to configure station specific TID configuration . Host needs to send station's MAC address along with TID number and its configuration to target through WMI_10_4_PER_PEER_PER_TID_CONFIG_CMDID.
WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT flag is added to advertise this support.
Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021
--- drivers/net/wireless/ath/ath10k/wmi-ops.h | 19 +++++++++++ drivers/net/wireless/ath/ath10k/wmi.c | 32 +++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.h | 52 +++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+)
drivers/net/wireless/ath/ath10k/wmi-ops.h +19 -0
@@ -224,6 +224,8 @@ struct wmi_ops {struct sk_buff *(*gen_bb_timing) (struct ath10k *ar,const struct wmi_bb_timing_cfg_arg *arg); +struct sk_buff *(*gen_per_peer_per_tid_cfg)(struct ath10k *ar, +const struct wmi_per_peer_per_tid_cfg_arg *arg); };
@@ -1656,4 +1658,21 @@ struct wmi_ops {return ath10k_wmi_cmd_send (ar, skb, ar->wmi.cmd->set_bb_timing_cmdid); } + +static inline int +ath10k_wmi_set_per_peer_per_tid_cfg (struct ath10k *ar, +const struct wmi_per_peer_per_tid_cfg_arg *arg) +{ +struct sk_buff *skb; + +if (!ar->wmi.ops->gen_per_peer_per_tid_cfg) +return -EOPNOTSUPP ; + + skb = ar->wmi.ops->gen_per_peer_per_tid_cfg (ar, arg); +if (IS_ERR (skb)) +return PTR_ERR (skb); + +return ath10k_wmi_cmd_send (ar, skb, + ar->wmi.cmd->per_peer_per_tid_config_cmdid); +}#endif
drivers/net/wireless/ath/ath10k/wmi.c +32 -0
@@ -740,6 +740,7 @@ .tdls_peer_update_cmdid = WMI_10_4_TDLS_PEER_UPDATE_CMDID, .tdls_set_offchan_mode_cmdid = WMI_10_4_TDLS_SET_OFFCHAN_MODE_CMDID, .radar_found_cmdid = WMI_10_4_RADAR_FOUND_CMDID, + .per_peer_per_tid_config_cmdid = WMI_10_4_PER_PEER_PER_TID_CONFIG_CMDID, };static struct wmi_peer_param_map wmi_peer_param_map = {
@@ -9005,6 +9006,36 @@ static u32 ath10k_wmi_prepare_peer_qos(u8 uapsd_queues, u8 sp) }static struct sk_buff * +ath10k_wmi_10_4_gen_per_peer_per_tid_cfg (struct ath10k *ar, +const struct wmi_per_peer_per_tid_cfg_arg *arg) +{ +struct wmi_peer_per_tid_cfg_cmd *cmd; +struct sk_buff *skb; + + skb =ath10k_wmi_alloc_skb (ar,sizeof (*cmd)); +if (!skb) +return ERR_PTR (-ENOMEM ); + +memset (skb->data,0 ,sizeof (*cmd)); + + cmd = (struct wmi_peer_per_tid_cfg_cmd *)skb->data; + cmd->vdev_id =cpu_to_le32 (arg->vdev_id); +ether_addr_copy (cmd->peer_macaddr.addr, arg->peer_macaddr.addr); + cmd->tid =cpu_to_le32 (arg->tid); + cmd->ack_policy =cpu_to_le32 (arg->ack_policy); + cmd->aggr_control =cpu_to_le32 (arg->aggr_control); + cmd->rate_control =cpu_to_le32 (arg->rate_ctrl); + cmd->retry_count =cpu_to_le32 (arg->retry_count); + cmd->rcode_flags =cpu_to_le32 (arg->rcode_flags); + +ath10k_dbg (ar,ATH10K_DBG_WMI , +"wmi noack tid %d vdev id %d ack_policy %d aggr %u rate_ctrl %u rcflag %u retry_count %d mac_addr %pM\n" , + arg->tid, arg->vdev_id, arg->ack_policy, arg->aggr_control, arg->rate_ctrl, + arg->rcode_flags, arg->retry_count, arg->peer_macaddr.addr); +return skb; +} + +static struct sk_buff *ath10k_wmi_op_gen_echo (struct ath10k *ar,u32 value) {struct wmi_echo_cmd *cmd;
@@ -9413,6 +9444,7 @@ static u32 ath10k_wmi_prepare_peer_qos(u8 uapsd_queues, u8 sp) .gen_pdev_get_tpc_table_cmdid = ath10k_wmi_10_4_op_gen_pdev_get_tpc_table_cmdid, .gen_radar_found = ath10k_wmi_10_4_gen_radar_found, + .gen_per_peer_per_tid_cfg = ath10k_wmi_10_4_gen_per_peer_per_tid_cfg,/* shared with 10.2 */ .pull_echo_ev = ath10k_wmi_op_pull_echo_ev,
drivers/net/wireless/ath/ath10k/wmi.h +52 -0
88 lines not on this page · raw message
Signature · 7 lines
1.9.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Re: [PATCHv2 1/4] ath10k: Add wmi command support for station specific TID config
Quoted 5 lines · Tamizh Chelvam
This patch adds WMI interface to configure station specific TID configuration . Host needs to send station's MAC address along with TID number and its configuration to target through
WMI_10_4_PER_PEER_PER_TID_CONFIG_CMDID.
Quoted 7 lines
WMI_SERVICE_PEER_TID_CONFIGS_SUPPORTflag is added to advertise this support.Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021
Signed-off-by Tamizh Chelvam <[email protected]>Signed-off-by Kalle Valo <[email protected]>
4 patches applied to ath-next branch of ath.git, thanks.
5d582be0bc66 ath10k: Add wmi command support for station specific TID config 1c0b3fbd6eb4 ath10k: Move rate mask validation function up in the file 7b2531d93bac ath10k: Add new api to support TID specific configuration 2ca6a1dd83e1 ath10k: Add new api to support reset TID config
Signature · 3 lines
https://patchwork.kernel.org/patch/11643791/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Re: [PATCHv2 1/4] ath10k: Add wmi command support for station specific TID config
In reply to Tamizh ChelvamQuoted 5 lines · Tamizh Chelvam
This patch adds WMI interface to configure station specific TID configuration . Host needs to send station's MAC address along with TID number and its configuration to target through
WMI_10_4_PER_PEER_PER_TID_CONFIG_CMDID.
Quoted 7 lines
WMI_SERVICE_PEER_TID_CONFIGS_SUPPORTflag is added to advertise this support.Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021
Signed-off-by Tamizh Chelvam <[email protected]>Signed-off-by Kalle Valo <[email protected]>
4 patches applied to ath-next branch of ath.git, thanks.
5d582be0bc66 ath10k: Add wmi command support for station specific TID config 1c0b3fbd6eb4 ath10k: Move rate mask validation function up in the file 7b2531d93bac ath10k: Add new api to support TID specific configuration 2ca6a1dd83e1 ath10k: Add new api to support reset TID config
Signature · 9 lines
https://patchwork.kernel.org/patch/11643791/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
PATCH v2 2/4 ath10k: Move rate mask validation function up in the file
In reply to Tamizh ChelvamThis patch does not have any functional changes.
Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021
--- drivers/net/wireless/ath/ath10k/mac.c | 174 +++++++++++++++++----------------- 1 file changed, 87 insertions(+), 87 deletions(-)
drivers/net/wireless/ath/ath10k/mac.c +87 -87
@@ -6602,6 +6602,93 @@ static int ath10k_sta_set_txpwr(struct ieee80211_hw *hw,return ret; } +static bool +ath10k_mac_bitrate_mask_has_single_rate (struct ath10k *ar, +enum nl80211_band band, +const struct cfg80211_bitrate_mask *mask, +int *vht_num_rates) +{ +int num_rates =0 ; +int i, tmp; + + num_rates +=hweight32 (mask->control[band].legacy); + +for (i =0 ; i <ARRAY_SIZE (mask->control[band].ht_mcs); i++) + num_rates +=hweight8 (mask->control[band].ht_mcs[i]); + + *vht_num_rates =0 ; +for (i =0 ; i <ARRAY_SIZE (mask->control[band].vht_mcs); i++) { + tmp =hweight16 (mask->control[band].vht_mcs[i]); + num_rates += tmp; + *vht_num_rates += tmp; + } + +return num_rates ==1 ; +} + +static int +ath10k_mac_bitrate_mask_get_single_rate (struct ath10k *ar, +enum nl80211_band band, +const struct cfg80211_bitrate_mask *mask, +u8 *rate,u8 *nss,bool vht_only) +{ +int rate_idx; +int i; +u16 bitrate; +u8 preamble; +u8 hw_rate; + +if (vht_only) + goto next; + +if (hweight32 (mask->control[band].legacy) ==1 ) { + rate_idx =ffs (mask->control[band].legacy) -1 ; + +if (ar->phy_capability &WHAL_WLAN_11A_CAPABILITY ) + rate_idx +=ATH10K_MAC_FIRST_OFDM_RATE_IDX ; + + hw_rate = ath10k_wmi_legacy_rates[rate_idx].hw_value; + bitrate = ath10k_wmi_legacy_rates[rate_idx].bitrate; + +if (ath10k_mac_bitrate_is_cck (bitrate)) + preamble =WMI_RATE_PREAMBLE_CCK ; +else + preamble =WMI_RATE_PREAMBLE_OFDM ; + + *nss =1 ; + *rate = preamble <<6 | + (*nss -1 ) <<4 | + hw_rate <<0 ; + +return 0 ; + } + +for (i =0 ; i <ARRAY_SIZE (mask->control[band].ht_mcs); i++) { +if (hweight8 (mask->control[band].ht_mcs[i]) ==1 ) { + *nss = i +1 ; + *rate =WMI_RATE_PREAMBLE_HT <<6 | + (*nss -1 ) <<4 | + (ffs (mask->control[band].ht_mcs[i]) -1 ); + +return 0 ; + } + } + +next: +for (i =0 ; i <ARRAY_SIZE (mask->control[band].vht_mcs); i++) { +if (hweight16 (mask->control[band].vht_mcs[i]) ==1 ) { + *nss = i +1 ; + *rate =WMI_RATE_PREAMBLE_VHT <<6 | + (*nss -1 ) <<4 | + (ffs (mask->control[band].vht_mcs[i]) -1 ); + +return 0 ; + } + } + +return -EINVAL ; +} + static int ath10k_sta_state(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta,
@@ -7352,30 +7439,6 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx, } static bool -ath10k_mac_bitrate_mask_has_single_rate (struct ath10k *ar, -enum nl80211_band band, -const struct cfg80211_bitrate_mask *mask, -int *vht_num_rates) -{ -int num_rates =0 ; -int i, tmp; - - num_rates +=hweight32 (mask->control[band].legacy); - -for (i =0 ; i <ARRAY_SIZE (mask->control[band].ht_mcs); i++) - num_rates +=hweight8 (mask->control[band].ht_mcs[i]); - - *vht_num_rates =0 ; -for (i =0 ; i <ARRAY_SIZE (mask->control[band].vht_mcs); i++) { - tmp =hweight16 (mask->control[band].vht_mcs[i]); - num_rates += tmp; - *vht_num_rates += tmp; - } - -return num_rates ==1 ; -} - -static bool ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar, enum nl80211_band band, const struct cfg80211_bitrate_mask *mask,
@@ -7424,69 +7487,6 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx,return true; } -static int -ath10k_mac_bitrate_mask_get_single_rate (struct ath10k *ar, -enum nl80211_band band, -const struct cfg80211_bitrate_mask *mask, -u8 *rate,u8 *nss,bool vht_only) -{ -int rate_idx; -int i; -u16 bitrate; -u8 preamble; -u8 hw_rate; - -if (vht_only) - goto next; - -if (hweight32 (mask->control[band].legacy) ==1 ) { - rate_idx =ffs (mask->control[band].legacy) -1 ; - -if (ar->phy_capability &WHAL_WLAN_11A_CAPABILITY ) - rate_idx +=ATH10K_MAC_FIRST_OFDM_RATE_IDX ; - - hw_rate = ath10k_wmi_legacy_rates[rate_idx].hw_value; - bitrate = ath10k_wmi_legacy_rates[rate_idx].bitrate; - -if (ath10k_mac_bitrate_is_cck (bitrate)) - preamble =WMI_RATE_PREAMBLE_CCK ; -else - preamble =WMI_RATE_PREAMBLE_OFDM ; - - *nss =1 ; - *rate = preamble <<6 | - (*nss -1 ) <<4 | - hw_rate <<0 ; - -return 0 ; - } - -for (i =0 ; i <ARRAY_SIZE (mask->control[band].ht_mcs); i++) { -if (hweight8 (mask->control[band].ht_mcs[i]) ==1 ) { - *nss = i +1 ; - *rate =WMI_RATE_PREAMBLE_HT <<6 | - (*nss -1 ) <<4 | - (ffs (mask->control[band].ht_mcs[i]) -1 ); - -return 0 ; - } - } - -next: -for (i =0 ; i <ARRAY_SIZE (mask->control[band].vht_mcs); i++) { -if (hweight16 (mask->control[band].vht_mcs[i]) ==1 ) { - *nss = i +1 ; - *rate =WMI_RATE_PREAMBLE_VHT <<6 | - (*nss -1 ) <<4 | - (ffs (mask->control[band].vht_mcs[i]) -1 ); - -return 0 ; - } - } - -return -EINVAL ; -} -static int ath10k_mac_set_fixed_rate_params (struct ath10k_vif *arvif,u8 rate,u8 nss,u8 sgi,u8 ldpc) {
Signature · 7 lines
1.9.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
PATCH v2 3/4 ath10k: Add new api to support TID specific configuration
In reply to Tamizh ChelvamThis patch add ops for set_tid_config to support TID specific configuration. Station specific TID configuration will have more priority than vif specific TID configuration. WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT service flag introduced to notify host for TID config support. And RTS_CTS extended tid configuration support advertised through the service flag WMI_10_4_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT.
TID specific noack configuration requires
aggregation should be disabled and rate for the data TID packets should be basic rates. So, if the TID already configured with noack policy then driver will ignore the aggregation or TX rate related configuration for the same data TID.
In TX rate configuration should be applied with highest preamble configuration(HT rates should not be applied for the station which supports vht rates).
Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021
--- drivers/net/wireless/ath/ath10k/core.c | 4 + drivers/net/wireless/ath/ath10k/core.h | 19 ++ drivers/net/wireless/ath/ath10k/mac.c | 575 ++++++++++++++++++++++++++++++++- drivers/net/wireless/ath/ath10k/txrx.c | 11 +- drivers/net/wireless/ath/ath10k/wmi.c | 9 +- drivers/net/wireless/ath/ath10k/wmi.h | 20 ++ 6 files changed, 629 insertions(+), 9 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +4 -0
@@ -2797,6 +2797,10 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,if (test_bit (WMI_SERVICE_REPORT_AIRTIME , ar->wmi.svc_map)) val |=WMI_10_4_REPORT_AIRTIME ; +if (test_bit (WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT , + ar->wmi.svc_map)) + val |=WMI_10_4_EXT_PEER_TID_CONFIGS_SUPPORT ; + status =ath10k_mac_ext_resource_config (ar, val);if (status) { ath10k_err(ar,
drivers/net/wireless/ath/ath10k/core.h +19 -0
@@ -82,6 +82,8 @@/* Default Airtime weight multipler (Tuned for multiclient performance) */ #define ATH10K_AIRTIME_WEIGHT_MULTIPLIER 4 +#define ATH10K_MAX_RETRY_COUNT 30 +struct ath10k ;static inline const char *ath10k_bus_str (enum ath10k_bus bus)
@@ -109,6 +111,7 @@ enum ath10k_skb_flags {ATH10K_SKB_F_MGMT =BIT (3 ),ATH10K_SKB_F_QOS =BIT (4 ),ATH10K_SKB_F_RAW_TX =BIT (5 ), + ATH10K_SKB_F_NOACK_TID = BIT(6), }; struct ath10k_skb_cb {
@@ -509,6 +512,8 @@ struct ath10k_htt_tx_stats {u64 ack_fails; }; +#define ATH10K_TID_MAX 8 +struct ath10k_sta {struct ath10k_vif *arvif;
@@ -542,6 +547,13 @@ struct ath10k_sta {#endif /* Protected with ar->data_lock */ u32 peer_ps_state; +struct work_struct tid_config_wk; +int noack[ATH10K_TID_MAX ]; +int retry_long[ATH10K_TID_MAX ]; +int ampdu[ATH10K_TID_MAX ]; +u8 rate_ctrl[ATH10K_TID_MAX ]; +u32 rate_code[ATH10K_TID_MAX ]; +int rtscts[ATH10K_TID_MAX ]; };#define ATH10K_VDEV_SETUP_TIMEOUT_HZ (5 * HZ)
@@ -614,6 +626,13 @@ struct ath10k_vif {/* For setting VHT peer fixed rate, protected by conf_mutex */ int vht_num_rates;u8 vht_pfr; +u32 tid_conf_changed[ATH10K_TID_MAX ]; +int noack[ATH10K_TID_MAX ]; +int retry_long[ATH10K_TID_MAX ]; +int ampdu[ATH10K_TID_MAX ]; +u8 rate_ctrl[ATH10K_TID_MAX ]; +u32 rate_code[ATH10K_TID_MAX ]; +int rtscts[ATH10K_TID_MAX ]; };struct ath10k_vif_iter {
drivers/net/wireless/ath/ath10k/mac.c +572 -3
644 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/txrx.c +8 -3
@@ -50,6 +50,7 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt,struct ath10k_skb_cb *skb_cb;struct ath10k_txq *artxq;struct sk_buff *msdu; +u8 flags; ath10k_dbg(ar, ATH10K_DBG_HTT, "htt tx completion msdu_id %u status %d\n",
@@ -78,6 +79,7 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt, artxq->num_fw_queued--; } + flags = skb_cb->flags;ath10k_htt_tx_free_msdu_id (htt, tx_done->msdu_id);ath10k_htt_tx_dec_pending (htt);if (htt->num_pending_tx ==0 )
@@ -101,18 +103,21 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt,trace_ath10k_txrx_tx_unref (ar, tx_done->msdu_id); -if (!(info->flags &IEEE80211_TX_CTL_NO_ACK )) +if (!(info->flags &IEEE80211_TX_CTL_NO_ACK ) && + !(flags &ATH10K_SKB_F_NOACK_TID )) info->flags |=IEEE80211_TX_STAT_ACK ;if (tx_done->status ==HTT_TX_COMPL_STATE_NOACK ) info->flags &= ~IEEE80211_TX_STAT_ACK ;if ((tx_done->status ==HTT_TX_COMPL_STATE_ACK ) && - (info->flags &IEEE80211_TX_CTL_NO_ACK )) + ((info->flags &IEEE80211_TX_CTL_NO_ACK ) || + (flags &ATH10K_SKB_F_NOACK_TID ))) info->flags |=IEEE80211_TX_STAT_NOACK_TRANSMITTED ;if (tx_done->status ==HTT_TX_COMPL_STATE_DISCARD ) { -if (info->flags &IEEE80211_TX_CTL_NO_ACK ) +if ((info->flags &IEEE80211_TX_CTL_NO_ACK ) || + (flags &ATH10K_SKB_F_NOACK_TID )) info->flags &= ~IEEE80211_TX_STAT_NOACK_TRANSMITTED ;else info->flags &= ~IEEE80211_TX_STAT_ACK ;
drivers/net/wireless/ath/ath10k/wmi.c +6 -3
@@ -9027,11 +9027,14 @@ static u32 ath10k_wmi_prepare_peer_qos(u8 uapsd_queues, u8 sp) cmd->rate_control =cpu_to_le32 (arg->rate_ctrl); cmd->retry_count =cpu_to_le32 (arg->retry_count); cmd->rcode_flags =cpu_to_le32 (arg->rcode_flags); + cmd->ext_tid_cfg_bitmap =cpu_to_le32 (arg->ext_tid_cfg_bitmap); + cmd->rtscts_ctrl =cpu_to_le32 (arg->rtscts_ctrl);ath10k_dbg (ar,ATH10K_DBG_WMI , -"wmi noack tid %d vdev id %d ack_policy %d aggr %u rate_ctrl %u rcflag %u retry_count %d mac_addr %pM\n" , - arg->tid, arg->vdev_id, arg->ack_policy, arg->aggr_control, arg->rate_ctrl, - arg->rcode_flags, arg->retry_count, arg->peer_macaddr.addr); +"wmi noack tid %d vdev id %d ack_policy %d aggr %u rate_ctrl %u rcflag %u retry_count %d rtscts %d ext_tid_cfg_bitmap %d mac_addr %pM\n" , + arg->tid, arg->vdev_id, arg->ack_policy, arg->aggr_control, + arg->rate_ctrl, arg->rcode_flags, arg->retry_count, arg->rtscts_ctrl, + arg->ext_tid_cfg_bitmap, arg->peer_macaddr.addr);return skb; }
drivers/net/wireless/ath/ath10k/wmi.h +20 -0
@@ -204,6 +204,7 @@ enum wmi_service {WMI_SERVICE_TX_PWR_PER_PEER ,WMI_SERVICE_SUPPORT_EXTEND_ADDRESS ,WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT , + WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT,/* Remember to add the new value to wmi_service_name()! */
@@ -505,6 +506,7 @@ static inline char *wmi_service_name(enum wmi_service service_id)SVCSTR (WMI_SERVICE_TX_PWR_PER_PEER );SVCSTR (WMI_SERVICE_SUPPORT_EXTEND_ADDRESS );SVCSTR (WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT ); +SVCSTR (WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT );case WMI_SERVICE_MAX :return NULL ;
@@ -838,6 +840,8 @@ static inline void wmi_10_4_svc_map(const __le32 *in, unsigned long *out, WMI_SERVICE_RESET_CHIP, len);SVCMAP (WMI_10_4_SERVICE_PEER_TID_CONFIGS_SUPPORT ,WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT , len); +SVCMAP (WMI_10_4_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT , +WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT , len); }#undef SVCMAP
@@ -7244,6 +7248,16 @@ enum wmi_tid_rate_ctrl_conf {WMI_TID_CONFIG_RATE_CONTROL_AUTO ,WMI_TID_CONFIG_RATE_CONTROL_FIXED_RATE ,WMI_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE , + WMI_PEER_TID_CONFIG_RATE_UPPER_CAP, +}; + +enum wmi_tid_rtscts_control_conf { +WMI_TID_CONFIG_RTSCTS_CONTROL_ENABLE , +WMI_TID_CONFIG_RTSCTS_CONTROL_DISABLE , +}; + +enum wmi_ext_tid_config_map { +WMI_EXT_TID_RTS_CTS_CONFIG =BIT (0 ), }; struct wmi_per_peer_per_tid_cfg_arg {
@@ -7255,6 +7269,8 @@ struct wmi_per_peer_per_tid_cfg_arg {u8 rate_ctrl;u32 retry_count;u32 rcode_flags; +u32 ext_tid_cfg_bitmap; +u32 rtscts_ctrl; };struct wmi_peer_per_tid_cfg_cmd {
@@ -7270,6 +7286,10 @@ struct wmi_peer_per_tid_cfg_cmd {__le32 rate_control;__le32 rcode_flags;__le32 retry_count; +/* See enum wmi_ext_tid_config_map */ +__le32 ext_tid_cfg_bitmap; +/* see enum wmi_tid_rtscts_control_conf */ +__le32 rtscts_ctrl; } __packed;enum wmi_txbf_conf {
Signature · 1 line
1.9.1
Re: [PATCHv2 3/4] ath10k: Add new api to support TID specific configuration
Quoted 14 lines · Tamizh Chelvam
This patch add ops for
set_tid_configto support TID specific configuration. Station specific TID configuration will have more priority than vif specific TID configuration.WMI_SERVICE_PEER_TID_CONFIGS_SUPPORTservice flag introduced to notify host for TID config support. AndRTS_CTSextended tid configuration support advertised through the service flagWMI_10_4_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT.TID specific noack configuration requires
aggregation should be disabled and rate for the data TID packets should be basic rates. So, if the TID already configured with noack policy then driver will ignore the aggregation or TX rate related configuration for the same data TID.
Quoted 8 lines
In TX rate configuration should be applied with highest preamble configuration(HT rates should not be applied for the station which supports vht rates).
Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021
Signed-off-by Tamizh Chelvam <[email protected]>Signed-off-by Kalle Valo <[email protected]>
There few checkpatch warnings which I fixed and also I did some whitespace changes to improve readability. Others were trivial but please check carefully this change and let me know if it's ok:
drivers/net/wireless/ath/ath10k/mac.c +7 -3
@@ -7089,6 +7089,7 @@ static void ath10k_sta_tid_cfg_wk(struct work_struct *wk)bool config_apply;int ret, i;u32 changed; +u8 nss; arsta = container_of(wk, struct ath10k_sta, tid_config_wk); sta = container_of((void *)arsta, struct ieee80211_sta, drv_priv);
@@ -7138,9 +7139,12 @@ static void ath10k_sta_tid_cfg_wk(struct work_struct *wk)if (changed & (BIT (NL80211_TID_CONFIG_ATTR_TX_RATE ) |BIT (NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE ))) { -if (arvif->rate_ctrl[i] >WMI_TID_CONFIG_RATE_CONTROL_AUTO && -ath10k_mac_validate_rate_mask (ar, sta, arvif->rate_code[i], -ATH10K_HW_NSS (arvif->rate_code[i]))) { + nss =ATH10K_HW_NSS (arvif->rate_code[i]); + ret =ath10k_mac_validate_rate_mask (ar, sta, + arvif->rate_code[i], + nss); +if (ret && + arvif->rate_ctrl[i] >WMI_TID_CONFIG_RATE_CONTROL_AUTO ) { arg.rate_ctrl =0 ; arg.rcode_flags =0 ; }
Signature · 3 lines
https://patchwork.kernel.org/patch/11643787/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Re: [PATCHv2 3/4] ath10k: Add new api to support TID specific configuration
In reply to Tamizh ChelvamQuoted 14 lines · Tamizh Chelvam
This patch add ops for
set_tid_configto support TID specific configuration. Station specific TID configuration will have more priority than vif specific TID configuration.WMI_SERVICE_PEER_TID_CONFIGS_SUPPORTservice flag introduced to notify host for TID config support. AndRTS_CTSextended tid configuration support advertised through the service flagWMI_10_4_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT.TID specific noack configuration requires
aggregation should be disabled and rate for the data TID packets should be basic rates. So, if the TID already configured with noack policy then driver will ignore the aggregation or TX rate related configuration for the same data TID.
Quoted 8 lines
In TX rate configuration should be applied with highest preamble configuration(HT rates should not be applied for the station which supports vht rates).
Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021
Signed-off-by Tamizh Chelvam <[email protected]>Signed-off-by Kalle Valo <[email protected]>
There few checkpatch warnings which I fixed and also I did some whitespace changes to improve readability. Others were trivial but please check carefully this change and let me know if it's ok:
drivers/net/wireless/ath/ath10k/mac.c +7 -3
@@ -7089,6 +7089,7 @@ static void ath10k_sta_tid_cfg_wk(struct work_struct *wk)bool config_apply;int ret, i;u32 changed; +u8 nss; arsta = container_of(wk, struct ath10k_sta, tid_config_wk); sta = container_of((void *)arsta, struct ieee80211_sta, drv_priv);
@@ -7138,9 +7139,12 @@ static void ath10k_sta_tid_cfg_wk(struct work_struct *wk)if (changed & (BIT (NL80211_TID_CONFIG_ATTR_TX_RATE ) |BIT (NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE ))) { -if (arvif->rate_ctrl[i] >WMI_TID_CONFIG_RATE_CONTROL_AUTO && -ath10k_mac_validate_rate_mask (ar, sta, arvif->rate_code[i], -ATH10K_HW_NSS (arvif->rate_code[i]))) { + nss =ATH10K_HW_NSS (arvif->rate_code[i]); + ret =ath10k_mac_validate_rate_mask (ar, sta, + arvif->rate_code[i], + nss); +if (ret && + arvif->rate_ctrl[i] >WMI_TID_CONFIG_RATE_CONTROL_AUTO ) { arg.rate_ctrl =0 ; arg.rcode_flags =0 ; }
Signature · 9 lines
https://patchwork.kernel.org/patch/11643787/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCHv2 3/4] ath10k: Add new api to support TID specific configuration
Hi Kalle,
Quoted 19 lines
Quoted 19 lines
This patch add ops for
set_tid_configto support TID specific configuration. Station specific TID configuration will have more priority than vif specific TID configuration.WMI_SERVICE_PEER_TID_CONFIGS_SUPPORTservice flag introduced to notify host for TID config support. AndRTS_CTSextended tid configuration support advertised through the service flagWMI_10_4_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT.TID specific noack configuration requires
aggregation should be disabled and rate for the data TID packets should be basic rates. So, if the TID already configured with noack policy then driver will ignore the aggregation or TX rate related configuration for the same data TID.In TX rate configuration should be applied with highest preamble configuration(HT rates should not be applied for the station which supports vht rates).
Quoted 9 lines
Quoted 4 lines
Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021
Signed-off-by Tamizh Chelvam <[email protected]>Signed-off-by Kalle Valo <[email protected]>There few checkpatch warnings which I fixed and also I did some whitespace changes to improve readability. Others were trivial but please check carefully this change and let me know if it's ok:
Thanks for the cleanup. Change looks good to me.
Quoted 30 lines
drivers/net/wireless/ath/ath10k/mac.c +1
-0@@ -7089,6 +7089,7 @@ static void ath10k_sta_tid_cfg_wk(struct work_struct *wk)bool config_apply;int ret, i;u32 changed; +u8 nss; arsta = container_of(wk, struct ath10k_sta, tid_config_wk);sta = container_of((void *)arsta, struct ieee80211_sta,
drv_priv);drivers/net/wireless/ath/ath10k/mac.c +0
-1@@ -7138,9 +7139,12 @@ static void ath10k_sta_tid_cfg_wk(struct work_struct *wk)if (changed & (BIT (NL80211_TID_CONFIG_ATTR_TX_RATE ) |BIT (NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE ))) { - if (arvif->rate_ctrl[i] >
WMI_TID_CONFIG_RATE_CONTROL_AUTO&&
- ath10k_mac_validate_rate_mask(ar, sta,
arvif->rate_code[i],
-ATH10K_HW_NSS(arvif->rate_code[i]))) {drivers/net/wireless/ath/ath10k/mac.c +3
-0+ nss =ATH10K_HW_NSS (arvif->rate_code[i]); + ret = ath10k_mac_validate_rate_mask(ar, sta, +arvif->rate_code[i],
drivers/net/wireless/ath/ath10k/mac.c +3
-0+ nss); +if (ret && + arvif->rate_ctrl[i] >
Quoted 4 lines
WMI_TID_CONFIG_RATE_CONTROL_AUTO) {
arg.rate_ctrl = 0;
arg.rcode_flags = 0;
}Tamizh.
PATCH v2 4/4 ath10k: Add new api to support reset TID config
In reply to Tamizh ChelvamAdd ops for reset_tid_config to support reset TID configuration. This send default configuration to the target for the TIDs and stores default value in the host.
Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021
--- drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/mac.c | 88 ++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+)
drivers/net/wireless/ath/ath10k/core.h +1 -0
@@ -633,6 +633,7 @@ struct ath10k_vif {u8 rate_ctrl[ATH10K_TID_MAX ];u32 rate_code[ATH10K_TID_MAX ];int rtscts[ATH10K_TID_MAX ]; +u32 tids_rst; };struct ath10k_vif_iter {
drivers/net/wireless/ath/ath10k/mac.c +88 -0
136 lines not on this page · raw message
Signature · 7 lines
1.9.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k