forked from openwrt/openwrt
-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ath11k_nss: consistently use ath11k_sta_to_arsta
Signed-off-by: Sean Khan <[email protected]>
- Loading branch information
Showing
1 changed file
with
70 additions
and
0 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
package/kernel/mac80211/patches/nss/ath11k/999-903-ath11k-use-ath11k_sta_to_arsta.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,70 @@ | ||
--- a/drivers/net/wireless/ath/ath11k/debugfs_sta.c | ||
+++ b/drivers/net/wireless/ath/ath11k/debugfs_sta.c | ||
@@ -1074,7 +1074,7 @@ static ssize_t ath11k_dbg_sta_reset_rx_s | ||
size_t count, loff_t *ppos) | ||
{ | ||
struct ieee80211_sta *sta = file->private_data; | ||
- struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv; | ||
+ struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta); | ||
struct ath11k *ar = arsta->arvif->ar; | ||
int ret, reset; | ||
|
||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c | ||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c | ||
@@ -1584,7 +1584,7 @@ static void ath11k_dp_ppdu_stats_flush_t | ||
goto exit; | ||
|
||
sta = peer->sta; | ||
- arsta = (struct ath11k_sta *)sta->drv_priv; | ||
+ arsta = ath11k_sta_to_arsta(sta); | ||
|
||
memset(&status, 0, sizeof(status)); | ||
|
||
@@ -1950,7 +1950,7 @@ ath11k_dp_rx_ppdu_stats_update_tx_comp_s | ||
} | ||
|
||
sta = peer->sta; | ||
- arsta = (struct ath11k_sta *)sta->drv_priv; | ||
+ arsta = ath11k_sta_to_arsta(sta); | ||
|
||
memset(&status, 0, sizeof(status)); | ||
|
||
@@ -3009,8 +3009,7 @@ static void ath11k_dp_rx_h_mpdu(struct a | ||
msdu->protocol = eth_type_trans(msdu, msdu->dev); | ||
napi_gro_receive(rxcb->napi, msdu); | ||
if (peer->sta) | ||
- arsta = | ||
- (struct ath11k_sta *)peer->sta->drv_priv; | ||
+ arsta = ath11k_sta_to_arsta(peer->sta); | ||
return; | ||
} | ||
} | ||
@@ -3761,7 +3760,7 @@ static void ath11k_dp_rx_update_user_sta | ||
return; | ||
} | ||
|
||
- arsta = (struct ath11k_sta *)peer->sta->drv_priv; | ||
+ arsta = ath11k_sta_to_arsta(peer->sta); | ||
rx_stats = arsta->rx_stats; | ||
|
||
if (ar->ab->nss.enabled) | ||
@@ -6451,7 +6450,7 @@ int ath11k_dp_rx_process_mon_status(stru | ||
if ((ppdu_info->fc_valid) && | ||
(ppdu_info->ast_index != HAL_AST_IDX_INVALID)) { | ||
if (ppdu_info->reception_type == HAL_RX_RECEPTION_TYPE_SU) { | ||
- arsta = (struct ath11k_sta *)peer->sta->drv_priv; | ||
+ arsta = ath11k_sta_to_arsta(peer->sta); | ||
ath11k_dp_rx_update_peer_su_stats(arsta, ppdu_info); | ||
ath11k_nss_update_sta_rxrate(ppdu_info, peer, NULL); | ||
} else { | ||
--- a/drivers/net/wireless/ath/ath11k/mac.c | ||
+++ b/drivers/net/wireless/ath/ath11k/mac.c | ||
@@ -4455,7 +4455,7 @@ static int ath11k_mac_op_set_key(struct | ||
mutex_lock(&ar->conf_mutex); | ||
if (sta) { | ||
peer_addr = sta->addr; | ||
- arsta = (struct ath11k_sta *)sta->drv_priv; | ||
+ arsta = ath11k_sta_to_arsta(sta); | ||
} else if (arvif->vdev_type == WMI_VDEV_TYPE_STA) { | ||
peer_addr = vif->bss_conf.bssid; | ||
} else { |