aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2012-11-15 09:34:56 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2012-11-16 03:39:01 -0500
commitff7e68670c49b6404acc4fce6ca90d6c89ef0efe (patch)
tree6070bfae352a5c3411432410dacf4eeaa6dbf1b9
parenta2e1be33a2a762a30e2960c11634a672cdf131cb (diff)
ath6kl: support NL80211_USER_REG_HINT_CELL_BASE events
As ath6kl firmware can't do intersections the driver should only listen to regdom changes from cellular base stations, all other requests need to be refused. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index bf5e7d51939..41dea0d5fe0 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3500,11 +3500,18 @@ static int ath6kl_cfg80211_reg_notify(struct wiphy *wiphy,
3500 int ret, i; 3500 int ret, i;
3501 3501
3502 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, 3502 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
3503 "cfg reg_notify %c%c%s%s initiator %d\n", 3503 "cfg reg_notify %c%c%s%s initiator %d hint_type %d\n",
3504 request->alpha2[0], request->alpha2[1], 3504 request->alpha2[0], request->alpha2[1],
3505 request->intersect ? " intersect" : "", 3505 request->intersect ? " intersect" : "",
3506 request->processed ? " processed" : "", 3506 request->processed ? " processed" : "",
3507 request->initiator); 3507 request->initiator, request->user_reg_hint_type);
3508
3509 /*
3510 * As firmware is not able intersect regdoms, we can only listen to
3511 * cellular hints.
3512 */
3513 if (request->user_reg_hint_type != NL80211_USER_REG_HINT_CELL_BASE)
3514 return -EOPNOTSUPP;
3508 3515
3509 ret = ath6kl_wmi_set_regdomain_cmd(ar->wmi, request->alpha2); 3516 ret = ath6kl_wmi_set_regdomain_cmd(ar->wmi, request->alpha2);
3510 if (ret) { 3517 if (ret) {
@@ -3668,8 +3675,10 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
3668 } 3675 }
3669 3676
3670 if (config_enabled(CONFIG_ATH6KL_REGDOMAIN) && 3677 if (config_enabled(CONFIG_ATH6KL_REGDOMAIN) &&
3671 test_bit(ATH6KL_FW_CAPABILITY_REGDOMAIN, ar->fw_capabilities)) 3678 test_bit(ATH6KL_FW_CAPABILITY_REGDOMAIN, ar->fw_capabilities)) {
3672 wiphy->reg_notifier = ath6kl_cfg80211_reg_notify; 3679 wiphy->reg_notifier = ath6kl_cfg80211_reg_notify;
3680 ar->wiphy->features |= NL80211_FEATURE_CELL_BASE_REG_HINTS;
3681 }
3673 3682
3674 /* max num of ssids that can be probed during scanning */ 3683 /* max num of ssids that can be probed during scanning */
3675 wiphy->max_scan_ssids = MAX_PROBED_SSIDS; 3684 wiphy->max_scan_ssids = MAX_PROBED_SSIDS;