Skip to content

Commit

Permalink
mt76: mt7915: fix tssi indication field of DBDC NICs
Browse files Browse the repository at this point in the history
[ Upstream commit 64cf5ad ]

Correct the bitfield which indicates TSSI on/off for MT7915D NIC.

Signed-off-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
evelyn3648 authored and gregkh committed Jul 19, 2021
1 parent 38b73fe commit 7922a84
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h
Expand Up @@ -99,12 +99,15 @@ static inline bool
mt7915_tssi_enabled(struct mt7915_dev *dev, enum nl80211_band band)
{
u8 *eep = dev->mt76.eeprom.data;
u8 val = eep[MT_EE_WIFI_CONF + 7];

/* TODO: DBDC */
if (band == NL80211_BAND_5GHZ)
return eep[MT_EE_WIFI_CONF + 7] & MT_EE_WIFI_CONF7_TSSI0_5G;
if (band == NL80211_BAND_2GHZ)
return val & MT_EE_WIFI_CONF7_TSSI0_2G;

if (dev->dbdc_support)
return val & MT_EE_WIFI_CONF7_TSSI1_5G;
else
return eep[MT_EE_WIFI_CONF + 7] & MT_EE_WIFI_CONF7_TSSI0_2G;
return val & MT_EE_WIFI_CONF7_TSSI0_5G;
}

extern const u8 mt7915_sku_group_len[MAX_SKU_RATE_GROUP_NUM];
Expand Down

0 comments on commit 7922a84

Please sign in to comment.