diff options
author | Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> | 2019-03-20 10:03:58 +0000 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-04-04 12:57:29 +0300 |
commit | 438fb43bcab15aeafd3318dd305cea9769dd24d0 (patch) | |
tree | baa25a879673f9ef49968b523f6e34b59b62ecf3 /drivers/net/wireless/quantenna | |
parent | c698bce01562363682bbeb8f0fda8679736a42a6 (diff) | |
download | linux-stable-438fb43bcab15aeafd3318dd305cea9769dd24d0.tar.gz linux-stable-438fb43bcab15aeafd3318dd305cea9769dd24d0.tar.bz2 linux-stable-438fb43bcab15aeafd3318dd305cea9769dd24d0.zip |
qtnfmac: pass DFS region to firmware on region update
Pass DFS region as requested by regulatory core directly to firmware
so it can initialize radar detection block accordingly.
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')
-rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/commands.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/qlink.h | 6 |
2 files changed, 19 insertions, 2 deletions
diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 1a248d9f2e4c..cc7f74333f48 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -2376,6 +2376,21 @@ int qtnf_cmd_reg_notify(struct qtnf_wmac *mac, struct regulatory_request *req) break; } + switch (req->dfs_region) { + case NL80211_DFS_FCC: + cmd->dfs_region = QLINK_DFS_FCC; + break; + case NL80211_DFS_ETSI: + cmd->dfs_region = QLINK_DFS_ETSI; + break; + case NL80211_DFS_JP: + cmd->dfs_region = QLINK_DFS_JP; + break; + default: + cmd->dfs_region = QLINK_DFS_UNSET; + break; + } + cmd->num_channels = 0; for (band = 0; band < NUM_NL80211_BANDS; band++) { diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index 6951f6370985..f6d30069ef3a 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -582,6 +582,7 @@ enum qlink_user_reg_hint_type { * of &enum qlink_user_reg_hint_type. * @num_channels: number of &struct qlink_tlv_channel in a variable portion of a * payload. + * @dfs_region: one of &enum qlink_dfs_regions. * @info: variable portion of regulatory notifier callback. */ struct qlink_cmd_reg_notify { @@ -590,7 +591,8 @@ struct qlink_cmd_reg_notify { u8 initiator; u8 user_reg_hint_type; u8 num_channels; - u8 rsvd[3]; + u8 dfs_region; + u8 rsvd[2]; u8 info[0]; } __packed; @@ -800,7 +802,7 @@ enum qlink_dfs_regions { * @alpha2: country code ID firmware is configured to. * @n_reg_rules: number of regulatory rules TLVs in variable portion of the * message. - * @dfs_region: regulatory DFS region, one of @enum qlink_dfs_region. + * @dfs_region: regulatory DFS region, one of &enum qlink_dfs_regions. * @var_info: variable-length WMAC info data. */ struct qlink_resp_get_mac_info { |