From: Johannes Berg Date: Fri, 8 May 2009 07:42:33 +0000 (+0200) Subject: cfg80211: fix wext iw_freq parsing X-Git-Tag: v2.6.31-rc1~330^2~387^2~36 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b258582fef3a9b15b2372d99164859361faa8db;p=pandora-kernel.git cfg80211: fix wext iw_freq parsing The function to parse a struct iw_freq has a stupid bug, it returns NULL when the channel cannot be found at all, but NULL is supposed to mean "auto". Fix this by checking the return value of ieee80211_get_channel() and returning ERR_PTR(-EINVAL) if it returned NULL (channel not found). This fixes an issue where you could say (in IBSS mode) iwconfig wlan0 channel 21 and it would use channel 1 instead because that's the first available channel with IBSS allowed (which is what the "auto" setting uses). Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- Reading git-diff-tree failed