mirror of
				https://github.com/optim-enterprises-bv/openwrt-ipq.git
				synced 2025-10-31 02:08:28 +00:00 
			
		
		
		
	ath11k_nss: consistently use ath11k_sta_to_arsta
Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
		| @@ -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 { | ||||||
		Reference in New Issue
	
	Block a user
	 Sean Khan
					Sean Khan