Skip to content

Commit

Permalink
[PATCH] zd1211rw: Allow channels 1-11 for unrecognised regulatory dom…
Browse files Browse the repository at this point in the history
…ains

Zen Kato's device has a regulatory domain value of 0x49, which is not an
IEEE 802.11 code and is not even identified in the vendor driver.

Recent versions of the vendor driver don't even look at the regdomain
value any more, and just allow channels 1-11 everywhere. This patch
brings us more in line with that behaviour, by allowing channels 1-11
for regdomains which we don't know about.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Daniel Drake authored and John W. Linville committed Jul 10, 2007
1 parent fb038c2 commit 86d95c2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/net/wireless/zd1211rw/zd_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,14 @@ int zd_mac_init_hw(struct zd_mac *mac, u8 device_type)
if (r)
goto disable_int;
if (!zd_regdomain_supported(default_regdomain)) {
dev_dbg_f(zd_mac_dev(mac),
"Regulatory Domain %#04x is not supported.\n",
default_regdomain);
r = -EINVAL;
goto disable_int;
/* The vendor driver overrides the regulatory domain and
* allowed channel registers and unconditionally restricts
* available channels to 1-11 everywhere. Match their
* questionable behaviour only for regdomains which we don't
* recognise. */
dev_warn(zd_mac_dev(mac), "Unrecognised regulatory domain: "
"%#04x. Defaulting to FCC.\n", default_regdomain);
default_regdomain = ZD_REGDOMAIN_FCC;
}
spin_lock_irq(&mac->lock);
mac->regdomain = mac->default_regdomain = default_regdomain;
Expand Down

0 comments on commit 86d95c2

Please sign in to comment.