Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156355
b: refs/heads/master
c: 3718424
h: refs/heads/master
i:
  156353: ea1a1c4
  156351: 9d7f6da
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Aug 3, 2009
1 parent b9fecca commit a0faa6d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd3468bad96c00b5a512f551674f36776129520e
refs/heads/master: 371842448c05b42d11a4be1c8e4e81d62ecc7534
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,9 @@ int iwl_setup_mac(struct iwl_priv *priv)

hw->wiphy->custom_regulatory = true;

/* Firmware does not support this */
hw->wiphy->disable_beacon_hints = true;

hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX;
/* we create the 802.11 header and a zero-length SSID element */
hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -3968,6 +3968,9 @@ static int iwl3945_setup_mac(struct iwl_priv *priv)

hw->wiphy->custom_regulatory = true;

/* Firmware does not support this */
hw->wiphy->disable_beacon_hints = true;

hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX_3945;
/* we create the 802.11 header and a zero-length SSID element */
hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2;
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,10 @@ struct cfg80211_ops {
* channels at a later time. This can be used for devices which do not
* have calibration information gauranteed for frequencies or settings
* outside of its regulatory domain.
* @disable_beacon_hints: enable this if your driver needs to ensure that
* passive scan flags and beaconing flags may not be lifted by cfg80211
* due to regulatory beacon hints. For more information on beacon
* hints read the documenation for regulatory_hint_found_beacon()
* @reg_notifier: the driver's regulatory notification callback
* @regd: the driver's regulatory domain, if one was requested via
* the regulatory_hint() API. This can be used by the driver
Expand All @@ -1004,6 +1008,7 @@ struct wiphy {

bool custom_regulatory;
bool strict_regulatory;
bool disable_beacon_hints;

enum cfg80211_signal_type signal_type;

Expand Down
9 changes: 5 additions & 4 deletions trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1089,17 +1089,18 @@ static void handle_reg_beacon(struct wiphy *wiphy,

chan->beacon_found = true;

if (wiphy->disable_beacon_hints)
return;

chan_before.center_freq = chan->center_freq;
chan_before.flags = chan->flags;

if ((chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) &&
!(chan->orig_flags & IEEE80211_CHAN_PASSIVE_SCAN)) {
if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) {
chan->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
channel_changed = true;
}

if ((chan->flags & IEEE80211_CHAN_NO_IBSS) &&
!(chan->orig_flags & IEEE80211_CHAN_NO_IBSS)) {
if (chan->flags & IEEE80211_CHAN_NO_IBSS) {
chan->flags &= ~IEEE80211_CHAN_NO_IBSS;
channel_changed = true;
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/wireless/reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ int set_regdom(const struct ieee80211_regdomain *rd);
* 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.
* 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,
Expand Down

0 comments on commit a0faa6d

Please sign in to comment.