ath10k: Handle mgmt tx completion event
PATCH 1/2 ath10k: Disable bundle mgmt tx completion event support
In reply to Rakesh PillaiFrom: Surabhi Vishnoi <[email protected]>
The tx completion of multiple mgmt frames can be bundled
in a single event and sent by the firmware to host, if this capability is not disabled explicitly by the host. If the host cannot handle the bundled mgmt tx completion, this capability support needs to be disabled in the wmi init cmd, sent to the firmware.
Add the host capability indication flag in the wmi ready command, to let firmware know the features supported by the host driver. This field is ignored if it is not supported by firmware.
Set the host capability indication flag(i.e. host_capab) to zero, for disabling the support of bundle mgmt tx completion. This will indicate the firmware to send completion event for every mgmt tx completion, instead of bundling them together and sending in a single event.
Tested HW: WCN3990
Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1
--- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 5 +++++ drivers/net/wireless/ath/ath10k/wmi-tlv.h | 5 +++++ 2 files changed, 10 insertions(+)
drivers/net/wireless/ath/ath10k/wmi-tlv.c +5 -0
@@ -1584,6 +1584,11 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar) cfg->keep_alive_pattern_size =__cpu_to_le32 (0 ); cfg->max_tdls_concurrent_sleep_sta =__cpu_to_le32 (1 ); cfg->max_tdls_concurrent_buffer_sta =__cpu_to_le32 (1 ); + cfg->wmi_send_separate =__cpu_to_le32 (0 ); + cfg->num_ocb_vdevs =__cpu_to_le32 (0 ); + cfg->num_ocb_channels =__cpu_to_le32 (0 ); + cfg->num_ocb_schedules =__cpu_to_le32 (0 ); + cfg->host_capab =__cpu_to_le32 (0 );ath10k_wmi_put_host_mem_chunks (ar, chunks);
drivers/net/wireless/ath/ath10k/wmi-tlv.h +5 -0
@@ -1670,6 +1670,11 @@ struct wmi_tlv_resource_config {__le32 keep_alive_pattern_size;__le32 max_tdls_concurrent_sleep_sta;__le32 max_tdls_concurrent_buffer_sta; +__le32 wmi_send_separate; +__le32 num_ocb_vdevs; +__le32 num_ocb_channels; +__le32 num_ocb_schedules; +__le32 host_capab; } __packed;struct wmi_tlv_init_cmd {
Signature · 1 line
2.7.4
cover ath10k: Handle mgmt tx completion event
The transmitted management frame completion can be sent by the firmware as one completion per event or it can bundle the completion of a bunch of management frames and send it in one single event.
Disable the bundle tx completion for management frames and handle the tx completion event for management frames to free these frames.
Tested HW: WCN3990
Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1
Rakesh Pillai (1):
ath10k: Handle mgmt tx completion event
Surabhi Vishnoi (1):
ath10k: Disable bundle mgmt tx completion event support
drivers/net/wireless/ath/ath10k/core.c | 1 + drivers/net/wireless/ath/ath10k/core.h | 5 ++ drivers/net/wireless/ath/ath10k/hw.h | 1 + drivers/net/wireless/ath/ath10k/wmi-ops.h | 12 +++++ drivers/net/wireless/ath/ath10k/wmi-tlv.c | 70 +++++++++++++++++++++++++- drivers/net/wireless/ath/ath10k/wmi-tlv.h | 17 +++++++ drivers/net/wireless/ath/ath10k/wmi.c | 84 +++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.h | 7 +++ 8 files changed, 195 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4
PATCH 2/2 ath10k: Handle mgmt tx completion event
WCN3990 transmits management frames via WMI with reference. Currently, with the management tx completion not being handled, these frames are not getting freed even after the transmission status is returned by the firmware.
The transmitted management frames should be freed when the firmware sends the over-the-air tx status of the corresponding management frames.
Handle the wmi mgmt tx completion event and free the corresponding management frame.
Tested HW: WCN3990
Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1
--- drivers/net/wireless/ath/ath10k/core.c | 1 + drivers/net/wireless/ath/ath10k/core.h | 5 ++ drivers/net/wireless/ath/ath10k/hw.h | 1 + drivers/net/wireless/ath/ath10k/wmi-ops.h | 12 +++++ drivers/net/wireless/ath/ath10k/wmi-tlv.c | 65 +++++++++++++++++++++++- drivers/net/wireless/ath/ath10k/wmi-tlv.h | 12 +++++ drivers/net/wireless/ath/ath10k/wmi.c | 84 +++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.h | 7 +++ 8 files changed, 185 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +1 -0
@@ -2109,6 +2109,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ar->fw_stats_req_mask =WMI_STAT_PDEV |WMI_STAT_VDEV |WMI_STAT_PEER ; ar->max_spatial_stream =WMI_MAX_SPATIAL_STREAM ; + ar->wmi.mgmt_max_num_pending_tx =TARGET_TLV_MGMT_NUM_MSDU_DESC ;break ;case ATH10K_FW_WMI_OP_VERSION_10_4 : ar->max_num_peers =TARGET_10_4_NUM_PEERS ;
drivers/net/wireless/ath/ath10k/core.h +5 -0
@@ -186,6 +186,11 @@ struct ath10k_wmi {const struct wmi_ops *ops;const struct wmi_peer_flags_map *peer_flags; +u32 mgmt_max_num_pending_tx; + +/* Protected by data_lock */ +struct idr mgmt_pending_tx; +u32 num_mem_chunks;u32 rx_decap_mode;struct ath10k_mem_chunk mem_chunks[WMI_MAX_MEM_REQS ];
drivers/net/wireless/ath/ath10k/hw.h +1 -0
@@ -704,6 +704,7 @@ ath10k_rx_desc_get_l3_pad_bytes(struct ath10k_hw_params *hw,#define TARGET_TLV_NUM_TIDS ((TARGET_TLV_NUM_PEERS) * 2)#define TARGET_TLV_NUM_MSDU_DESC (1024 + 32)#define TARGET_TLV_NUM_WOW_PATTERNS 22 +#define TARGET_TLV_MGMT_NUM_MSDU_DESC (50)/* Target specific defines for WMI-HL-1.0 firmware */ #define TARGET_HL_10_TLV_NUM_PEERS 14
drivers/net/wireless/ath/ath10k/wmi-ops.h +12 -0
@@ -31,6 +31,8 @@ struct wmi_ops { struct wmi_scan_ev_arg *arg);int (*pull_mgmt_rx)(struct ath10k *ar,struct sk_buff *skb,struct wmi_mgmt_rx_ev_arg *arg); +int (*pull_mgmt_tx_compl)(struct ath10k *ar,struct sk_buff *skb, +struct wmi_tlv_mgmt_tx_compl_ev_arg *arg);int (*pull_ch_info)(struct ath10k *ar,struct sk_buff *skb,struct wmi_ch_info_ev_arg *arg); int (*pull_vdev_start)(struct ath10k *ar, struct sk_buff *skb,
@@ -262,6 +264,16 @@ ath10k_wmi_pull_scan(struct ath10k *ar, struct sk_buff *skb, }static inline int +ath10k_wmi_pull_mgmt_tx_compl (struct ath10k *ar,struct sk_buff *skb, +struct wmi_tlv_mgmt_tx_compl_ev_arg *arg) +{ +if (!ar->wmi.ops->pull_mgmt_tx_compl) +return -EOPNOTSUPP ; + +return ar->wmi.ops->pull_mgmt_tx_compl (ar, skb, arg); +} + +static inline int ath10k_wmi_pull_mgmt_rx (struct ath10k *ar,struct sk_buff *skb,struct wmi_mgmt_rx_ev_arg *arg) {
drivers/net/wireless/ath/ath10k/wmi-tlv.c +63 -2
115 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/wmi-tlv.h +12 -0
@@ -320,6 +320,7 @@ enum wmi_tlv_event_id {WMI_TLV_TBTTOFFSET_UPDATE_EVENTID ,WMI_TLV_OFFLOAD_BCN_TX_STATUS_EVENTID ,WMI_TLV_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID , +WMI_TLV_MGMT_TX_COMPLETION_EVENTID ,WMI_TLV_TX_DELBA_COMPLETE_EVENTID =WMI_TLV_EV (WMI_TLV_GRP_BA_NEG ),WMI_TLV_TX_ADDBA_COMPLETE_EVENTID , WMI_TLV_BA_RSP_SSN_EVENTID,
@@ -1573,6 +1574,17 @@ struct wmi_tlv {u8 value[0 ]; } __packed; +struct ath10k_mgmt_tx_pkt_addr { +void *vaddr; +dma_addr_t paddr; +}; + +struct wmi_tlv_mgmt_tx_compl_ev { +__le32 desc_id; +__le32 status; +__le32 pdev_id; +}; +#define WMI_TLV_MGMT_RX_NUM_RSSI 4struct wmi_tlv_mgmt_rx_ev {
drivers/net/wireless/ath/ath10k/wmi.c +84 -0
104 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/wmi.h +7 -0
@@ -6599,6 +6599,12 @@ struct wmi_scan_ev_arg {__le32 vdev_id; }; +struct wmi_tlv_mgmt_tx_compl_ev_arg { +__le32 desc_id; +__le32 status; +__le32 pdev_id; +}; +struct wmi_mgmt_rx_ev_arg {__le32 channel;__le32 snr;
@@ -7070,6 +7076,7 @@ int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg);int ath10k_wmi_event_scan (struct ath10k *ar,struct sk_buff *skb);int ath10k_wmi_event_mgmt_rx (struct ath10k *ar,struct sk_buff *skb); +int ath10k_wmi_event_mgmt_tx_compl (struct ath10k *ar,struct sk_buff *skb);void ath10k_wmi_event_chan_info (struct ath10k *ar,struct sk_buff *skb);void ath10k_wmi_event_echo (struct ath10k *ar,struct sk_buff *skb);int ath10k_wmi_event_debug_mesg (struct ath10k *ar,struct sk_buff *skb);
Signature · 1 line
2.7.4
Re: [PATCH 1/2] ath10k: Disable bundle mgmt tx completion event support
In reply to Rakesh PillaiQuoted 16 lines · Rakesh Pillai
The tx completion of multiple mgmt frames can be bundled
in a single event and sent by the firmware to host, if this capability is not disabled explicitly by the host. If the host cannot handle the bundled mgmt tx completion, this capability support needs to be disabled in the wmi init cmd, sent to the firmware.Add the host capability indication flag in the wmi ready command, to let firmware know the features supported by the host driver. This field is ignored if it is not supported by firmware.
Set the host capability indication flag(i.e.
host_capab) to zero, for disabling the support of bundle mgmt tx completion. This will indicate the firmware to send completion event for every mgmt tx completion, instead of bundling them together and sending in a single event.
Quoted 6 lines
Tested HW: WCN3990
Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1Signed-off-by Surabhi Vishnoi <[email protected]>Signed-off-by Rakesh Pillai <[email protected]>Signed-off-by Kalle Valo <[email protected]>
2 patches applied to ath-next branch of ath.git, thanks.
673bc519c558 ath10k: disable bundle mgmt tx completion event support dc405152bb64 ath10k: handle mgmt tx completion event
Signature · 9 lines
https://patchwork.kernel.org/patch/10493381/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Re: [PATCH 1/2] ath10k: Disable bundle mgmt tx completion event support
In reply to Rakesh PillaiQuoted 16 lines · Rakesh Pillai
The tx completion of multiple mgmt frames can be bundled
in a single event and sent by the firmware to host, if this capability is not disabled explicitly by the host. If the host cannot handle the bundled mgmt tx completion, this capability support needs to be disabled in the wmi init cmd, sent to the firmware.Add the host capability indication flag in the wmi ready command, to let firmware know the features supported by the host driver. This field is ignored if it is not supported by firmware.
Set the host capability indication flag(i.e.
host_capab) to zero, for disabling the support of bundle mgmt tx completion. This will indicate the firmware to send completion event for every mgmt tx completion, instead of bundling them together and sending in a single event.
Quoted 6 lines
Tested HW: WCN3990
Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1Signed-off-by Surabhi Vishnoi <[email protected]>Signed-off-by Rakesh Pillai <[email protected]>Signed-off-by Kalle Valo <[email protected]>
2 patches applied to ath-next branch of ath.git, thanks.
673bc519c558 ath10k: disable bundle mgmt tx completion event support dc405152bb64 ath10k: handle mgmt tx completion event
Signature · 3 lines
https://patchwork.kernel.org/patch/10493381/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches