mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
qcacld-3.0: Add SSR protect for ndo hard_start_xmit ops
qcacld-2.0 to qcacld-3.0 propagation SSR should wait until ndo hard_start_xmit ops is completed. Change-Id: Ic3148cfb655f87d22c40bca7825809648c7b4b4a CRs-Fixed: 952660
This commit is contained in:
parent
5ff3c587fb
commit
c4de4ef6f8
2 changed files with 46 additions and 4 deletions
|
|
@ -201,7 +201,7 @@ void hdd_softap_tx_resume_cb(void *adapter_context, bool tx_resume)
|
|||
#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
|
||||
|
||||
/**
|
||||
* hdd_softap_hard_start_xmit() - Transmit a frame
|
||||
* __hdd_softap_hard_start_xmit() - Transmit a frame
|
||||
* @skb: pointer to OS packet (sk_buff)
|
||||
* @dev: pointer to network device
|
||||
*
|
||||
|
|
@ -211,7 +211,7 @@ void hdd_softap_tx_resume_cb(void *adapter_context, bool tx_resume)
|
|||
*
|
||||
* Return: Always returns NETDEV_TX_OK
|
||||
*/
|
||||
int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
int __hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
sme_ac_enum_type ac = SME_AC_BE;
|
||||
hdd_adapter_t *pAdapter = (hdd_adapter_t *) netdev_priv(dev);
|
||||
|
|
@ -371,6 +371,27 @@ drop_pkt_accounting:
|
|||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_softap_hard_start_xmit() - Wrapper function to protect
|
||||
* __hdd_softap_hard_start_xmit from SSR
|
||||
* @skb: pointer to OS packet
|
||||
* @dev: pointer to net_device structure
|
||||
*
|
||||
* Function called by OS if any packet needs to transmit.
|
||||
*
|
||||
* Return: Always returns NETDEV_TX_OK
|
||||
*/
|
||||
int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
cds_ssr_protect(__func__);
|
||||
ret = __hdd_softap_hard_start_xmit(skb, dev);
|
||||
cds_ssr_unprotect(__func__);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* __hdd_softap_tx_timeout() - TX timeout handler
|
||||
* @dev: pointer to network device
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ static void hdd_get_transmit_sta_id(hdd_adapter_t *adapter,
|
|||
}
|
||||
|
||||
/**
|
||||
* hdd_hard_start_xmit() - Transmit a frame
|
||||
* __hdd_hard_start_xmit() - Transmit a frame
|
||||
* @skb: pointer to OS packet (sk_buff)
|
||||
* @dev: pointer to network device
|
||||
*
|
||||
|
|
@ -397,7 +397,7 @@ static void hdd_get_transmit_sta_id(hdd_adapter_t *adapter,
|
|||
*
|
||||
* Return: Always returns NETDEV_TX_OK
|
||||
*/
|
||||
int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
int __hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
sme_ac_enum_type ac;
|
||||
|
|
@ -618,6 +618,27 @@ drop_pkt_accounting:
|
|||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_hard_start_xmit() - Wrapper function to protect
|
||||
* __hdd_hard_start_xmit from SSR
|
||||
* @skb: pointer to OS packet
|
||||
* @dev: pointer to net_device structure
|
||||
*
|
||||
* Function called by OS if any packet needs to transmit.
|
||||
*
|
||||
* Return: Always returns NETDEV_TX_OK
|
||||
*/
|
||||
int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
cds_ssr_protect(__func__);
|
||||
ret = __hdd_hard_start_xmit(skb, dev);
|
||||
cds_ssr_unprotect(__func__);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_get_peer_sta_id() - Get the StationID using the Peer Mac address
|
||||
* @pHddStaCtx: pointer to HDD Station Context
|
||||
|
|
|
|||
Loading…
Reference in a new issue