mt76: mt7915: remove the redundant code
Subsystems (2)
PATCH 1/1 mt76: mt7915: remove the redundant code
From: Bo Jiao <[email protected]>
remove the redundant code.
Signed-off-by Bo Jiao <[email protected]>
--- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 11 ++++------- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 7 +------ 2 files changed, 5 insertions(+), 13 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7915/mac.c +4 -7
@@ -1370,20 +1370,17 @@ void mt7915_mac_reset_counters(struct mt7915_phy *phy) {struct mt7915_dev *dev = phy->dev;bool ext_phy = phy != &dev->phy; -int i; +int i =0 ;for (i =0 ; i <4 ; i++) {mt76_rr (dev,MT_TX_AGG_CNT (ext_phy, i));mt76_rr (dev,MT_TX_AGG_CNT2 (ext_phy, i)); } -if (ext_phy) { - dev->mt76.phy2->survey_time =ktime_get_boottime (); + phy->mt76->survey_time =ktime_get_boottime (); +if (ext_phy) i =ARRAY_SIZE (dev->mt76.aggr_stats) /2 ; - }else { - dev->mt76.phy.survey_time =ktime_get_boottime (); - i =0 ; - } +memset (&dev->mt76.aggr_stats[i],0 ,sizeof (dev->mt76.aggr_stats) /2 );/* reset airtime counters */
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +1 -6
@@ -975,12 +975,7 @@ mt7915_mcu_bss_rfch_tlv(struct sk_buff *skb, struct ieee80211_vif *vif, }if (vif->bss_conf.he_support && vif->type ==NL80211_IFTYPE_STATION ) { -struct mt7915_dev *dev = phy->dev; -struct mt76_phy *mphy = &dev->mt76.phy; -bool ext_phy = phy != &dev->phy; - -if (ext_phy && dev->mt76.phy2) - mphy = dev->mt76.phy2; +struct mt76_phy *mphy = phy->mt76; ch->he_ru26_block =mt7915_check_he_obss_narrow_bw_ru (mphy->hw, vif);
Signature · 5 lines
2.18.0 _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek