aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/iw/patches/140-freq-11j.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2014-02-05 20:52:34 +0000
committerHauke Mehrtens <hauke@openwrt.org>2014-02-05 20:52:34 +0000
commite5ffd435f1404098a4acc019ead0a4a11029bfb0 (patch)
tree70116af25587b3a2ebd1837cfe7edcff847e3ed6 /package/network/utils/iw/patches/140-freq-11j.patch
parent2b691e3fcfe0fc14c5fd54925cd99eb477fbb8d1 (diff)
downloadupstream-e5ffd435f1404098a4acc019ead0a4a11029bfb0.tar.gz
upstream-e5ffd435f1404098a4acc019ead0a4a11029bfb0.tar.bz2
upstream-e5ffd435f1404098a4acc019ead0a4a11029bfb0.zip
iw: update to iw 3.14
- update iw to 3.14 - remove some patches that are obsolete - 200-reduce_size.patch has new coalesce removed from Makefile matching prev. ver - refresh patches This increases the size of the binary by 6.7%: 87801 4400 320 92521 16969 iw-3.10/iw 93995 4424 324 98743 181b7 iw-3.14/iw Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39486 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/utils/iw/patches/140-freq-11j.patch')
-rw-r--r--package/network/utils/iw/patches/140-freq-11j.patch85
1 files changed, 0 insertions, 85 deletions
diff --git a/package/network/utils/iw/patches/140-freq-11j.patch b/package/network/utils/iw/patches/140-freq-11j.patch
deleted file mode 100644
index eae1f2182d..0000000000
--- a/package/network/utils/iw/patches/140-freq-11j.patch
+++ /dev/null
@@ -1,85 +0,0 @@
---- a/iw.h
-+++ b/iw.h
-@@ -146,7 +146,7 @@ void print_ht_capability(__u16 cap);
-
- const char *iftype_name(enum nl80211_iftype iftype);
- const char *command_name(enum nl80211_commands cmd);
--int ieee80211_channel_to_frequency(int chan);
-+int ieee80211_channel_to_frequency(int chan, enum nl80211_band band);
- int ieee80211_frequency_to_channel(int freq);
-
- void print_ssid_escaped(const uint8_t len, const uint8_t *data);
---- a/phy.c
-+++ b/phy.c
-@@ -66,8 +66,12 @@ static int handle_freqchan(struct nl_msg
- if (*end)
- return 1;
-
-- if (chan)
-- freq = ieee80211_channel_to_frequency(freq);
-+ if (chan) {
-+ enum nl80211_band band;
-+ band = freq <= 14 ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
-+ freq = ieee80211_channel_to_frequency(freq, band);
-+ }
-+
-
- NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq);
- NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, htval);
---- a/util.c
-+++ b/util.c
-@@ -248,31 +248,37 @@ const char *command_name(enum nl80211_co
- return cmdbuf;
- }
-
--int ieee80211_channel_to_frequency(int chan)
-+int ieee80211_channel_to_frequency(int chan, enum nl80211_band band)
- {
-- if (chan < 14)
-- return 2407 + chan * 5;
--
-- if (chan == 14)
-- return 2484;
--
-- /* FIXME: dot11ChannelStartingFactor (802.11-2007 17.3.8.3.2) */
-- return (chan + 1000) * 5;
-+ /* see 802.11-2007 17.3.8.3.2 and Annex J
-+ * there are overlapping channel numbers in 5GHz and 2GHz bands */
-+ if (band == NL80211_BAND_5GHZ) {
-+ if (chan >= 182 && chan <= 196)
-+ return 4000 + chan * 5;
-+ else
-+ return 5000 + chan * 5;
-+ } else { /* NL80211_BAND_2GHZ */
-+ if (chan == 14)
-+ return 2484;
-+ else if (chan < 14)
-+ return 2407 + chan * 5;
-+ else
-+ return 0; /* not supported */
-+ }
- }
-
- int ieee80211_frequency_to_channel(int freq)
- {
-+ /* see 802.11-2007 17.3.8.3.2 and Annex J */
- if (freq == 2484)
- return 14;
--
-- if (freq < 2484)
-+ else if (freq < 2484)
- return (freq - 2407) / 5;
--
-- /* FIXME: dot11ChannelStartingFactor (802.11-2007 17.3.8.3.2) */
-- if (freq < 45000)
-- return freq/5 - 1000;
--
-- if (freq >= 58320 && freq <= 64800)
-+ else if (freq >= 4910 && freq <= 4980)
-+ return (freq - 4000) / 5;
-+ else if (freq < 45000)
-+ return (freq - 5000) / 5;
-+ else if (freq >= 58320 && freq <= 64800)
- return (freq - 56160) / 2160;
-
- return 0;