mac80211.c (d9c54264d818b5a9609a7c3c6bca81e42246202e) | mac80211.c (43ba19228cfacaa18363dfb9e88074f8322d22f3) |
---|---|
1// SPDX-License-Identifier: ISC 2/* 3 * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name> 4 */ 5#include <linux/of.h> 6#include "mt76.h" 7 8#define CHAN2G(_idx, _freq) { \ --- 970 unchanged lines hidden (view full) --- 979} 980 981void __mt76_sta_remove(struct mt76_dev *dev, struct ieee80211_vif *vif, 982 struct ieee80211_sta *sta) 983{ 984 struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv; 985 int i, idx = wcid->idx; 986 | 1// SPDX-License-Identifier: ISC 2/* 3 * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name> 4 */ 5#include <linux/of.h> 6#include "mt76.h" 7 8#define CHAN2G(_idx, _freq) { \ --- 970 unchanged lines hidden (view full) --- 979} 980 981void __mt76_sta_remove(struct mt76_dev *dev, struct ieee80211_vif *vif, 982 struct ieee80211_sta *sta) 983{ 984 struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv; 985 int i, idx = wcid->idx; 986 |
987 rcu_assign_pointer(dev->wcid[idx], NULL); 988 synchronize_rcu(); 989 | |
990 for (i = 0; i < ARRAY_SIZE(wcid->aggr); i++) 991 mt76_rx_aggr_stop(dev, wcid, i); 992 993 if (dev->drv->sta_remove) 994 dev->drv->sta_remove(dev, vif, sta); 995 996 mt76_tx_status_check(dev, wcid, true); 997 for (i = 0; i < ARRAY_SIZE(sta->txq); i++) --- 33 unchanged lines hidden (view full) --- 1031 if (old_state == IEEE80211_STA_NONE && 1032 new_state == IEEE80211_STA_NOTEXIST) 1033 mt76_sta_remove(dev, vif, sta); 1034 1035 return 0; 1036} 1037EXPORT_SYMBOL_GPL(mt76_sta_state); 1038 | 987 for (i = 0; i < ARRAY_SIZE(wcid->aggr); i++) 988 mt76_rx_aggr_stop(dev, wcid, i); 989 990 if (dev->drv->sta_remove) 991 dev->drv->sta_remove(dev, vif, sta); 992 993 mt76_tx_status_check(dev, wcid, true); 994 for (i = 0; i < ARRAY_SIZE(sta->txq); i++) --- 33 unchanged lines hidden (view full) --- 1028 if (old_state == IEEE80211_STA_NONE && 1029 new_state == IEEE80211_STA_NOTEXIST) 1030 mt76_sta_remove(dev, vif, sta); 1031 1032 return 0; 1033} 1034EXPORT_SYMBOL_GPL(mt76_sta_state); 1035 |
1036void mt76_sta_pre_rcu_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1037 struct ieee80211_sta *sta) 1038{ 1039 struct mt76_phy *phy = hw->priv; 1040 struct mt76_dev *dev = phy->dev; 1041 struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv; 1042 1043 mutex_lock(&dev->mutex); 1044 rcu_assign_pointer(dev->wcid[wcid->idx], NULL); 1045 mutex_unlock(&dev->mutex); 1046} 1047EXPORT_SYMBOL_GPL(mt76_sta_pre_rcu_remove); 1048 |
|
1039int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1040 int *dbm) 1041{ 1042 struct mt76_phy *phy = hw->priv; 1043 int n_chains = hweight8(phy->antenna_mask); 1044 1045 *dbm = DIV_ROUND_UP(phy->txpower_cur, 2); 1046 --- 144 unchanged lines hidden --- | 1049int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1050 int *dbm) 1051{ 1052 struct mt76_phy *phy = hw->priv; 1053 int n_chains = hweight8(phy->antenna_mask); 1054 1055 *dbm = DIV_ROUND_UP(phy->txpower_cur, 2); 1056 --- 144 unchanged lines hidden --- |