Message ID | 20221125072416.94752-2-pkshih@realtek.com (mailing list archive) |
---|---|
State | Accepted |
Commit | cd9b6b3baf5278c73c91e242d41387684fc7f8d8 |
Delegated to: | Kalle Valo |
Headers | show |
Series | wifi: rtw89: fixes of monitor mode | expand |
Ping-Ke Shih <pkshih@realtek.com> wrote: > From: Zong-Zhe Yang <kevin_yang@realtek.com> > > For running with mac80211 channel context ops and using only as monitor, > we need to enable WANT_MONITOR_VIF to let mac80211 process virtual monitor > interface. Then, we are able to set channel on the monitor from user space. > > Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> > Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> 3 patches applied to wireless-next.git, thanks. cd9b6b3baf52 wifi: rtw89: enable mac80211 virtual monitor interface 51e8ed4e44b5 wifi: rtw89: add HE radiotap for monitor mode a215b2b7055f wifi: rtw89: 8852b: turn off PoP function in monitor mode
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index a5fe45d79f189..af8daa101f457 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -1405,6 +1405,9 @@ static void rtw89_vif_rx_stats_iter(void *data, u8 *mac, struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; const u8 *bssid = iter_data->bssid; + if (!vif->bss_conf.bssid) + return; + if (ieee80211_is_trigger(hdr->frame_control)) { rtw89_stats_trigger_frame(rtwdev, vif, skb); return; @@ -2386,6 +2389,8 @@ void rtw89_vif_type_mapping(struct ieee80211_vif *vif, bool assoc) rtwvif->self_role = RTW89_SELF_ROLE_CLIENT; rtwvif->addr_cam.sec_ent_mode = RTW89_ADDR_CAM_SEC_NORMAL; break; + case NL80211_IFTYPE_MONITOR: + break; default: WARN_ON(1); break; @@ -3266,6 +3271,7 @@ static int rtw89_core_register_hw(struct rtw89_dev *rtwdev) ieee80211_hw_set(hw, SUPPORTS_DYNAMIC_PS); ieee80211_hw_set(hw, SINGLE_SCAN_ON_ALL_BANDS); ieee80211_hw_set(hw, SUPPORTS_MULTI_BSSID); + ieee80211_hw_set(hw, WANT_MONITOR_VIF); hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_AP) |