aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2011-09-30nl80211/mac80211: allow adding TDLS peers as stationsArik Nemtsov4-7/+48
When adding a TDLS peer STA, mark it with a new flag in both nl80211 and mac80211. Before adding a peer, make sure the wiphy supports TDLS and our operating mode is appropriate (managed). In addition, make sure all peers are removed on disassociation. A TDLS peer is first added just before link setup is initiated. In later setup stages we have more info about peer supported rates, capabilities, etc. This info is reported via nl80211_set_station(). Signed-off-by: Arik Nemtsov <[email protected]> Cc: Kalyan C Gaddam <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-30mac80211: handle TDLS high-level commands and framesArik Nemtsov3-0/+326
Register and implement the TDLS cfg80211 callback functions. Internally prepare and send TDLS management frames. We incorporate local STA capabilities and supported rates with extra IEs given by usermode. The resulting packet is either encapsulated in a data frame, or assembled as an action frame. It is transmitted either directly or through the AP, as mandated by the TDLS specification. Declare support for the TDLS external setup wiphy capability. This tells usermode to handle link setup and discovery on its own, and use the kernel driver for sending TDLS mgmt packets. Signed-off-by: Arik Nemtsov <[email protected]> Cc: Kalyan C Gaddam <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-30mac80211: standardize adding supported rates IEsArik Nemtsov5-66/+61
Relocate the mesh implementation of adding the (extended) supported rates IE to util.c, anticipating its use by other parts of mac80211. Signed-off-by: Arik Nemtsov <[email protected]> Cc: Kalyan C Gaddam <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-30nl80211: support sending TDLS commands/framesArik Nemtsov1-1/+80
Add support for sending high-level TDLS commands and TDLS frames via NL80211_CMD_TDLS_OPER and NL80211_CMD_TDLS_MGMT, respectively. Add appropriate cfg80211 callbacks for lower level drivers. Add wiphy capability flags for TDLS support and advertise them via nl80211. Signed-off-by: Arik Nemtsov <[email protected]> Cc: Kalyan C Gaddam <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-30cfg80211/mac80211: apply station uAPSD parameters selectivelyJohannes Berg2-2/+6
Currently, when hostapd sets the station as authorized we also overwrite its uAPSD parameter. This obviously leads to buggy behaviour (later, with my patches that actually add uAPSD support). To fix this, only apply those parameters if they were actually set in nl80211, and to achieve that add a bitmap of things to apply. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-30mac80211: max_tp_rate2 management of minstrel_htLorenzo Bianconi1-0/+2
I noticed a possible issue in the max_tp_rate2 management of minstrel_ht. In particular, if we look up just among max_tp_rate2 of each group it will be possible that the selected rate will not be the mcs with second maximum throughput. I wrote this simple patch. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-30Merge branch 'master' of ↵John W. Linville43-443/+2589
git://git.infradead.org/users/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/iwlwifi/iwl-pci.c drivers/net/wireless/wl12xx/main.c
2011-09-29Merge branch 'for-linus' of git://github.com/NewDreamNetwork/ceph-clientLinus Torvalds4-42/+48
* 'for-linus' of git://github.com/NewDreamNetwork/ceph-client: libceph: fix pg_temp mapping update libceph: fix pg_temp mapping calculation libceph: fix linger request requeuing libceph: fix parse options memory leak libceph: initialize ack_stamp to avoid unnecessary connection reset
2011-09-29can bcm: fix incomplete tx_setup fixOliver Hartkopp1-27/+21
The commit aabdcb0b553b9c9547b1a506b34d55a764745870 ("can bcm: fix tx_setup off-by-one errors") fixed only a part of the original problem reported by Andre Naujoks. It turned out that the original code needed to be re-ordered to reduce complexity and to finally fix the reported frame counting issues. Signed-off-by: Oliver Hartkopp <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-29RDSRDMA: Fix cleanup of rds_iw_mr_poolJonathan Lallinger1-4/+9
In the rds_iw_mr_pool struct the free_pinned field keeps track of memory pinned by free MRs. While this field is incremented properly upon allocation, it is never decremented upon unmapping. This would cause the rds_rdma module to crash the kernel upon unloading, by triggering the BUG_ON in the rds_iw_destroy_mr_pool function. This change keeps track of the MRs that become unpinned, so that free_pinned can be decremented appropriately. Signed-off-by: Jonathan Lallinger <[email protected]> Signed-off-by: Steve Wise <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-29Bluetooth: hci_le_adv_report_evt code refactoringAndre Guedes1-8/+6
There is no reason to treat the first advertising entry differently from the potential other ones. Besides, the current implementation can easily leads to typos. Signed-off-by: Andre Guedes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-29Bluetooth: Fix possible NULL pointer dereferenceWaldemar Rymarkiewicz1-1/+5
Checking conn->pending_sec_level if there is no connection leads to potential null pointer dereference. Don't process pin_code_request_event at all if no connection exists. Signed-off-by: Waldemar Rymarkiewicz <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-29ipv6: nullify ipv6_ac_list and ipv6_fl_list when creating new socketYan, Zheng1-0/+3
ipv6_ac_list and ipv6_fl_list from listening socket are inadvertently shared with new socket created for connection. Signed-off-by: Zheng Yan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-29can bcm: fix tx_setup off-by-one errorsOliver Hartkopp1-6/+7
This patch fixes two off-by-one errors that canceled each other out. Checking for the same condition two times in bcm_tx_timeout_tsklet() reduced the count of frames to be sent by one. This did not show up the first time tx_setup is invoked as an additional frame is sent due to TX_ANNONCE. Invoking a second tx_setup on the same item led to a reduced (by 1) number of sent frames. Reported-by: Andre Naujoks <[email protected]> Signed-off-by: Oliver Hartkopp <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-28net: rps: fix the support for PPPOEChangli Gao1-1/+11
The upper protocol numbers of PPPOE are different, and should be treated specially. Signed-off-by: Changli Gao <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-28af_unix: dont send SCM_CREDENTIALS by defaultEric Dumazet3-8/+31
Since commit 7361c36c5224 (af_unix: Allow credentials to work across user and pid namespaces) af_unix performance dropped a lot. This is because we now take a reference on pid and cred in each write(), and release them in read(), usually done from another process, eventually from another cpu. This triggers false sharing. # Events: 154K cycles # # Overhead Command Shared Object Symbol # ........ ....... .................. ......................... # 10.40% hackbench [kernel.kallsyms] [k] put_pid 8.60% hackbench [kernel.kallsyms] [k] unix_stream_recvmsg 7.87% hackbench [kernel.kallsyms] [k] unix_stream_sendmsg 6.11% hackbench [kernel.kallsyms] [k] do_raw_spin_lock 4.95% hackbench [kernel.kallsyms] [k] unix_scm_to_skb 4.87% hackbench [kernel.kallsyms] [k] pid_nr_ns 4.34% hackbench [kernel.kallsyms] [k] cred_to_ucred 2.39% hackbench [kernel.kallsyms] [k] unix_destruct_scm 2.24% hackbench [kernel.kallsyms] [k] sub_preempt_count 1.75% hackbench [kernel.kallsyms] [k] fget_light 1.51% hackbench [kernel.kallsyms] [k] __mutex_lock_interruptible_slowpath 1.42% hackbench [kernel.kallsyms] [k] sock_alloc_send_pskb This patch includes SCM_CREDENTIALS information in a af_unix message/skb only if requested by the sender, [man 7 unix for details how to include ancillary data using sendmsg() system call] Note: This might break buggy applications that expected SCM_CREDENTIAL from an unaware write() system call, and receiver not using SO_PASSCRED socket option. If SOCK_PASSCRED is set on source or destination socket, we still include credentials for mere write() syscalls. Performance boost in hackbench : more than 50% gain on a 16 thread machine (2 quad-core cpus, 2 threads per core) hackbench 20 thread 2000 4.228 sec instead of 9.102 sec Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Tim Chen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-28libceph: fix pg_temp mapping updateSage Weil1-26/+24
The incremental map updates have a record for each pg_temp mapping that is to be add/updated (len > 0) or removed (len == 0). The old code was written as if the updates were a complete enumeration; that was just wrong. Update the code to remove 0-length entries and drop the rbtree traversal. This avoids misdirected (and hung) requests that manifest as server errors like [WRN] client4104 10.0.1.219:0/275025290 misdirected client4104.1:129 0.1 to osd0 not [1,0] in e11/11 Signed-off-by: Sage Weil <[email protected]>
2011-09-28libceph: fix pg_temp mapping calculationSage Weil1-13/+21
We need to apply the modulo pg_num calculation before looking up a pgid in the pg_temp mapping rbtree. This fixes pg_temp mappings, and fixes (some) misdirected requests that result in messages like [WRN] client4104 10.0.1.219:0/275025290 misdirected client4104.1:129 0.1 to osd0 not [1,0] in e11/11 on the server and stall make the client block without getting a reply (at least until the pg_temp mapping goes way, but that can take a long long time). Reorder calc_pg_raw() a bit to make more sense. Signed-off-by: Sage Weil <[email protected]>
2011-09-28Merge branch 'master' of git://git.infradead.org/users/linville/wirelessJohn W. Linville1-0/+3
Conflicts: drivers/net/wireless/iwlwifi/iwl-scan.c net/wireless/nl80211.c
2011-09-27Merge branch 'for-davem' of git://git.infradead.org/users/linville/wirelessDavid S. Miller1-1/+4
2011-09-27Bluetooth: Mark not declared l2cap_core functions as staticSzymon Janc1-6/+6
Signed-off-by: Szymon Janc <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-27Bluetooth: use recommended LE connection parametersAnderson Lizardo1-7/+7
The new connection parameters now match the recommended values for Proximity and Health Thermometer profiles. The previous values were ramdomly chosen, and are either too low or too high for most cases. New values: Scan Interval: 60 ms Scan Window: 30 ms Minimum Connection Interval: 50 ms Maximum Connection Interval: 70 ms Supervision Timeout: 420 ms See "Table 5.2: Recommended Scan Interval and Scan Window Values" and "Table 5.3: Recommended Connection Interval Values" for both profiles for details. Note that the "fast connection" parameters were chosen, because we do not support yet dynamically changing these parameters from initiator side. Additionally, the Proximity profile recommends (section "4.4 Alert on Link Loss"): "It is recommended that the Link Supervision Timeout (LSTO) is set to 6x the connection interval." Minimum_CE_Length and Maximum_CE_Length were also changed from 0x0001 to 0x0000 because they are informational and optional, and old value was not reflecting reality. Signed-off-by: Anderson Lizardo <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-27Bluetooth: Perform L2CAP SDU reassembly without copying dataMat Martineau1-163/+80
Use sk_buff fragment capabilities to link together incoming skbs instead of allocating a new skb for reassembly and copying. The new reassembly code works equally well for ERTM and streaming mode, so there is now one reassembly function instead of two. Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-27Bluetooth: Handle fragmented skbs in bt_sock_stream_recvmsg()Mat Martineau1-2/+28
ERTM reassembly will be more efficient when skbs are linked together rather than copying every incoming data byte. The existing stream recv function assumes skbs are linear, so it needs to know how to handle fragments before reassembly is changed. bt_sock_recvmsg() already handles fragmented skbs. Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-27Bluetooth: Linearize skbs for use in BNEP, CMTP, HIDP, and RFCOMMMat Martineau4-5/+20
Fragmented skbs are only encountered when receiving ERTM or streaming mode L2CAP data. BNEP, CMTP, HIDP, and RFCOMM generally use basic mode, but they need to handle fragments without crashing. Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-27Merge branch 'master' of git://git.infradead.org/users/linville/wireless ↵John W. Linville1-1/+4
into for-davem
2011-09-27ipv6-multicast: Fix memory leak in IPv6 multicast.Ben Greear1-1/+3
If reg_vif_xmit cannot find a routing entry, be sure to free the skb before returning the error. Signed-off-by: Ben Greear <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-27ipv6: check return value for dst_allocMadalin Bucur1-1/+3
return value of dst_alloc must be checked before use Signed-off-by: Madalin Bucur <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-27net: check return value for dst_allocMadalin Bucur1-4/+6
return value of dst_alloc must be checked before use Signed-off-by: Madalin Bucur <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-27ipv6-multicast: Fix memory leak in input path.Ben Greear1-1/+3
Have to free the skb before returning if we fail the fib lookup. Signed-off-by: Ben Greear <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-27Merge branch 'batman-adv/maint' of git://git.open-mesh.org/linux-mergeDavid S. Miller1-5/+5
2011-09-27mac80211: treat the WME sta flag as a bitArik Nemtsov1-1/+1
Correct flag usage - use it as a bit index instead of a bit value. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27mac80211: save tx params per sdataEliad Peller6-15/+31
save and configure tx param per sdata, rather than per hardware. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27cfg80211/mac80211: add netdev param to set_txq_params()Eliad Peller2-0/+7
tx params are currently configured per hw, although they should be configured per interface. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27mac80211: Send the management frame at requested rateRajkumar Manoharan7-7/+42
Whenever the scan request or tx_mgmt is requesting not to use CCK rate for managemet frames through NL80211_ATTR_TX_NO_CCK_RATE attribute, then mac80211 should select appropriate least non-CCK rate. This could help to send P2P probes and P2P action frames at non 11b rates without diabling 11b rates globally. Cc: Jouni Malinen <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27nl80211/cfg80211: Add support to disable CCK rate for management frameRajkumar Manoharan4-5/+15
Add a new nl80211 attribute to specify whether to send the management frames in CCK rate or not. As of now the wpa_supplicant is disabling CCK rate at P2P init itself. So this patch helps to send P2P probe request/probe response/action frames being sent at non CCK rate in 2GHz without disabling 11b rates. This attribute is used with NL80211_CMD_TRIGGER_SCAN and NL80211_CMD_FRAME commands to disable CCK rate for management frame transmission. Cc: Jouni Malinen <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27NFC: use after free on errorDan Carpenter1-8/+6
We returned a freed variable on some error paths when the intent was to return a NULL. Part of the reason this was missed was that the code was confusing because it had too many gotos so I removed them and simplified the flow a bit. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Lauro Ramos Venancio <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27NFC: protect nci_data_exchange transactionsIlan Elias3-2/+12
Protect 'cb' and 'cb_context' arguments in nci_data_exchange. In fact, this implements a queue with max length of 1 data exchange transactions in parallel. Signed-off-by: Ilan Elias <[email protected]> Acked-by: Lauro Ramos Venancio <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27NFC: implicitly deactivate in nci_start_pollIlan Elias1-1/+6
When start_poll is called, and a target was implicitly activated, we need to implicitly deactivate it. On the other hand, when the target was activated by the user, we should not deactivate it. Signed-off-by: Ilan Elias <[email protected]> Acked-by: Lauro Ramos Venancio <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27NFC: improve readability of an 'if' in nci core.cIlan Elias1-18/+14
Signed-off-by: Ilan Elias <[email protected]> Acked-by: Lauro Ramos Venancio <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27cfg80211: Validate cipher suite against supported ciphersJouni Malinen3-18/+15
Instead of using a hardcoded list of cipher suites in nl80211.c, use a shared function in util.c to verify that the driver advertises support for the specified cipher. This provides more accurate validation of the values and allows vendor-specific cipher suites to be added in drivers. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27cfg80211: Remove strict validation of AKM suitesJouni Malinen1-11/+1
NL80211_ATTR_AKM_SUITES can be used to configure new AKMs, like FT or the SHA-256 -based AKMs or FT from 802.11r/802.11w. In addition, vendor specific AKMs could be used. The current validation code for the connect command prevents cfg80211-based drivers from using these mechanisms even if the driver would not actually use this AKM value (i.e., it uses WPA/RSN IE from user space). mac80211-based drivers allow any AKM to be used since this value is not used there. Remove the unnecessary validation step in cfg80211 to allow drivers to decide what AKMs are supported. In theory, we could handle this by advertising supported AKMs, but that would not be very effective unless we enforce all drivers (including mac80211) to advertise the set of supported AKMs. This would require additional changes in many places whenever a new AKM is introduced even though no actually functionality changes may be required in most drivers. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27mac80211: add ieee80211_vif param to tsf functionsEliad Peller5-74/+78
TSF can be kept per vif. Add ieee80211_vif param to set/get/reset_tsf, and move the debugfs entries to the per-vif directory. Update all the drivers that implement these callbacks. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27Merge branch 'master' of git://github.com/padovan/bluetooth-nextJohn W. Linville9-276/+473
2011-09-27tcp: rename tcp_skb_cb flagsEric Dumazet3-37/+38
Rename struct tcp_skb_cb "flags" to "tcp_flags" to ease code review and maintenance. Its content is a combination of FIN/SYN/RST/PSH/ACK/URG/ECE/CWR flags Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-27doc: fix broken referencesPaul Bolle1-1/+1
There are numerous broken references to Documentation files (in other Documentation files, in comments, etc.). These broken references are caused by typo's in the references, and by renames or removals of the Documentation files. Some broken references are simply odd. Fix these broken references, sometimes by dropping the irrelevant text they were part of. Signed-off-by: Paul Bolle <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-09-27tcp: unalias tcp_skb_cb flags and ip_dsfieldEric Dumazet3-3/+3
struct tcp_skb_cb contains a "flags" field containing either tcp flags or IP dsfield depending on context (input or output path) Introduce ip_dsfield to make the difference clear and ease maintenance. If later we want to save space, we can union flags/ip_dsfield Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-27tcp: ECN blackhole should not force quickack modeEric Dumazet1-7/+16
While playing with a new ADSL box at home, I discovered that ECN blackhole can trigger suboptimal quickack mode on linux : We send one ACK for each incoming data frame, without any delay and eventual piggyback. This is because TCP_ECN_check_ce() considers that if no ECT is seen on a segment, this is because this segment was a retransmit. Refine this heuristic and apply it only if we seen ECT in a previous segment, to detect ECN blackhole at IP level. Signed-off-by: Eric Dumazet <[email protected]> CC: Jamal Hadi Salim <[email protected]> CC: Jerry Chu <[email protected]> CC: Ilpo Järvinen <[email protected]> CC: Jim Gettys <[email protected]> CC: Dave Taht <[email protected]> Acked-by: Ilpo Järvinen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-22batman-adv: do_bcast has to be true for broadcast packets onlyAntonio Quartulli1-5/+5
corrects a critical bug of the GW feature. This bug made all the unicast packets destined to a GW to be sent as broadcast. This bug is present even if the sender GW feature is configured as OFF. It's an urgent bug fix and should be committed as soon as possible. This was a regression introduced by 43676ab590c3f8686fd047d34c3e33803eef71f0 Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Marek Lindner <[email protected]>
2011-09-22Merge branch 'master' of github.com:davem330/netDavid S. Miller64-286/+412
Conflicts: MAINTAINERS drivers/net/Kconfig drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c drivers/net/ethernet/broadcom/tg3.c drivers/net/wireless/iwlwifi/iwl-pci.c drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c drivers/net/wireless/rt2x00/rt2800usb.c drivers/net/wireless/wl12xx/main.c