mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7925: report only 2.4 GHz NAN supported band
The firmware only checks the 2.4 GHz bit of the local device capability
supported_bands field, so set it directly and drop the unused helper.
Fixes: 0f3605e4f8de ("wifi: mt76: mt7925: wire up NAN operations")
Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Stella Liu <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
b51cd50b20
commit
984def9943
+1
-19
@@ -680,23 +680,6 @@ static int mt7925_nan_peer_rec_tlv(struct sk_buff *skb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u8 mt7925_nan_get_supported_bands(struct mt792x_vif *mvif)
|
||||
{
|
||||
struct wiphy *wiphy;
|
||||
u8 bands = 0;
|
||||
|
||||
if (!mvif || !mvif->phy)
|
||||
return BIT(NAN_SUPPORTED_BAND_ID_2P4G);
|
||||
|
||||
wiphy = mvif->phy->mt76->hw->wiphy;
|
||||
if (wiphy->nan_supported_bands & BIT(NL80211_BAND_2GHZ))
|
||||
bands |= BIT(NAN_SUPPORTED_BAND_ID_2P4G);
|
||||
if (wiphy->nan_supported_bands & BIT(NL80211_BAND_5GHZ))
|
||||
bands |= BIT(NAN_SUPPORTED_BAND_ID_5G);
|
||||
|
||||
return bands ?: BIT(NAN_SUPPORTED_BAND_ID_2P4G);
|
||||
}
|
||||
|
||||
static int mt7925_nan_peer_cap_tlv(struct sk_buff *skb,
|
||||
struct ieee80211_sta *sta,
|
||||
struct mt792x_sta *msta)
|
||||
@@ -723,8 +706,7 @@ static int mt7925_nan_peer_cap_tlv(struct sk_buff *skb,
|
||||
|
||||
peer_cap_tlv = (struct mt7925_nan_sched_update_peer_cap_tlv *)tlv;
|
||||
peer_cap_tlv->sch_idx = cpu_to_le32(msta->nan_sched.sch_idx);
|
||||
peer_cap_tlv->supported_bands =
|
||||
mt7925_nan_get_supported_bands(msta->vif);
|
||||
peer_cap_tlv->supported_bands = BIT(NAN_SUPPORTED_BAND_ID_2P4G);
|
||||
peer_cap_tlv->max_chnl_switch_time = cpu_to_le16(sched->max_chan_switch);
|
||||
|
||||
for (i = 0; i < sched->n_channels; i++) {
|
||||
|
||||
Reference in New Issue
Block a user