Skip to content

Commit

Permalink
iwinfo: nl80211: force scans by default
Browse files Browse the repository at this point in the history
We can scan on ap interfaces because OpenWrt added "210-ap_scan.patch"
to mac80211 [0]. However, instead of maintaining a downstream patch use
the upstream "force scan" variant by default.

The equivalent iw call is:
      iw dev wlan0 scan ap-force

[0] - https://github.com/openwrt/openwrt/blob/master/package/kernel/mac80211/patches/subsys/210-ap_scan.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
  • Loading branch information
PolynomialDivision committed Jan 10, 2023
1 parent fac0787 commit b9b8128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iwinfo_nl80211.c
Expand Up @@ -2657,7 +2657,7 @@ static int nl80211_get_scanlist_nl(const char *ifname, char *buf, int *len)
{
struct nl80211_scanlist sl = { .e = (struct iwinfo_scanlist_entry *)buf };

if (nl80211_request(ifname, NL80211_CMD_TRIGGER_SCAN, 0, NULL, NULL))
if (nl80211_request(ifname, NL80211_CMD_TRIGGER_SCAN, NL80211_SCAN_FLAG_AP, NULL, NULL))
goto out;

if (nl80211_wait("nl80211", "scan",
Expand Down

0 comments on commit b9b8128

Please sign in to comment.