diff options
author | Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> | 2019-03-20 10:03:48 +0000 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-04-04 12:57:24 +0300 |
commit | d123172175db84a65bf66245bfa15aaabaa361a9 (patch) | |
tree | e357e1e60ccdc00688fa4a0f8eb16e451446bd39 /drivers/net/wireless/quantenna/qtnfmac/commands.c | |
parent | 8db32fa400916333c20184793d1400bd74e1f740 (diff) | |
download | blackbird-op-linux-d123172175db84a65bf66245bfa15aaabaa361a9.tar.gz blackbird-op-linux-d123172175db84a65bf66245bfa15aaabaa361a9.zip |
qtnfmac: make regulatory notifier work on per-phy basis
Wireless core calls regulatory notifier for each wiphy and it only
guarantees that bands info is updated for this particular wiphy prior
to calling a notifier. Hence updating all wiphy which belong to driver
in a single notifier callback is redundant and incorrect.
Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/quantenna/qtnfmac/commands.c')
-rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/commands.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 85a2a58f4c16..9aabba7429ed 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -2404,13 +2404,14 @@ out: return ret; } -int qtnf_cmd_reg_notify(struct qtnf_bus *bus, struct regulatory_request *req) +int qtnf_cmd_reg_notify(struct qtnf_wmac *mac, struct regulatory_request *req) { + struct qtnf_bus *bus = mac->bus; struct sk_buff *cmd_skb; int ret; struct qlink_cmd_reg_notify *cmd; - cmd_skb = qtnf_cmd_alloc_new_cmdskb(QLINK_MACID_RSVD, QLINK_VIFID_RSVD, + cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, QLINK_VIFID_RSVD, QLINK_CMD_REG_NOTIFY, sizeof(*cmd)); if (!cmd_skb) @@ -2449,10 +2450,6 @@ int qtnf_cmd_reg_notify(struct qtnf_bus *bus, struct regulatory_request *req) qtnf_bus_lock(bus); ret = qtnf_cmd_send(bus, cmd_skb); - if (ret) - goto out; - -out: qtnf_bus_unlock(bus); return ret; |