File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
drivers/net/wireless/mediatek/mt76/mt7996 Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -368,6 +368,7 @@ static void mt7996_set_monitor(struct mt7996_phy *phy, bool enabled)
368368 mt76_rmw_field (dev , MT_DMA_DCR0 (phy -> mt76 -> band_idx ),
369369 MT_DMA_DCR0_RXD_G5_EN , enabled );
370370 mt7996_phy_set_rxfilter (phy );
371+ mt7996_mcu_set_sniffer_mode (phy , enabled );
371372}
372373
373374static int mt7996_add_interface (struct ieee80211_hw * hw ,
Original file line number Diff line number Diff line change @@ -4496,6 +4496,27 @@ int mt7996_mcu_wed_rro_reset_sessions(struct mt7996_dev *dev, u16 id)
44964496 sizeof (req ), true);
44974497}
44984498
4499+ int mt7996_mcu_set_sniffer_mode (struct mt7996_phy * phy , bool enabled )
4500+ {
4501+ struct mt7996_dev * dev = phy -> dev ;
4502+ struct {
4503+ u8 band_idx ;
4504+ u8 _rsv [3 ];
4505+ __le16 tag ;
4506+ __le16 len ;
4507+ u8 enable ;
4508+ u8 _pad [3 ];
4509+ } __packed req = {
4510+ .band_idx = phy -> mt76 -> band_idx ,
4511+ .tag = 0 ,
4512+ .len = cpu_to_le16 (sizeof (req ) - 4 ),
4513+ .enable = enabled ,
4514+ };
4515+
4516+ return mt76_mcu_send_msg (& dev -> mt76 , MCU_WM_UNI_CMD (SNIFFER ), & req ,
4517+ sizeof (req ), true);
4518+ }
4519+
44994520int mt7996_mcu_set_txpower_sku (struct mt7996_phy * phy )
45004521{
45014522#define TX_POWER_LIMIT_TABLE_RATE 0
Original file line number Diff line number Diff line change @@ -621,6 +621,7 @@ void mt7996_mcu_rx_event(struct mt7996_dev *dev, struct sk_buff *skb);
621621void mt7996_mcu_exit (struct mt7996_dev * dev );
622622int mt7996_mcu_get_all_sta_info (struct mt7996_phy * phy , u16 tag );
623623int mt7996_mcu_wed_rro_reset_sessions (struct mt7996_dev * dev , u16 id );
624+ int mt7996_mcu_set_sniffer_mode (struct mt7996_phy * phy , bool enabled );
624625
625626static inline u8 mt7996_max_interface_num (struct mt7996_dev * dev )
626627{
You can’t perform that action at this time.
0 commit comments