Skip to content

Commit 6d4292a

Browse files
Kalle Valointel-lab-lkp
authored andcommitted
ath11k: disable monitor mode on QCA6390
QCA6390 does not support monitor mode at the moment so disable it altogether, using a hack as mac80211 does not support disabling it otherwise. Add a boolean to hw_params to know if hardware supports monitor mode. IPQ8074 continues to support monitor mode normally. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Kalle Valo <[email protected]>
1 parent fdb78d6 commit 6d4292a

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

drivers/net/wireless/ath/ath11k/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
6262
.interface_modes = BIT(NL80211_IFTYPE_STATION) |
6363
BIT(NL80211_IFTYPE_AP) |
6464
BIT(NL80211_IFTYPE_MESH_POINT),
65+
.supports_monitor = true,
6566
},
6667
{
6768
.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -96,6 +97,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
9697
.interface_modes = BIT(NL80211_IFTYPE_STATION) |
9798
BIT(NL80211_IFTYPE_AP) |
9899
BIT(NL80211_IFTYPE_MESH_POINT),
100+
.supports_monitor = true,
99101
},
100102
{
101103
.name = "qca6390 hw2.0",
@@ -129,6 +131,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
129131

130132
.interface_modes = BIT(NL80211_IFTYPE_STATION) |
131133
BIT(NL80211_IFTYPE_AP),
134+
.supports_monitor = false,
132135
},
133136
};
134137

drivers/net/wireless/ath/ath11k/hw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ struct ath11k_hw_params {
158158
u8 spectral_fft_sz;
159159

160160
u16 interface_modes;
161+
bool supports_monitor;
161162
};
162163

163164
struct ath11k_hw_ops {

drivers/net/wireless/ath/ath11k/mac.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6248,6 +6248,14 @@ static int __ath11k_mac_register(struct ath11k *ar)
62486248
goto err_free_if_combs;
62496249
}
62506250

6251+
if (!ab->hw_params.supports_monitor)
6252+
/* There's a race between calling ieee80211_register_hw()
6253+
* and here where the monitor mode is enabled for a little
6254+
* while. But that time is so short and in practise it make
6255+
* a difference in real life.
6256+
*/
6257+
ar->hw->wiphy->interface_modes &= ~BIT(NL80211_IFTYPE_MONITOR);
6258+
62516259
/* Apply the regd received during initialization */
62526260
ret = ath11k_regd_update(ar, true);
62536261
if (ret) {

0 commit comments

Comments
 (0)