aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2012-01-30mac80211: add support for mcs masksSimon Wunderlich6-9/+167
* Handle MCS masks set by the user. * Match rates provided by the rate control algorithm to the mask set, also in HT mode, and switch back to legacy mode if necessary. * add debugfs files to observate the rate selection Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Mathias Kretschmer <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-30nl80211: add support for mcs masksSimon Wunderlich1-1/+60
Allow to set mcs masks through nl80211. We also allow to set MCS rates but no legacy rates (and vice versa). Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Mathias Kretschmer <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-30mac80211: Fix incorrect num_sta_ps decrement in ap_sta_ps_endHelmut Schaa2-7/+5
If the driver blocked this specific STA with the help of ieee80211_sta_block_awake we won't clear WLAN_STA_PS_STA later but still decrement num_sta_ps. Hence, the next data frame from this STA will trigger ap_sta_ps_end again and also decrement num_sta_ps again leading to an incorrect num_sta_ps counter. This can result in problems with powersaving clients not waking up from PS because the TIM calculation might be skipped due to the incorrect num_sta_ps counter. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-30mac80211: Fix incorrect num_sta_ps decrement in __sta_info_destroyHelmut Schaa1-3/+1
When WLAN_STA_PS_DRIVER is set by ieee80211_sta_block_awake the num_sta_ps counter is not incremented. Hence, we shouldn't decrement it in __sta_info_destroy if only WLAN_STA_PS_DRIVER is set. This could result in an incorrect num_sta_ps counter leading to strange side effects with associated powersaving clients. Fix this by only decrementing num_sta_ps when WLAN_STA_PS_STA was set before. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-30mac80211: station state transition error handlingJohannes Berg8-39/+59
In the future, when we start notifying drivers, state transitions could potentially fail. To make it easier to distinguish between programming bugs and driver failures: * rename sta_info_move_state() to sta_info_pre_move_state() which can only be called before the station is inserted (and check this with a new station flag). * rename sta_info_move_state_checked() to just plain sta_info_move_state(), as it will be the regular function that can fail for more than just one reason (bad transition or an error from the driver) This makes the programming model easier -- one of the functions can only be called before insertion and can't fail, the other can fail. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-30Revert "mac80211: Do not scan for IBSS merge with a fixed BSSID."John W. Linville1-3/+2
This reverts commit f1e3be1561c43b6bbe2426e34849fb1486dc313b. Johannes Berg <[email protected]> thinks that this patch is incorrect. I'll defer to his judgment. Signed-off-by: John W. Linville <[email protected]>
2012-01-30af_unix: fix EPOLLET regression for stream socketsEric Dumazet1-15/+4
Commit 0884d7aa24 (AF_UNIX: Fix poll blocking problem when reading from a stream socket) added a regression for epoll() in Edge Triggered mode (EPOLLET) Appropriate fix is to use skb_peek()/skb_unlink() instead of skb_dequeue(), and only call skb_unlink() when skb is fully consumed. This remove the need to requeue a partial skb into sk_receive_queue head and the extra sk->sk_data_ready() calls that added the regression. This is safe because once skb is given to sk_receive_queue, it is not modified by a writer, and readers are serialized by u->readlock mutex. This also reduce number of spinlock acquisition for small reads or MSG_PEEK users so should improve overall performance. Reported-by: Nick Mathewson <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Cc: Alexey Moiseytsev <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-30tcp: fix tcp_trim_head() to adjust segment count with skb MSSNeal Cardwell1-4/+2
This commit fixes tcp_trim_head() to recalculate the number of segments in the skb with the skb's existing MSS, so trimming the head causes the skb segment count to be monotonically non-increasing - it should stay the same or go down, but not increase. Previously tcp_trim_head() used the current MSS of the connection. But if there was a decrease in MSS between original transmission and ACK (e.g. due to PMTUD), this could cause tcp_trim_head() to counter-intuitively increase the segment count when trimming bytes off the head of an skb. This violated assumptions in tcp_tso_acked() that tcp_trim_head() only decreases the packet count, so that packets_acked in tcp_tso_acked() could underflow, leading tcp_clean_rtx_queue() to pass u32 pkts_acked values as large as 0xffffffff to ca_ops->pkts_acked(). As an aside, if tcp_trim_head() had really wanted the skb to reflect the current MSS, it should have called tcp_set_skb_tso_segs() unconditionally, since a decrease in MSS would mean that a single-packet skb should now be sliced into multiple segments. Signed-off-by: Neal Cardwell <[email protected]> Acked-by: Nandita Dukkipati <[email protected]> Acked-by: Ilpo Järvinen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-30net/tcp: Fix tcp memory limits initialization when !CONFIG_SYSCTLGlauber Costa2-3/+14
sysctl_tcp_mem() initialization was moved to sysctl_tcp_ipv4.c in commit 3dc43e3e4d0b52197d3205214fe8f162f9e0c334, since it became a per-ns value. That code, however, will never run when CONFIG_SYSCTL is disabled, leading to bogus values on those fields - causing hung TCP sockets. This patch fixes it by keeping an initialization code in tcp_init(). It will be overwritten by the first net namespace init if CONFIG_SYSCTL is compiled in, and do the right thing if it is compiled out. It is also named properly as tcp_init_mem(), to properly signal its non-sysctl side effect on TCP limits. Reported-by: Ingo Molnar <[email protected]> Signed-off-by: Glauber Costa <[email protected]> Cc: David S. Miller <[email protected]> Link: http://lkml.kernel.org/r/[email protected] [ renamed the function, tidied up the changelog a bit ] Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-27net caif: Register properly as a pernet subsystem.Eric W. Biederman2-21/+2
caif is a subsystem and as such it needs to register with register_pernet_subsys instead of register_pernet_device. Among other problems using register_pernet_device was resulting in net_generic being called before the caif_net structure was allocated. Which has been causing net_generic to fail with either BUG_ON's or by return NULL pointers. A more ugly problem that could be caused is packets in flight why the subsystem is shutting down. To remove confusion also remove the cruft cause by inappropriately trying to fix this bug. With the aid of the previous patch I have tested this patch and confirmed that using register_pernet_subsys makes the failure go away as it should. Signed-off-by: Eric W. Biederman <[email protected]> Acked-by: Sjur Brændeland <[email protected]> Tested-by: Sasha Levin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-27Merge branch 'master' of ↵David S. Miller2-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2012-01-27mac80211: Do not scan for IBSS merge with a fixed BSSID.Nicolas Cavallari1-2/+3
Currently, when we are on an IBSS network with no active station, we would scan for other BSSID, even if fixed_bssid is on, due to a bug in ibss.c, where fixed_channel would be checked instead of fixed_bssid. This would trigger useless scans where scan results would not be used anyway. This patch also reverts commit 39d02a7d90602d4557ee05db2a157a4e0, which assumed that the ifibss->fixed_channel check was legitimate to disable single-channel scans. IBSS single-channel scan should now be fixed. Signed-off-by: Nicolas Cavallari <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-27mac80211: send null packet on active (psm) reconfigurationEliad Peller1-0/+15
The sta might be in psm against the ap (e.g. because this was the before a hw restart), so we explicitly send a null packet in order to make sure it'll sync against the ap (and get out of psm). Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-27nfc: NULL vs zero in nci_activate_target()Dan Carpenter1-1/+1
This is a pointer so it should be NULL instead of zero. Sparse complains about this stuff: net/nfc/nci/core.c:447:37: warning: Using plain integer as NULL pointer Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-27{nl,cfg,mac}80211: Add support of setting non-forwarding entity in MeshChun-Yeow Yeoh5-1/+10
A mesh node that joins the mesh network is by default a forwarding entity. This patch allows the mesh node to set as non-forwarding entity. Whenever dot11MeshForwarding is set to 0, the mesh node can prevent itself from forwarding the traffic which is not destined to him. Signed-off-by: Chun-Yeow Yeoh <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-27cfg80211: fix a few -Wshadow warningsJohannes Berg1-5/+3
It seems that -Wshadow is no longer default in sparse runs, but let's fix the warnings anyway. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-27mac80211: fix a few -Wshadow warningsJohannes Berg2-6/+3
It seems that -Wshadow is no longer default in sparse runs, but let's fix the warnings anyway. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-27mac80211: make CQM RSSI support per virtual interfaceJohannes Berg3-12/+4
Similar to the previous beacon filtering patch, make CQM RSSI support depend on the flags that the driver set for virtual interfaces. Signed-off-by: Johannes Berg <[email protected]> Acked-by: Luciano Coelho <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-27mac80211: make beacon filtering per virtual interfaceJohannes Berg2-3/+1
Due to firmware limitations, we may not be able to support beacon filtering on all virtual interfaces. To allow this in mac80211, introduce per-interface driver capability flags that the driver sets when an interface is added. Signed-off-by: Johannes Berg <[email protected]> Acked-by: Luciano Coelho <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-26net: RTNETLINK adjusting values of min_ifinfo_dump_sizeStefan Gula1-0/+3
Setting link parameters on a netdevice changes the value of if_nlmsg_size(), therefore it is necessary to recalculate min_ifinfo_dump_size. Signed-off-by: Stefan Gula <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-26ipv6: Fix ip_gre lockless xmits.Willem de Bruijn1-0/+4
Tunnel devices set NETIF_F_LLTX to bypass HARD_TX_LOCK. Sit and ipip set this unconditionally in ops->setup, but gre enables it conditionally after parameter passing in ops->newlink. This is not called during tunnel setup as below, however, so GRE tunnels are still taking the lock. modprobe ip_gre ip tunnel add test0 mode gre remote 10.5.1.1 dev lo ip link set test0 up ip addr add 10.6.0.1 dev test0 # cat /sys/class/net/test0/features # $DIR/test_tunnel_xmit 10 10.5.2.1 ip route add 10.5.2.0/24 dev test0 ip tunnel del test0 The newlink callback is only called in rtnl_netlink, and only if the device is new, as it calls register_netdevice internally. Gre tunnels are created at 'ip tunnel add' with ioctl SIOCADDTUNNEL, which calls ipgre_tunnel_locate, which calls register_netdev. rtnl_newlink is called at 'ip link set', but skips ops->newlink and the device is up with locking still enabled. The equivalent ipip tunnel works fine, btw (just substitute 'method gre' for 'method ipip'). On kernels before /sys/class/net/*/features was removed [1], the first commented out line returns 0x6000 with method gre, which indicates that NETIF_F_LLTX (0x1000) is not set. With ipip, it reports 0x7000. This test cannot be used on recent kernels where the sysfs file is removed (and ETHTOOL_GFEATURES does not currently work for tunnel devices, because they lack dev->ethtool_ops). The second commented out line calls a simple transmission test [2] that sends on 24 cores at maximum rate. Results of a single run: ipip: 19,372,306 gre before patch: 4,839,753 gre after patch: 19,133,873 This patch replicates the condition check in ipgre_newlink to ipgre_tunnel_locate. It works for me, both with oseq on and off. This is the first time I looked at rtnetlink and iproute2 code, though, so someone more knowledgeable should probably check the patch. Thanks. The tail of both functions is now identical, by the way. To avoid code duplication, I'll be happy to rework this and merge the two. [1] http://patchwork.ozlabs.org/patch/104610/ [2] http://kernel.googlecode.com/files/xmit_udp_parallel.c Signed-off-by: Willem de Bruijn <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-26netns: fix net_alloc_generic()Eric Dumazet1-15/+16
When a new net namespace is created, we should attach to it a "struct net_generic" with enough slots (even empty), or we can hit the following BUG_ON() : [ 200.752016] kernel BUG at include/net/netns/generic.h:40! ... [ 200.752016] [<ffffffff825c3cea>] ? get_cfcnfg+0x3a/0x180 [ 200.752016] [<ffffffff821cf0b0>] ? lockdep_rtnl_is_held+0x10/0x20 [ 200.752016] [<ffffffff825c41be>] caif_device_notify+0x2e/0x530 [ 200.752016] [<ffffffff810d61b7>] notifier_call_chain+0x67/0x110 [ 200.752016] [<ffffffff810d67c1>] raw_notifier_call_chain+0x11/0x20 [ 200.752016] [<ffffffff821bae82>] call_netdevice_notifiers+0x32/0x60 [ 200.752016] [<ffffffff821c2b26>] register_netdevice+0x196/0x300 [ 200.752016] [<ffffffff821c2ca9>] register_netdev+0x19/0x30 [ 200.752016] [<ffffffff81c1c67a>] loopback_net_init+0x4a/0xa0 [ 200.752016] [<ffffffff821b5e62>] ops_init+0x42/0x180 [ 200.752016] [<ffffffff821b600b>] setup_net+0x6b/0x100 [ 200.752016] [<ffffffff821b6466>] copy_net_ns+0x86/0x110 [ 200.752016] [<ffffffff810d5789>] create_new_namespaces+0xd9/0x190 net_alloc_generic() should take into account the maximum index into the ptr array, as a subsystem might use net_generic() anytime. This also reduces number of reallocations in net_assign_generic() Reported-by: Sasha Levin <[email protected]> Tested-by: Sasha Levin <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Cc: Sjur Brændeland <[email protected]> Cc: Eric W. Biederman <[email protected]> Cc: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-25tcp: bind() optimize port allocationFlavio Leitner1-4/+2
Port autoselection finds a port and then drop the lock, then right after that, gets the hash bucket again and lock it. Fix it to go direct. Signed-off-by: Flavio Leitner <[email protected]> Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-25tcp: bind() fix autoselection to share portsFlavio Leitner1-0/+5
The current code checks for conflicts when the application requests a specific port. If there is no conflict, then the request is granted. On the other hand, the port autoselection done by the kernel fails when all ports are bound even when there is a port with no conflict available. The fix changes port autoselection to check if there is a conflict and use it if not. Signed-off-by: Flavio Leitner <[email protected]> Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-25l2tp: l2tp_ip - fix possible oops on packet receiveJames Chapman1-5/+0
When a packet is received on an L2TP IP socket (L2TPv3 IP link encapsulation), the l2tpip socket's backlog_rcv function calls xfrm4_policy_check(). This is not necessary, since it was called before the skb was added to the backlog. With CONFIG_NET_NS enabled, xfrm4_policy_check() will oops if skb->dev is null, so this trivial patch removes the call. This bug has always been present, but only when CONFIG_NET_NS is enabled does it cause problems. Most users are probably using UDP encapsulation for L2TP, hence the problem has only recently surfaced. EIP: 0060:[<c12bb62b>] EFLAGS: 00210246 CPU: 0 EIP is at l2tp_ip_recvmsg+0xd4/0x2a7 EAX: 00000001 EBX: d77b5180 ECX: 00000000 EDX: 00200246 ESI: 00000000 EDI: d63cbd30 EBP: d63cbd18 ESP: d63cbcf4 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 Call Trace: [<c1218568>] sock_common_recvmsg+0x31/0x46 [<c1215c92>] __sock_recvmsg_nosec+0x45/0x4d [<c12163a1>] __sock_recvmsg+0x31/0x3b [<c1216828>] sock_recvmsg+0x96/0xab [<c10b2693>] ? might_fault+0x47/0x81 [<c10b2693>] ? might_fault+0x47/0x81 [<c1167fd0>] ? _copy_from_user+0x31/0x115 [<c121e8c8>] ? copy_from_user+0x8/0xa [<c121ebd6>] ? verify_iovec+0x3e/0x78 [<c1216604>] __sys_recvmsg+0x10a/0x1aa [<c1216792>] ? sock_recvmsg+0x0/0xab [<c105a99b>] ? __lock_acquire+0xbdf/0xbee [<c12d5a99>] ? do_page_fault+0x193/0x375 [<c10d1200>] ? fcheck_files+0x9b/0xca [<c10d1259>] ? fget_light+0x2a/0x9c [<c1216bbb>] sys_recvmsg+0x2b/0x43 [<c1218145>] sys_socketcall+0x16d/0x1a5 [<c11679f0>] ? trace_hardirqs_on_thunk+0xc/0x10 [<c100305f>] sysenter_do_call+0x12/0x38 Code: c6 05 8c ea a8 c1 01 e8 0c d4 d9 ff 85 f6 74 07 3e ff 86 80 00 00 00 b9 17 b6 2b c1 ba 01 00 00 00 b8 78 ed 48 c1 e8 23 f6 d9 ff <ff> 76 0c 68 28 e3 30 c1 68 2d 44 41 c1 e8 89 57 01 00 83 c4 0c Signed-off-by: James Chapman <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-24rds: Make rds_sock_lock BH rather than IRQ safe.David S. Miller1-12/+8
rds_sock_info() triggers locking warnings because we try to perform a local_bh_enable() (via sock_i_ino()) while hardware interrupts are disabled (via taking rds_sock_lock). There is no reason for rds_sock_lock to be a hardware IRQ disabling lock, none of these access paths run in hardware interrupt context. Therefore making it a BH disabling lock is safe and sufficient to fix this bug. Reported-by: Kumar Sanghvi <[email protected]> Reported-by: Josh Boyer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-24net: flow_dissector.c missing include linux/export.hJesper Dangaard Brouer1-0/+1
The file net/core/flow_dissector.c seems to be missing including linux/export.h. Signed-off-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-24llc: Fix race condition in llc_ui_recvmsgRadu Iliescu1-0/+5
There is a race on sk_receive_queue between llc_ui_recvmsg and sock_queue_rcv_skb. Our current solution is to protect skb_eat in llc_ui_recvmsg with the queue spinlock. Signed-off-by: Radu Iliescu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-24mac80211: set bss_conf.idle when vif is connectedEliad Peller1-0/+1
__ieee80211_recalc_idle() iterates through the vifs, sets bss_conf.idle = true if they are disconnected, and increases "count" if they are not (which later gets evaluated in order to determine whether the device is idle). However, the loop doesn't set bss_conf.idle = false (along with increasing "count"), causing the device idle state and the vif idle state to get out of sync in some cases. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24mac80211: update oper_channel on ibss joinEliad Peller1-0/+1
Commit 13c40c5 ("mac80211: Add HT operation modes for IBSS") broke ibss operation by mistakenly removing the local->oper_channel update (causing ibss to start on the wrong channel). fix it. Signed-off-by: Eliad Peller <[email protected]> Acked-by: Simon Wunderlich <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24NFC: Add NCI multiple targets supportIlan Elias3-94/+337
Add the ability to select between multiple targets in NCI. If only one target is found, it will be auto-activated. If more than one target is found, then DISCOVER_NTF will be generated for each target, and the host should select one by calling DISCOVER_SELECT_CMD. Then, the target will be activated. If the activation fails, GENERIC_ERROR_NTF is generated. Signed-off-by: Ilan Elias <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24NFC: NFC core layer should not set the target_idxIlan Elias2-17/+0
The NFC core layer should not set the target_idx. Instead, the driver layer (e.g. NCI, PN533) should set the target_idx, so that it will be able to identify the target when its I/F (e.g. activate_target) is called. This is required in order to support multiple targets. Note that currently supported drivers (PN533 and NCI) don't use the target_idx in their implementation. Signed-off-by: Ilan Elias <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24NFC: Clearly separate NCI states from flagsIlan Elias3-12/+12
Make a clear separation between NCI states and flags. This is required in order to support more NCI states (e.g. for multiple targets support). Signed-off-by: Ilan Elias <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24mac80211: in IBSS use the Auth frame to trigger STA reinsertionAntonio Quartulli1-36/+49
In case of a node re-joining the cell the sta_info structure belonging to it is first destroyed and then reinserted. In this way its internal state is reset. The joining operation is recognised thank the Auth frame being received. This operation is helpful in case of a node being rebooted that is joining the ad-hoc cell again, before its purge timeout on other nodes expires. Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24mac80211: add a 2-way Authentication challenge to IBSS modeAntonio Quartulli1-0/+7
In IBSS mode, whenever a new station is added a 2-way authentication challenge is performed. Actually this event can be used to recognise a new station joining the cell even if its sta_info entry is already in the list. Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24NFC: Add NCI data exchange timerIlan Elias2-0/+28
Add NCI data exchange timer to catch timeouts, and call the data exchange callback with an error. Signed-off-by: Ilan Elias <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24mac80211: clean up rate control codeJohannes Berg3-34/+7
It seems exceedingly unlikely that we'll ever support swapping rate control algorithms at runtime, so remove the unused refcounting code. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24mac80211: clean up aggregation destructionJohannes Berg1-23/+8
Yogesh's patch to destroy aggregation sessions when stations are destroyed was needed, but unnecessarily complex. Clean up this code. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24NFC: Export new attributes sensb_res and sensf_resIlan Elias2-13/+104
Export new attributes sensb_res for tech B and sensf_res for tech F in the target info (returned as a response to NFC_CMD_GET_TARGET). The max size of the attributes nfcid1, sensb_res and sensf_res is exported to user space though include/linux/nfc. Signed-off-by: Ilan Elias <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24mac80211: remove useless DA checking in ieee80211_rx_mgmt_probe_resp()Antonio Quartulli1-3/+0
Actually the DA field has already been checked along the rx path (in prepare_for_handlers()) and this check is therefore useless at this point. Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24mac80211: Fix the maximum transmit power with power constraintHong Wu2-2/+3
The local maximum transmit power for a channel is defined as the maximum regulatory transmission power minus the local power constraint specified for the channel in the Power Constraint element. (7.3.2.15 IEEE80211 2007) Signed-off-by: Hong Wu <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24wireless: Save original maximum regulatory transmission power for the ↵Hong Wu1-17/+2
calucation of the local maximum transmit power The local maximum transmit power is the maximum power a wireless device allowed to transmit. If Power Constraint is presented, the local maximum power equals to the maximum allowed power defined in regulatory domain minus power constraint. The maximum transmit power is maximum power a wireless device capable of transmitting, and should be used in Power Capability element (7.3.2.16 IEEE802.11 2007). The transmit power from a wireless device should not greater than the local maximum transmit power. The maximum transmit power was not calculated correctly in the current Linux wireless/mac80211 when Power Constraint is presented. Signed-off-by: Hong Wu <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24mac80211: In IBSS the DA field of auth frames is different from BSSIDAntonio Quartulli4-7/+8
In case of authentication frame exchange between two IBSS STAs, the DA field must contain the destinatioin address (instead of the BSSID). Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24mac80211: refactor __ieee80211_get_channel_modeJohannes Berg1-11/+17
Use a switch statement instead of a list of if statements. Also include AP_VLAN in the list and skip them since the AP interface will also be looked at. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24NFC: Complete NCI deactivate in deactivate_ntfIlan Elias2-1/+6
If a target was active, complete the NCI deactivate request only in deactivate_ntf. Otherwise, complete it at deactivate_rsp. Deactivate_ntf represents the actual disconnection event (sent from the NCI controller). Signed-off-by: Ilan Elias <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24mac80211: minor cleanupMohammed Shafi Shajakhan1-2/+1
we would have bailed out if 'ifibss->fixed_channel' is valid i.e. we had used 'fixed-freq' parameter in iw ibss join command. this is with the state 'IEEE80211_IBSS_MLME_JOINED' so no need to check for it Signed-off-by: Mohammed Shafi Shajakhan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24mac80211: check sta_apply_parameters() return valueEliad Peller1-1/+6
Bail out if sta_apply_parameters() returns an error. Signed-off-by: Eliad Peller <[email protected]> Acked-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-22ethtool: allow ETHTOOL_GSSET_INFO for usersMichał Mirosław1-0/+1
Allow ETHTOOL_GSSET_INFO ethtool ioctl() for unprivileged users. ETHTOOL_GSTRINGS is already allowed, but is unusable without this one. Signed-off-by: Michał Mirosław <[email protected]> Acked-by: Ben Hutchings <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-22bluetooth: hci: Fix type of "enable_hs" to bool.David S. Miller1-1/+1
Fixes: net/bluetooth/hci_core.c: In function ‘__check_enable_hs’: net/bluetooth/hci_core.c:2587:1: warning: return from incompatible pointer type [enabled by default] Signed-off-by: David S. Miller <[email protected]>
2012-01-22net: introduce res_counter_charge_nofail() for socket allocationsGlauber Costa1-2/+2
There is a case in __sk_mem_schedule(), where an allocation is beyond the maximum, but yet we are allowed to proceed. It happens under the following condition: sk->sk_wmem_queued + size >= sk->sk_sndbuf The network code won't revert the allocation in this case, meaning that at some point later it'll try to do it. Since this is never communicated to the underlying res_counter code, there is an inbalance in res_counter uncharge operation. I see two ways of fixing this: 1) storing the information about those allocations somewhere in memcg, and then deducting from that first, before we start draining the res_counter, 2) providing a slightly different allocation function for the res_counter, that matches the original behavior of the network code more closely. I decided to go for #2 here, believing it to be more elegant, since #1 would require us to do basically that, but in a more obscure way. Signed-off-by: Glauber Costa <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Michal Hocko <[email protected]> CC: Tejun Heo <[email protected]> CC: Li Zefan <[email protected]> CC: Laurent Chavey <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: David S. Miller <[email protected]>