forked from openwrt/openwrt
-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ath11k_nss: utilize existing function to get arvif from dev
Signed-off-by: Sean Khan <[email protected]>
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
...el/mac80211/patches/nss/ath11k/999-901-ath11k-NSS-use-ath11k_nss_get_arvif_from_dev.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- a/drivers/net/wireless/ath/ath11k/nss.c | ||
+++ b/drivers/net/wireless/ath/ath11k/nss.c | ||
@@ -978,36 +978,20 @@ ath11k_nss_vdev_data_receive(struct net_ | ||
__attribute__((unused)) struct napi_struct *napi) | ||
{ | ||
struct wireless_dev *wdev = NULL; | ||
- struct ieee80211_vif *vif = NULL; | ||
struct ath11k_vif *arvif; | ||
struct ath11k_base *ab; | ||
bool eth_decap = false; | ||
int data_offs = 0; | ||
int ret; | ||
|
||
- if (!dev) { | ||
- dev_kfree_skb_any(skb); | ||
- return; | ||
- } | ||
- | ||
- wdev = dev->ieee80211_ptr; | ||
- if (!wdev) { | ||
- dev_kfree_skb_any(skb); | ||
- return; | ||
- } | ||
- | ||
- vif = wdev_to_ieee80211_vif(wdev); | ||
- if (!vif) { | ||
- dev_kfree_skb_any(skb); | ||
- return; | ||
- } | ||
- | ||
- arvif = (struct ath11k_vif *)vif->drv_priv; | ||
+ arvif = ath11k_nss_get_arvif_from_dev(dev); | ||
if (!arvif) { | ||
dev_kfree_skb_any(skb); | ||
return; | ||
} | ||
|
||
+ wdev = ieee80211_vif_to_wdev_relaxed(arvif->vif); | ||
+ | ||
ab = arvif->ar->ab; | ||
|
||
skb->dev = dev; | ||
@@ -1016,7 +1000,7 @@ ath11k_nss_vdev_data_receive(struct net_ | ||
ath11k_dbg_dump(ab, ATH11K_DBG_DP_RX, "", "dp rx msdu from nss: ", | ||
skb->data, skb->len); | ||
|
||
- if ((vif->type == NL80211_IFTYPE_STATION && wdev->use_4addr) && | ||
+ if ((arvif->vif->type == NL80211_IFTYPE_STATION && wdev->use_4addr) && | ||
ath11k_nss_vdev_data_receive_mec_check(arvif->ar, skb)) { | ||
dev_kfree_skb_any(skb); | ||
return; |