Commit 8af63fed authored by Felix Fietkau's avatar Felix Fietkau
Browse files

mt76: add multiple wiphy support to mt76_get_min_avg_rssi



Allow tracking clients of both wiphys separately

Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent beaaeb6b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -793,7 +793,7 @@ int mt76_sta_state(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
void __mt76_sta_remove(struct mt76_dev *dev, struct ieee80211_vif *vif,
		       struct ieee80211_sta *sta);

int mt76_get_min_avg_rssi(struct mt76_dev *dev);
int mt76_get_min_avg_rssi(struct mt76_dev *dev, bool ext_phy);

int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		     int *dbm);
+1 −1
Original line number Diff line number Diff line
@@ -1737,7 +1737,7 @@ mt7603_false_cca_check(struct mt7603_dev *dev)

	mt7603_cca_stats_reset(dev);

	min_signal = mt76_get_min_avg_rssi(&dev->mt76);
	min_signal = mt76_get_min_avg_rssi(&dev->mt76, false);
	if (!min_signal) {
		dev->sensitivity = 0;
		dev->last_cca_adj = jiffies;
+1 −1
Original line number Diff line number Diff line
@@ -1266,7 +1266,7 @@ mt7615_mac_adjust_sensitivity(struct mt7615_dev *dev,
	int signal;

	sensitivity = ofdm ? &dev->ofdm_sensitivity : &dev->cck_sensitivity;
	signal = mt76_get_min_avg_rssi(&dev->mt76);
	signal = mt76_get_min_avg_rssi(&dev->mt76, false);
	if (!signal) {
		mt7615_mac_set_default_sensitivity(dev);
		return;
+1 −1
Original line number Diff line number Diff line
@@ -1069,7 +1069,7 @@ mt76x0_phy_update_channel_gain(struct mt76x02_dev *dev)
	u8 gain_delta;
	int low_gain;

	dev->cal.avg_rssi_all = mt76_get_min_avg_rssi(&dev->mt76);
	dev->cal.avg_rssi_all = mt76_get_min_avg_rssi(&dev->mt76, false);
	if (!dev->cal.avg_rssi_all)
		dev->cal.avg_rssi_all = -75;

+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ void mt76x2_phy_update_channel_gain(struct mt76x02_dev *dev)
	int low_gain;
	u32 val;

	dev->cal.avg_rssi_all = mt76_get_min_avg_rssi(&dev->mt76);
	dev->cal.avg_rssi_all = mt76_get_min_avg_rssi(&dev->mt76, false);
	if (!dev->cal.avg_rssi_all)
		dev->cal.avg_rssi_all = -75;

Loading