linux/net
Liang Li 4f5a5866aa cfg80211: fix interface combinations check for ADHOC(IBSS)
partial of commit 8e8b41f9d8 upstream.

As part of commit 463454b5db ("cfg80211: fix interface
combinations check"), this extra check was introduced:

       if ((all_iftypes & used_iftypes) != used_iftypes)
               goto cont;

However, most wireless NIC drivers did not advertise ADHOC in
wiphy.iface_combinations[i].limits[] and hence we'll get -EBUSY
when we bring up a ADHOC wlan with commands similar to:

 # iwconfig wlan0 mode ad-hoc && ifconfig wlan0 up

In commit 8e8b41f9d8 ("cfg80211: enforce lack of interface
combinations"), the change below fixes the issue:

       if (total == 1)
               return 0;

But it also introduces other dependencies for stable. For example,
a full cherry pick of 8e8b41f9d8 would introduce additional
regressions unless we also start cherry picking driver specific
fixes like the following:

  9b4760e  ath5k: add possible wiphy interface combinations
  1ae2fc2  mac80211_hwsim: advertise interface combinations
  20c8e8d  ath9k: add possible wiphy interface combinations

And the purpose of the 'if (total == 1)' is to cover the specific
use case (IBSS, adhoc) that was mentioned above. So we just pick
the specific part out from 8e8b41f9d8 here.

Doing so gives stable kernels a way to fix the change introduced
by 463454b5db, without having to make cherry picks specific to
various NIC drivers.

Signed-off-by: Liang Li <liang.li@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-15 12:04:30 -07:00
..
9p net/9p: Fix kernel crash with msize 512K 2011-10-03 11:40:22 -07:00
802
8021q Revert "net: maintain namespace isolation between vlan and real device" 2012-06-10 00:33:03 +09:00
appletalk
atm net: fix NULL dereferences in check_peer_redir() 2012-02-13 11:06:13 -08:00
ax25 net ax25: Reorder ax25_exit to remove races. 2012-04-27 09:51:21 -07:00
batman-adv
bluetooth Bluetooth: hci_core: fix NULL-pointer dereference at unregister 2012-04-22 16:21:42 -07:00
bridge bridge: Assign rtnl_link_ops to bridge devices created via ioctl (v2) 2012-07-16 08:47:37 -07:00
caif caif: Fix access to freed pernet memory 2012-08-09 08:27:51 -07:00
can can bcm: fix incomplete tx_setup fix 2011-11-11 09:36:45 -08:00
ceph ceph: fix file mode calculation 2011-07-19 11:25:04 -07:00
core net: feed /dev/random with the MAC address when registering a device 2012-08-15 12:04:13 -07:00
dcb
dccp net: Compute protocol sequence numbers and fragment IDs using MD5. 2011-08-15 18:31:35 -07:00
decnet net: fix NULL dereferences in check_peer_redir() 2012-02-13 11:06:13 -08:00
dns_resolver
dsa
econet
ethernet net: add IFF_SKB_TX_SHARED flag to priv_flags 2011-08-15 18:31:38 -07:00
ieee802154 ieee802154: Don't leak memory in ieee802154_nl_fill_phy 2011-06-13 18:03:22 -04:00
ipv4 tcp: perform DMA to userspace only if there is a task waiting for it 2012-08-09 08:27:52 -07:00
ipv6 ipv6: Move ipv6 proc file registration to end of init order 2012-07-16 08:47:37 -07:00
ipx
irda irda: iriap: Use seperate lockdep class for irias_objects->hb_spinlock 2011-06-06 17:00:35 -07:00
iucv [S390] irq: merge irq.c and s390_ext.c 2011-05-26 09:48:24 +02:00
key
l2tp net: l2tp_eth: fix kernel panic on rmmod l2tp_eth 2012-07-16 08:47:36 -07:00
lapb
llc llc: llc_cmsg_rcv was getting called after sk_eat_skb. 2012-01-06 14:14:06 -08:00
mac80211 mac80211: cancel mesh path timer 2012-08-15 12:04:11 -07:00
netfilter ipvs: fix matching of fwmark templates during scheduling 2012-02-29 16:34:31 -08:00
netlabel
netlink netlink: fix races after skb queueing 2012-04-27 09:51:19 -07:00
netrom
packet make PACKET_STATISTICS getsockopt report consistently between ring and non-ring 2011-11-11 09:36:29 -08:00
phonet phonet: Check input from user before allocating 2012-04-27 09:51:19 -07:00
rds Remove printk from rds_sendmsg 2012-04-02 09:27:21 -07:00
rfkill
rose rose_dev: fix memcpy-bug in rose_set_mac_address 2012-04-13 08:14:05 -07:00
rxrpc
sched sch_sfb: Fix missing NULL check 2012-08-09 08:27:51 -07:00
sctp sctp: Fix list corruption resulting from freeing an association on a list 2012-08-09 08:27:51 -07:00
sunrpc SUNRPC: return negative value in case rpcbind client creation error 2012-08-15 12:04:09 -07:00
tipc
unix
wanrouter wanmain: comparing array with NULL 2012-08-09 08:27:52 -07:00
wimax
wireless cfg80211: fix interface combinations check for ADHOC(IBSS) 2012-08-15 12:04:30 -07:00
x25 x25: Prevent skb overreads when checking call user data 2011-10-25 07:10:17 +02:00
xfrm ipv6: fix incorrect ipsec fragment 2012-06-10 00:33:02 +09:00
compat.c
Kconfig
Makefile
nonet.c
socket.c tcp: allow splice() to build full TSO packets 2012-04-27 09:51:18 -07:00
sysctl_net.c
TUNABLE