mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
371842448c
A regression was added through patch a4ed90d6
:
"cfg80211: respect API on orig_flags on channel for beacon hint"
We did indeed respect _orig flags but the intention was not clearly
stated in the commit log. This patch fixes firmware issues picked
up by iwlwifi when we lift passive scan of beaconing restrictions
on channels its EEPROM has been configured to always enable.
By doing so though we also disallowed beacon hints on devices
registering their wiphy with custom world regulatory domains
enabled, this happens to be currently ath5k, ath9k and ar9170.
The passive scan and beacon restrictions on those devices would
never be lifted even if we did find a beacon and the hardware did
support such enhancements when world roaming.
Since Johannes indicates iwlwifi firmware cannot be changed to
allow beacon hinting we set up a flag now to specifically allow
drivers to disable beacon hints for devices which cannot use them.
We enable the flag on iwlwifi to disable beacon hints and by default
enable it for all other drivers. It should be noted beacon hints lift
passive scan flags and beacon restrictions when we receive a beacon from
an AP on any 5 GHz non-DFS channels, and channels 12-14 on the 2.4 GHz
band. We don't bother with channels 1-11 as those channels are allowed
world wide.
This should fix world roaming for ath5k, ath9k and ar9170, thereby
improving scan time when we receive the first beacon from any AP,
and also enabling beaconing operation (AP/IBSS/Mesh) on cards which
would otherwise not be allowed to do so. Drivers not using custom
regulatory stuff (wiphy_apply_custom_regulatory()) were not affected
by this as the orig_flags for the channels would have been cleared
upon wiphy registration.
I tested this with a world roaming ath5k card.
Cc: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
41 lines
1.4 KiB
C
41 lines
1.4 KiB
C
#ifndef __NET_WIRELESS_REG_H
|
|
#define __NET_WIRELESS_REG_H
|
|
|
|
extern const struct ieee80211_regdomain *cfg80211_regdomain;
|
|
|
|
bool is_world_regdom(const char *alpha2);
|
|
bool reg_is_valid_request(const char *alpha2);
|
|
|
|
int regulatory_hint_user(const char *alpha2);
|
|
|
|
void reg_device_remove(struct wiphy *wiphy);
|
|
|
|
int regulatory_init(void);
|
|
void regulatory_exit(void);
|
|
|
|
int set_regdom(const struct ieee80211_regdomain *rd);
|
|
|
|
/**
|
|
* regulatory_hint_found_beacon - hints a beacon was found on a channel
|
|
* @wiphy: the wireless device where the beacon was found on
|
|
* @beacon_chan: the channel on which the beacon was found on
|
|
* @gfp: context flags
|
|
*
|
|
* This informs the wireless core that a beacon from an AP was found on
|
|
* the channel provided. This allows the wireless core to make educated
|
|
* guesses on regulatory to help with world roaming. This is only used for
|
|
* world roaming -- when we do not know our current location. This is
|
|
* only useful on channels 12, 13 and 14 on the 2 GHz band as channels
|
|
* 1-11 are already enabled by the world regulatory domain; and on
|
|
* non-radar 5 GHz channels.
|
|
*
|
|
* Drivers do not need to call this, cfg80211 will do it for after a scan
|
|
* on a newly found BSS. If you cannot make use of this feature you can
|
|
* set the wiphy->disable_beacon_hints to true.
|
|
*/
|
|
int regulatory_hint_found_beacon(struct wiphy *wiphy,
|
|
struct ieee80211_channel *beacon_chan,
|
|
gfp_t gfp);
|
|
|
|
#endif /* __NET_WIRELESS_REG_H */
|