summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/quantenna
diff options
context:
space:
mode:
authorIgor Mitsyanko <igor.mitsyanko.os@quantenna.com>2019-03-20 13:04:00 +0300
committerKalle Valo <kvalo@codeaurora.org>2019-04-04 12:57:30 +0300
commit93eeab26791df9ddd9a2c38f68d8fb78973ef06a (patch)
treeeeb0eb84bb24010d9b5198426782e898d0abe651 /drivers/net/wireless/quantenna
parent438fb43bcab15aeafd3318dd305cea9769dd24d0 (diff)
downloadlinux-93eeab26791df9ddd9a2c38f68d8fb78973ef06a.tar.xz
qtnfmac: update bands information on CHANGE_INTF command
In some regions, different regulatory limits (like max Tx power) may be defined for different operating modes. As an example: in ETSI regions DFS master devices may use higher transmit powers compared to DFS slave devices. Update bands information in CHANGE_INTF command if mode of operation changes. 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.c21
1 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 cc7f74333f48..2e658e394dc6 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/commands.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c
@@ -786,8 +786,25 @@ int qtnf_cmd_send_change_intf_type(struct qtnf_vif *vif,
int use4addr,
u8 *mac_addr)
{
- return qtnf_cmd_send_add_change_intf(vif, iftype, use4addr, mac_addr,
- QLINK_CMD_CHANGE_INTF);
+ int ret;
+
+ ret = qtnf_cmd_send_add_change_intf(vif, iftype, use4addr, mac_addr,
+ QLINK_CMD_CHANGE_INTF);
+
+ /* Regulatory settings may be different for different interface types */
+ if (ret == 0 && vif->wdev.iftype != iftype) {
+ enum nl80211_band band;
+ struct wiphy *wiphy = priv_to_wiphy(vif->mac);
+
+ for (band = 0; band < NUM_NL80211_BANDS; ++band) {
+ if (!wiphy->bands[band])
+ continue;
+
+ qtnf_cmd_band_info_get(vif->mac, wiphy->bands[band]);
+ }
+ }
+
+ return ret;
}
int qtnf_cmd_send_del_intf(struct qtnf_vif *vif)