Fix kernel warning when using iwconfig for configuring ad-hoc mode, e.g. "iwconfig wlan0 essid test channel 1"
[ 1003.460000] WARNING: at /home/taka/openwrt-12.09/openwrt-rsp/build_dir/linux-ar71xx_generi c/compat-wireless-2013-06-27/net/wireless/chan.c:373 cfg80211_chandef_usable+0x50/0x21c [cfg8 0211]() It is caused by an uninitialized variable center_freq1. The same was recently merged in wireless-testing commit f478f33a93f9353dcd1fe55445343d76b1c3f84a. Signed-off-by: Bruno Randolf <b...@einfach.org> --- package/mac80211/Makefile | 2 +- .../patches/920-mac80211-iwconfig-ibss-freq.patch | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 package/mac80211/patches/920-mac80211-iwconfig-ibss-freq.patch diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile index e4fa925..9583e37 100644 --- a/package/mac80211/Makefile +++ b/package/mac80211/Makefile @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 PKG_VERSION:=2013-06-27 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources PKG_BACKPORT_VERSION:=.1 PKG_MD5SUM:=73bd220c64c5c6fdc22b3bb7f180644f diff --git a/package/mac80211/patches/920-mac80211-iwconfig-ibss-freq.patch b/package/mac80211/patches/920-mac80211-iwconfig-ibss-freq.patch new file mode 100644 index 0000000..6296142 --- /dev/null +++ b/package/mac80211/patches/920-mac80211-iwconfig-ibss-freq.patch @@ -0,0 +1,18 @@ +--- a/net/wireless/ibss.c ++++ b/net/wireless/ibss.c +@@ -263,6 +263,7 @@ int cfg80211_ibss_wext_join(struct cfg80 + if (chan->flags & IEEE80211_CHAN_DISABLED) + continue; + wdev->wext.ibss.chandef.chan = chan; ++ wdev->wext.ibss.chandef.center_freq1 = chan->center_freq; + break; + } + +@@ -347,6 +348,7 @@ int cfg80211_ibss_wext_siwfreq(struct ne + if (chan) { + wdev->wext.ibss.chandef.chan = chan; + wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT; ++ wdev->wext.ibss.chandef.center_freq1 = freq; + wdev->wext.ibss.channel_fixed = true; + } else { + /* cfg80211_ibss_wext_join will pick one if needed */ -- 1.8.1.2 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel