wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
wiphy->reg_notifier = mt7915_regd_notifier;
wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
- wiphy->mbssid_max_interfaces = 16;
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_BSS_COLOR);
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_BEACON_RATE_VHT);
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_BEACON_RATE_HE);
- if (!mdev->dev->of_node ||
- !of_property_read_bool(mdev->dev->of_node,
- "mediatek,disable-radar-background"))
- wiphy_ext_feature_set(wiphy,
- NL80211_EXT_FEATURE_RADAR_BACKGROUND);
-
ieee80211_hw_set(hw, HAS_RATE_CONTROL);
ieee80211_hw_set(hw, SUPPORTS_TX_ENCAP_OFFLOAD);
ieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD);
if ((r->band_idx && !dev->phy.band_idx) && dev->mt76.phy2)
mphy = dev->mt76.phy2;
- if (r->band_idx == MT_RX_SEL2)
- cfg80211_background_radar_event(mphy->hw->wiphy,
- &dev->rdd2_chandef,
- GFP_ATOMIC);
- else
- ieee80211_radar_detected(mphy->hw);
+ ieee80211_radar_detected(mphy->hw);
dev->hw_pattern++;
}
}
static void
-mt7915_mcu_beacon_mbss(struct sk_buff *rskb, struct sk_buff *skb,
- struct ieee80211_vif *vif, struct bss_info_bcn *bcn,
- struct ieee80211_mutable_offsets *offs)
-{
- struct bss_info_bcn_mbss *mbss;
- const struct element *elem;
- struct tlv *tlv;
-
- if (!vif->bss_conf.bssid_indicator)
- return;
-
- tlv = mt7915_mcu_add_nested_subtlv(rskb, BSS_INFO_BCN_MBSSID,
- sizeof(*mbss), &bcn->sub_ntlv,
- &bcn->len);
-
- mbss = (struct bss_info_bcn_mbss *)tlv;
- mbss->offset[0] = cpu_to_le16(offs->tim_offset);
- mbss->bitmap = cpu_to_le32(1);
-
- for_each_element_id(elem, WLAN_EID_MULTIPLE_BSSID,
- &skb->data[offs->mbssid_off],
- skb->len - offs->mbssid_off) {
- const struct element *sub_elem;
-
- if (elem->datalen < 2)
- continue;
-
- for_each_element(sub_elem, elem->data + 1, elem->datalen - 1) {
- const struct ieee80211_bssid_index *idx;
- const u8 *idx_ie;
-
- if (sub_elem->id || sub_elem->datalen < 4)
- continue; /* not a valid BSS profile */
-
- /* Find WLAN_EID_MULTI_BSSID_IDX
- * in the merged nontransmitted profile
- */
- idx_ie = cfg80211_find_ie(WLAN_EID_MULTI_BSSID_IDX,
- sub_elem->data,
- sub_elem->datalen);
- if (!idx_ie || idx_ie[1] < sizeof(*idx))
- continue;
-
- idx = (void *)(idx_ie + 2);
- if (!idx->bssid_index || idx->bssid_index > 31)
- continue;
-
- mbss->offset[idx->bssid_index] =
- cpu_to_le16(idx_ie - skb->data);
- mbss->bitmap |= cpu_to_le32(BIT(idx->bssid_index));
- }
- }
-}
-
-static void
mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
struct sk_buff *rskb, struct sk_buff *skb,
struct bss_info_bcn *bcn,
mt7915_mcu_beacon_check_caps(phy, vif, skb);
mt7915_mcu_beacon_cntdwn(vif, rskb, skb, bcn, &offs);
- mt7915_mcu_beacon_mbss(rskb, skb, vif, bcn, &offs);
mt7915_mcu_beacon_cont(dev, vif, rskb, skb, bcn, &offs);
dev_kfree_skb(skb);