UPSTREAM: wifi: cfg80211: add link id to txq params
The Tx queue parameters are per link, so add the link ID from nl80211 parameters to the API. While at it, lock the wdev when calling into the driver so it (and we) can check the link ID appropriately. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Bug: 253289327 Change-Id: I170af82c4d916103cdac672840f4176acb8baf77 (cherry picked from commit 9d2bb84d54a40361c7008b33a60dc24f78724746) Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
This commit is contained in:
committed by
Todd Kjos
parent
8e9375450e
commit
94afbcfb15
@@ -2429,6 +2429,7 @@ struct ocb_setup {
|
||||
* @cwmax: Maximum contention window [a value of the form 2^n-1 in the range
|
||||
* 1..32767]
|
||||
* @aifs: Arbitration interframe space [0..255]
|
||||
* @link_id: link_id or -1 for non-MLD
|
||||
*/
|
||||
struct ieee80211_txq_params {
|
||||
enum nl80211_ac ac;
|
||||
@@ -2436,6 +2437,7 @@ struct ieee80211_txq_params {
|
||||
u16 cwmin;
|
||||
u16 cwmax;
|
||||
u8 aifs;
|
||||
int link_id;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -3457,8 +3457,21 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
|
||||
if (result)
|
||||
goto out;
|
||||
|
||||
result = rdev_set_txq_params(rdev, netdev,
|
||||
&txq_params);
|
||||
txq_params.link_id =
|
||||
nl80211_link_id_or_invalid(info->attrs);
|
||||
|
||||
wdev_lock(netdev->ieee80211_ptr);
|
||||
if (txq_params.link_id >= 0 &&
|
||||
!(netdev->ieee80211_ptr->valid_links &
|
||||
BIT(txq_params.link_id)))
|
||||
result = -ENOLINK;
|
||||
else if (txq_params.link_id >= 0 &&
|
||||
!netdev->ieee80211_ptr->valid_links)
|
||||
result = -EINVAL;
|
||||
else
|
||||
result = rdev_set_txq_params(rdev, netdev,
|
||||
&txq_params);
|
||||
wdev_unlock(netdev->ieee80211_ptr);
|
||||
if (result)
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user