diff mbox

[v2,01/10] qtnfmac: check that MAC exists in regulatory notifier

Message ID 20171219112856.22463-2-sergey.matyukevich.os@quantenna.com (mailing list archive)
State Accepted
Commit 4fd045cdb2396bfe315dbffd97157da711c7fa7f
Delegated to: Kalle Valo
Headers show

Commit Message

Sergey Matyukevich Dec. 19, 2017, 11:28 a.m. UTC
From: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>

It is possible that regulatory notifier is called before MAC data
was allocated. We need to verify that MAC data exists before trying
to send a regulatory change event.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
---
 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Kalle Valo Jan. 9, 2018, 12:12 p.m. UTC | #1
Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> wrote:

> From: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
> 
> It is possible that regulatory notifier is called before MAC data
> was allocated. We need to verify that MAC data exists before trying
> to send a regulatory change event.
> 
> Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>

10 patches applied to wireless-drivers-next.git, thanks.

4fd045cdb239 qtnfmac: check that MAC exists in regulatory notifier
5bf374ab91ad qtnfmac: pass complete channel data between driver and firmware
b05ee456fd21 qtnfmac: add support for radar detection and CAC
e6ef8cd05145 qtnfmac: change default interface mode from AP to STA
e6e594aff26a qtnfmac: check for passed channel being NULL in MGMT_TX command
fbad963a28e4 qtnfmac: fix rssi data passed to wireless core
9cbd599966d8 qtnfmac: fill wiphy's extended capabilities
4d2a7a1cfa68 qtnfmac: modify GET_STA_STATS cmd format for back/forward compatibility
7a4d3a3bc84e qtnfmac: keeping track of "generation" for STA info
f1398fd2dd8c qtnfmac: support MAC address based access control
Sergey Matyukevich Jan. 9, 2018, 1:09 p.m. UTC | #2
Thanks Kalle,

> > It is possible that regulatory notifier is called before MAC data
> > was allocated. We need to verify that MAC data exists before trying
> > to send a regulatory change event.
> >
> > Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
> 
> 10 patches applied to wireless-drivers-next.git, thanks.
> 
> 4fd045cdb239 qtnfmac: check that MAC exists in regulatory notifier
> 5bf374ab91ad qtnfmac: pass complete channel data between driver and firmware
> b05ee456fd21 qtnfmac: add support for radar detection and CAC
> e6ef8cd05145 qtnfmac: change default interface mode from AP to STA
> e6e594aff26a qtnfmac: check for passed channel being NULL in MGMT_TX command
> fbad963a28e4 qtnfmac: fix rssi data passed to wireless core
> 9cbd599966d8 qtnfmac: fill wiphy's extended capabilities
> 4d2a7a1cfa68 qtnfmac: modify GET_STA_STATS cmd format for back/forward compatibility
> 7a4d3a3bc84e qtnfmac: keeping track of "generation" for STA info
> f1398fd2dd8c qtnfmac: support MAC address based access control

Just to understand the timelines... Could you please clarify if these patches
are still going to make it into 4.16 merge window ?

Regards,
Sergey
Kalle Valo Jan. 9, 2018, 3:05 p.m. UTC | #3
Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> writes:

> Thanks Kalle,
>
>> > It is possible that regulatory notifier is called before MAC data
>> > was allocated. We need to verify that MAC data exists before trying
>> > to send a regulatory change event.
>> >
>> > Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
>> 
>> 10 patches applied to wireless-drivers-next.git, thanks.
>> 
>> 4fd045cdb239 qtnfmac: check that MAC exists in regulatory notifier
>> 5bf374ab91ad qtnfmac: pass complete channel data between driver and firmware
>> b05ee456fd21 qtnfmac: add support for radar detection and CAC
>> e6ef8cd05145 qtnfmac: change default interface mode from AP to STA
>> e6e594aff26a qtnfmac: check for passed channel being NULL in MGMT_TX command
>> fbad963a28e4 qtnfmac: fix rssi data passed to wireless core
>> 9cbd599966d8 qtnfmac: fill wiphy's extended capabilities
>> 4d2a7a1cfa68 qtnfmac: modify GET_STA_STATS cmd format for back/forward compatibility
>> 7a4d3a3bc84e qtnfmac: keeping track of "generation" for STA info
>> f1398fd2dd8c qtnfmac: support MAC address based access control
>
> Just to understand the timelines... Could you please clarify if these patches
> are still going to make it into 4.16 merge window ?

They should, but of course I can't promise anything.

My deadline is that when merge window opens the patches need to be in
net-next. You can follow the predictions for the schedule here:

http://phb-crystal-ball.org/
diff mbox

Patch

diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
index 6711e7fb6926..63d274c3f2f7 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
@@ -802,6 +802,9 @@  static void qtnf_cfg80211_reg_notifier(struct wiphy *wiphy_in,
 			continue;
 
 		mac = bus->mac[mac_idx];
+		if (!mac)
+			continue;
+
 		wiphy = priv_to_wiphy(mac);
 
 		for (band = 0; band < NUM_NL80211_BANDS; ++band) {