qcacld-3.0: Refactor HDD for changes in cdp_fc_get_tx_resource

Currently, the API cdp_fc_get_tx_resource  takes as input the sta_id. As a
part of cleaning up the usage of sta_id, replace it by peer mac address.

Change-Id: I7b81a05d312da84aa16c82f0f6152710daf986c5
CRs-Fixed: 2507274
This commit is contained in:
Sourav Mohapatra
2019-08-05 12:21:45 +05:30
committad av nshrivas
förälder 6ff56da568
incheckning 5d22fbd743
3 ändrade filer med 37 tillägg och 19 borttagningar

Visa fil

@@ -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_fp flow_control_fp,
ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause); ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause);
void hdd_deregister_tx_flow_control(struct hdd_adapter *adapter); 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, 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 #else
static inline void hdd_tx_resume_cb(void *adapter_context, bool tx_resume) 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_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 */ #endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */

Visa fil

@@ -561,8 +561,14 @@ static void __hdd_softap_hard_start_xmit(struct sk_buff *skb,
} }
} }
hdd_get_tx_resource(adapter, sta_id, if (QDF_NBUF_CB_GET_IS_BCAST(skb) || QDF_NBUF_CB_GET_IS_MCAST(skb))
WLAN_SAP_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME); 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. */ /* Get TL AC corresponding to Qdisc queue index/AC. */
ac = hdd_qdisc_ac_to_tl_ac[skb->queue_mapping]; ac = hdd_qdisc_ac_to_tl_ac[skb->queue_mapping];

Visa fil

@@ -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, 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 == 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_low_watermark,
adapter->tx_flow_hi_watermark_offset)) { adapter->tx_flow_hi_watermark_offset)) {
hdd_debug("Disabling queues lwm %d hwm offset %d", 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.tx_called;
adapter->hdd_stats.tx_rx_stats.cont_txtimeout_cnt = 0; 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() || if (cds_is_driver_recovering() || cds_is_driver_in_bad_state() ||
cds_is_load_or_unload_in_progress()) { cds_is_load_or_unload_in_progress()) {
@@ -970,8 +964,8 @@ static void __hdd_hard_start_xmit(struct sk_buff *skb,
goto drop_pkt; goto drop_pkt;
} }
hdd_get_tx_resource(adapter, STAId, hdd_get_tx_resource(adapter, mac_addr,
WLAN_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME); WLAN_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME);
/* Get TL AC corresponding to Qdisc queue index/AC. */ /* Get TL AC corresponding to Qdisc queue index/AC. */
ac = hdd_qdisc_ac_to_tl_ac[skb->queue_mapping]; 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; adapter->stats.tx_bytes += skb->len;
mac_addr = (struct qdf_mac_addr *)skb->data;
vdev = hdd_objmgr_get_vdev(adapter); vdev = hdd_objmgr_get_vdev(adapter);
if (vdev) { if (vdev) {
ucfg_tdls_update_tx_pkt_cnt(vdev, mac_addr); ucfg_tdls_update_tx_pkt_cnt(vdev, mac_addr);