qcacld-3.0: Acquire lock to get cpu id
hdd_get_tx_queue_for_ac() calls qdf_get_smp_processor_id(), which gets the current cpu id. This operation must be done with preemption disabled. Currently, as the call is made outside of the netif_tx_lock, this causes an assert. To ensure the call to qdf_get_smp_processor_id() is properly locked, move the original caller hdd_wmm_select_queue(), inside the netif_tx_lock. Change-Id: Ifbe475d0adc724b6b4eddc2774565b67a7e375c2 CRs-Fixed: 3221957
This commit is contained in:

committed by
Madan Koyyalamudi

parent
4b043a5cba
commit
58e4213f02
@@ -279,6 +279,18 @@ uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb,
|
||||
uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hdd_wmm_select_queue() - Function which will classify the packet
|
||||
* according to linux qdisc expectation.
|
||||
*
|
||||
* @dev: [in] pointer to net_device structure
|
||||
* @skb: [in] pointer to os packet
|
||||
*
|
||||
* Return: Qdisc queue index
|
||||
*/
|
||||
uint16_t hdd_wmm_select_queue(struct net_device *dev,
|
||||
struct sk_buff *skb);
|
||||
|
||||
/**
|
||||
* hdd_wmm_acquire_access_required() - Function which will determine
|
||||
* acquire admittance for a WMM AC is required or not based on psb configuration
|
||||
|
@@ -24328,20 +24328,6 @@ static int wlan_hdd_cfg80211_set_bitrate_mask(struct wiphy *wiphy,
|
||||
return errno;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
|
||||
static uint16_t wlan_hdd_select_queue(struct net_device *dev,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
return hdd_select_queue(dev, skb, NULL);
|
||||
}
|
||||
#else
|
||||
static uint16_t wlan_hdd_select_queue(struct net_device *dev,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
return hdd_select_queue(dev, skb, NULL, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int __wlan_hdd_cfg80211_tx_control_port(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
const u8 *buf, size_t len,
|
||||
@@ -24374,9 +24360,9 @@ static int __wlan_hdd_cfg80211_tx_control_port(struct wiphy *wiphy,
|
||||
nbuf->protocol = htons(ETH_P_PAE);
|
||||
skb_reset_network_header(nbuf);
|
||||
skb_reset_mac_header(nbuf);
|
||||
skb_set_queue_mapping(nbuf, wlan_hdd_select_queue(dev, nbuf));
|
||||
|
||||
netif_tx_lock(dev);
|
||||
skb_set_queue_mapping(nbuf, hdd_wmm_select_queue(dev, nbuf));
|
||||
dev->netdev_ops->ndo_start_xmit(nbuf, dev);
|
||||
netif_tx_unlock(dev);
|
||||
|
||||
|
@@ -2140,17 +2140,8 @@ static uint16_t __hdd_wmm_select_queue(struct net_device *dev,
|
||||
return hdd_get_tx_queue_for_ac(adapter, skb, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_wmm_select_queue() - Function which will classify the packet
|
||||
* according to linux qdisc expectation.
|
||||
*
|
||||
* @dev: [in] pointer to net_device structure
|
||||
* @skb: [in] pointer to os packet
|
||||
*
|
||||
* Return: Qdisc queue index
|
||||
*/
|
||||
static uint16_t hdd_wmm_select_queue(struct net_device *dev,
|
||||
struct sk_buff *skb)
|
||||
uint16_t hdd_wmm_select_queue(struct net_device *dev,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
uint16_t q_index;
|
||||
|
||||
|
Reference in New Issue
Block a user