diff --git a/core/hdd/inc/wlan_hdd_tx_rx.h b/core/hdd/inc/wlan_hdd_tx_rx.h index 0cee6781f7..48c2f76b53 100644 --- a/core/hdd/inc/wlan_hdd_tx_rx.h +++ b/core/hdd/inc/wlan_hdd_tx_rx.h @@ -239,8 +239,17 @@ void hdd_register_tx_flow_control(struct hdd_adapter *adapter, ol_txrx_tx_flow_control_fp flow_control_fp, ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause); void hdd_deregister_tx_flow_control(struct hdd_adapter *adapter); + +/** + * hdd_get_tx_resource() - check tx resources and take action + * @adapter: adapter handle + * @mac_addr: mac address + * @timer_value: timer value + * + * Return: none + */ void hdd_get_tx_resource(struct hdd_adapter *adapter, - uint8_t STAId, uint16_t timer_value); + struct qdf_mac_addr *mac_addr, uint16_t timer_value); #else static inline void hdd_tx_resume_cb(void *adapter_context, bool tx_resume) @@ -259,8 +268,19 @@ static inline void hdd_register_tx_flow_control(struct hdd_adapter *adapter, static inline void hdd_deregister_tx_flow_control(struct hdd_adapter *adapter) { } -static inline void hdd_get_tx_resource(struct hdd_adapter *adapter, - uint8_t STAId, uint16_t timer_value) + + +/** + * hdd_get_tx_resource() - check tx resources and take action + * @adapter: adapter handle + * @mac_addr: mac address + * @timer_value: timer value + * + * Return: none + */ +static inline +void hdd_get_tx_resource(struct hdd_adapter *adapter, + struct qdf_mac_addr *mac_addr, uint16_t timer_value) { } #endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */ diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 393a5d5cf4..be26d1637c 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -561,8 +561,14 @@ static void __hdd_softap_hard_start_xmit(struct sk_buff *skb, } } - hdd_get_tx_resource(adapter, sta_id, - WLAN_SAP_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME); + if (QDF_NBUF_CB_GET_IS_BCAST(skb) || QDF_NBUF_CB_GET_IS_MCAST(skb)) + hdd_get_tx_resource( + adapter, &adapter->mac_addr, + WLAN_SAP_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME); + else + hdd_get_tx_resource( + adapter, dest_mac_addr, + WLAN_SAP_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME); /* Get TL AC corresponding to Qdisc queue index/AC. */ ac = hdd_qdisc_ac_to_tl_ac[skb->queue_mapping]; diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index a9bfc74dbb..d65d08a76b 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -346,19 +346,12 @@ void hdd_deregister_tx_flow_control(struct hdd_adapter *adapter) } } -/** - * hdd_get_tx_resource() - check tx resources and take action - * @adapter: adapter handle - * @STAId: station id - * @timer_value: timer value - * - * Return: none - */ void hdd_get_tx_resource(struct hdd_adapter *adapter, - uint8_t STAId, uint16_t timer_value) + struct qdf_mac_addr *mac_addr, uint16_t timer_value) { if (false == - cdp_fc_get_tx_resource(cds_get_context(QDF_MODULE_ID_SOC), STAId, + cdp_fc_get_tx_resource(cds_get_context(QDF_MODULE_ID_SOC), + *mac_addr, adapter->tx_flow_low_watermark, adapter->tx_flow_hi_watermark_offset)) { hdd_debug("Disabling queues lwm %d hwm offset %d", @@ -931,6 +924,7 @@ static void __hdd_hard_start_xmit(struct sk_buff *skb, ++adapter->hdd_stats.tx_rx_stats.tx_called; adapter->hdd_stats.tx_rx_stats.cont_txtimeout_cnt = 0; + mac_addr = (struct qdf_mac_addr *)skb->data; if (cds_is_driver_recovering() || cds_is_driver_in_bad_state() || cds_is_load_or_unload_in_progress()) { @@ -970,8 +964,8 @@ static void __hdd_hard_start_xmit(struct sk_buff *skb, goto drop_pkt; } - hdd_get_tx_resource(adapter, STAId, - WLAN_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME); + hdd_get_tx_resource(adapter, mac_addr, + WLAN_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME); /* Get TL AC corresponding to Qdisc queue index/AC. */ ac = hdd_qdisc_ac_to_tl_ac[skb->queue_mapping]; @@ -1066,8 +1060,6 @@ static void __hdd_hard_start_xmit(struct sk_buff *skb, adapter->stats.tx_bytes += skb->len; - mac_addr = (struct qdf_mac_addr *)skb->data; - vdev = hdd_objmgr_get_vdev(adapter); if (vdev) { ucfg_tdls_update_tx_pkt_cnt(vdev, mac_addr);