summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-08-25 10:58:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-28 12:19:51 +0200
commitbfdbd5c8613593b66d2103f0c83a3b1fad47349d (patch)
tree11bf20837b7b7330014e1d614fbd9a91794af778
parentce3653a8d3db096aa163fc80239d8ec1305c81fa (diff)
staging: wfx: scan while AP is supported
The device is able to scan while running an Access Point. Just declare it. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200825085828.399505-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/wfx/main.c1
-rw-r--r--drivers/staging/wfx/scan.c4
2 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c
index 4263f912760b..5a3018e14445 100644
--- a/drivers/staging/wfx/main.c
+++ b/drivers/staging/wfx/main.c
@@ -282,6 +282,7 @@ struct wfx_dev *wfx_init_common(struct device *dev,
NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 |
NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P |
NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U;
+ hw->wiphy->features |= NL80211_FEATURE_AP_SCAN;
hw->wiphy->flags |= WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD;
hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD;
hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c
index e9de19784865..02d4e653d594 100644
--- a/drivers/staging/wfx/scan.c
+++ b/drivers/staging/wfx/scan.c
@@ -113,10 +113,6 @@ int wfx_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
WARN_ON(hw_req->req.n_channels > HIF_API_MAX_NB_CHANNELS);
-
- if (vif->type == NL80211_IFTYPE_AP)
- return -EOPNOTSUPP;
-
wvif->scan_req = hw_req;
schedule_work(&wvif->scan_work);
return 0;