aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-03ppp_generic: pull 2 bytes so that PPP_PROTO(skb) is validSimon Arlott1-11/+18
In ppp_input(), PPP_PROTO(skb) may refer to invalid data in the skb. If this happens and (proto >= 0xc000 || proto == PPP_CCPFRAG) then the packet is passed directly to pppd. This occurs frequently when using PPPoE with an interface MTU greater than 1500 because the skb is more likely to be non-linear. The next 2 bytes need to be pulled in ppp_input(). The pull of 2 bytes in ppp_receive_frame() has been removed as it is no longer required. Signed-off-by: Simon Arlott <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-03iwmc3200wifi: fix busted iwm_debugfs_init definitionJohn W. Linville1-4/+1
Looks like we missed removing the return statement in the non-CONFIG_IWM_DEBUG dummy implementation of iwm_debugfs_init... Signed-off-by: John W. Linville <[email protected]>
2010-05-03Merge branch 'wireless-next-2.6' of ↵John W. Linville20-92/+799
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
2010-05-03wireless: rt2x00: rt2800usb: be in sync with latest windows drivers.Xose Vazquez Perez1-1/+6
0x07d1,0x3c17 D-Link Wireless N 150 USB Adapter DWA-125 0x1b75,0x3071 Ovislink Airlive WN-301USB 0x1d4d,0x0011 Pegatron Ralink RT3072 802.11b/g/n Wireless Lan USB Device 0x083a,0xf511 Arcadyan 802.11 USB Wireless LAN Card 0x13d3,0x3322 AzureWave 802.11 n/g/b USB Wireless LAN Card Signed-off-by: Xose Vazquez Perez <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-05-03mac80211_hwsim: fix double-scan detectionJohannes Berg1-1/+1
Currently, hwsim will always detect a double scan after the first one has finished ... Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-05-03mac80211: improve IBSS scanningJohannes Berg4-21/+36
When IBSS is fixed to a frequency, it can still scan to try to find the right BSSID. This makes sense if the BSSID isn't also fixed, but it need not scan all channels -- just one is sufficient. Make it do that by moving the scan setup code to ieee80211_request_internal_scan() and include a channel variable setting. Note that this can be further improved to start the IBSS right away if both frequency and BSSID are fixed. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-05-03mac80211: allow controlling aggregation manuallyJohannes Berg2-2/+66
This allows enabling TX and disabling both TX and RX aggregation sessions manually in debugfs. It is very useful for debugging session initiation and teardown problems since with this you don't have to force a lot of traffic to get aggregation and thus have less data to analyse. Also, to debug mac80211 code itself, make hwsim "support" aggregation sessions. It will still just transfer the frame, but go through the setup and teardown handshakes. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-05-03orinoco_usb: implement fw downloadDavid Kilroy6-238/+349
This involves some refactorring of the common fw download code to substitute ezusb versions of various functions. Note that WPA-enabled firmwares (9.xx series) will not work fully with orinoco_usb yet. Signed-off-by: David Kilroy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-05-03orinoco_usb: avoid in_atomicDavid Kilroy1-1/+1
We expect to be either in process contect or soft interrupt context. So use in_softirq instead. Signed-off-by: David Kilroy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-05-03orinoco: add orinoco_usb driverDavid Kilroy6-2/+1696
This driver uses the core orinoco modules for the bulk of the functionality. The low level hermes routines (for local bus cards) are replaced, the driver supplies its own ndo_xmit_start function, and locking is done with the _bh variant. Some recent functionality is not available to the USB cards yet (firmware loading and WPA). Out-of-tree driver originally written by Manuel Estrada Sainz. Thanks to Mark Davis for supplying hardware to test the updates. Signed-off-by: David Kilroy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-05-03orinoco: encapsulate driver lockingDavid Kilroy7-20/+60
Local bus and USB drivers will need to do locking differently. The original orinoco_usb patches had a boolean variable controlling whether spin_lock_bh was used, or irq based locking. This version provides wrappers for the lock functions and the drivers specify the functions pointers needed. This will introduce a performance penalty, but I'm not expecting it to be noticable. Signed-off-by: David Kilroy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-05-03orinoco: allow driver to specify netdev_opsDavid Kilroy9-16/+37
Allow the main drivers to specify a custom version of the net_device_ops structure. This is required by orinoco_usb to supply a separate transmit function. Export existing net_device_ops callbacks so that the drivers can reuse some of the existing code. Signed-off-by: David Kilroy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-05-03orinoco: add hermes_opsDavid Kilroy9-140/+154
Pave the way for introducing USB alternative functions. Force callers to dereference ops instead of providing wrappers. Signed-off-by: David Kilroy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-05-03mac80211: fix ieee80211_find_sta[_by_hw]Johannes Berg1-4/+13
Both of these functions can currently return a station pointer that, to the driver, is invalid (in IBSS mode only) because adding the station failed. Check for that, and also make ieee80211_find_sta() properly use the per interface station search. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-05-03b43legacy: Added get_survey callback in order to get channel noiseJohn W. Linville1-0/+18
Signed-off-by: John W. Linville <[email protected]>
2010-05-03b43: Added get_survey callback in order to get channel noiseJohn W. Linville1-0/+18
Signed-off-by: John W. Linville <[email protected]>
2010-05-03rt2x00: remove now unused noise field from struct rxdone_entry_descJohn W. Linville3-10/+0
Signed-off-by: John W. Linville <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]>
2010-05-03iwmc3200wifi: cleanup unneeded debugfs error handlingJohn W. Linville4-55/+15
"iwl: cleanup: remove unneeded error handling" missed the one in if_sdio_debugfs_init(). I don't think we even need to check -ENODEV ourselves because if DEBUG_FS is not compiled in, all the debugfs utility functions will become no-op. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Zhu Yi <[email protected]> Acked-by: Dan Carpenter <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-05-03tun: add ioctl to modify vnet header sizeMichael S. Tsirkin2-4/+30
virtio added mergeable buffers mode where 2 bytes of extra info is put after vnet header but before actual data (tun does not need this data). In hindsight, it would have been better to add the new info *before* the packet: as it is, users need a lot of tricky code to skip the extra 2 bytes in the middle of the iovec, and in fact applications seem to get it wrong, and only work with specific iovec layout. The fact we might need to split iovec also means we might in theory overflow iovec max size. This patch adds a simpler way for applications to handle this, and future proofs the interface against further extensions, by making the size of the virtio net header configurable from userspace. As a result, tun driver will simply skip the extra 2 bytes on both input and output. Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: David S. Miller <[email protected]>
2010-05-02net: Use explicit "unsigned int" instead of plain "unsigned" in netdevice.hDavid S. Miller1-5/+5
Signed-off-by: David S. Miller <[email protected]>
2010-05-02net: fix softnet_statChangli Gao3-25/+20
Per cpu variable softnet_data.total was shared between IRQ and SoftIRQ context without any protection. And enqueue_to_backlog should update the netdev_rx_stat of the target CPU. This patch renames softnet_data.total to softnet_data.processed: the number of packets processed in uppper levels(IP stacks). softnet_stat data is moved into softnet_data. Signed-off-by: Changli Gao <[email protected]> ---- include/linux/netdevice.h | 17 +++++++---------- net/core/dev.c | 26 ++++++++++++-------------- net/sched/sch_generic.c | 2 +- 3 files changed, 20 insertions(+), 25 deletions(-) Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-02Merge branch 'master' of ↵David S. Miller30-147/+1270
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2010-05-02net: fix compile error due to double return type in SOCK_DEBUGJan Engelhardt1-1/+1
Fix this one: include/net/sock.h: error: two or more data types in declaration specifiers Signed-off-by: Jan Engelhardt <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-02net: Inline skb_pull() in eth_type_trans().David S. Miller3-2/+7
In commit 6be8ac2f ("[NET]: uninline skb_pull, de-bloats a lot") we uninlined skb_pull. But in some critical paths it makes sense to inline this thing and it helps performance significantly. Create an skb_pull_inline() so that we can do this in a way that serves also as annotation. Based upon a patch by Eric Dumazet. Signed-off-by: David S. Miller <[email protected]>
2010-05-01net/usb: initiate sync sequence in sierra_net.c driverElina Pasheva1-0/+3
The following patch adds the initiation of the sync sequence to "sierra_net_bind()". If this step is omitted, the modem will never sync up with the host and it will not be possible to establish a data connection. Signed-off-by: Elina Pasheva <[email protected]> Signed-off-by: Rory Filer <[email protected]> Tested-by: Elina Pasheva <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-01net: sock_def_readable() and friends RCU conversionEric Dumazet16-114/+181
sk_callback_lock rwlock actually protects sk->sk_sleep pointer, so we need two atomic operations (and associated dirtying) per incoming packet. RCU conversion is pretty much needed : 1) Add a new structure, called "struct socket_wq" to hold all fields that will need rcu_read_lock() protection (currently: a wait_queue_head_t and a struct fasync_struct pointer). [Future patch will add a list anchor for wakeup coalescing] 2) Attach one of such structure to each "struct socket" created in sock_alloc_inode(). 3) Respect RCU grace period when freeing a "struct socket_wq" 4) Change sk_sleep pointer in "struct sock" by sk_wq, pointer to "struct socket_wq" 5) Change sk_sleep() function to use new sk->sk_wq instead of sk->sk_sleep 6) Change sk_has_sleeper() to wq_has_sleeper() that must be used inside a rcu_read_lock() section. 7) Change all sk_has_sleeper() callers to : - Use rcu_read_lock() instead of read_lock(&sk->sk_callback_lock) - Use wq_has_sleeper() to eventually wakeup tasks. - Use rcu_read_unlock() instead of read_unlock(&sk->sk_callback_lock) 8) sock_wake_async() is modified to use rcu protection as well. 9) Exceptions : macvtap, drivers/net/tun.c, af_unix use integrated "struct socket_wq" instead of dynamically allocated ones. They dont need rcu freeing. Some cleanups or followups are probably needed, (possible sk_callback_lock conversion to a spinlock for example...). Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-04-30sctp: Tag messages that can be Nagle delayed at creation.Vlad Yasevich3-8/+6
When we create the sctp_datamsg and fragment the user data, we know exactly if we are sending full segments or not and how they might be bundled. During this time, we can mark messages a Nagle capable or not. This makes the check at transmit time much simpler. Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: Optimize computation of highest new tsn in SACK.Vlad Yasevich1-35/+7
Right now, if the highest tsn in the SACK doesn't change, we'll end up scanning the transmitted lists on the transports twice: once for locating the highest _new_ tsn, and once for actually tagging chunks as acked. This is a waste, since we can record the highest _new_ tsn at the same time as tagging chunks. Long ago this was not possible because we would try to mark chunks as missing at the same time as tagging them acked and this approach didn't work. Now that the two steps are separate, we can re-use the old approach. Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: correctly mark missing chunks in fast recoveryVlad Yasevich1-5/+13
According to RFC 4960 Section 7.2.4: If an endpoint is in Fast Recovery and a SACK arrives that advances the Cumulative TSN Ack Point, the miss indications are incremented for all TSNs reported missing in the SACK. Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: rwnd_press should be cumulativeVlad Yasevich1-1/+1
rwnd_press tracks the pressure on the recieve window. Every timer the receive buffer overlows, we truncate the receive window and then grow it back. However, if we don't track the cumulative presser, it's possible to reach a situation when receive buffer is empty, but rwnd stays truncated. Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: fast recovery algorithm is per association.Vlad Yasevich2-21/+23
SCTP fast recovery algorithm really applies per association and impacts all transports. Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: update transport initializationsVlad Yasevich4-31/+1
Right now, sctp transports are not fully initialized and when adding any new fields, they have to be explicitely initialized. This is prone to mistakes. So we switch to calling kzalloc() which makes things much simpler. Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: Save some room in the sctp_transport by using bitfieldsVlad Yasevich1-22/+27
Saves some room in the sctp_transport structure. Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: Do not force T3 timer on fast retransmissions.Vlad Yasevich2-14/+5
We don't need to force the T3 timer any more and it's actually wrong to do as it causes too long of a delay. The timer will be started if one is not running, but if one is running, we leave it alone. Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: remove 'resent' bit from the chunkVlad Yasevich4-20/+10
The 'resent' bit is used to make sure that we don't update rto estimate based on retransmitted chunks. However, we already have the 'rto_pending' bit that we test when need to update rto, so 'resent' bit is just extra. Additionally, we currently have a bug in that we always set a 'resent' bit and thus rto estimate is only updated by Heartbeats. Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: Make sure we always return valid retransmit pathVlad Yasevich1-1/+2
commit 4951feda0c60d1ef681f1a270afdd617924ab041 sctp: Do no select unconfirmed transports for retransmissions added code to make sure that we do not select unconfirmed paths for data transmission. This caused a problem when there are only 2 paths, 1 unconfirmed and 1 unreachable. In that case, the next retransmit path returned is NULL and that causes a kernel crash. The solution is to only change retransmit paths if we found one to use. Reported-by: Frank Schuster <[email protected]> Signed-off-b: Vlad Yasevich <[email protected]>
2010-04-30sctp: cleanup: remove duplicate assignmentDan Carpenter1-14/+9
This assignment isn't needed because we did it earlier already. Also another reason to delete the assignment is because it triggers a Smatch warning about checking for NULL pointers after a dereference. Reported-by: Vlad Yasevich <[email protected]> Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: implement sctp association probing moduleWei Yongjun3-0/+228
This patch implement sctp association probing module, the module will be called sctp_probe. This module allows for capturing the changes to SCTP association state in response to incoming packets. It is used for debugging SCTP congestion control algorithms. Usage: $ modprobe sctp_probe [full=n] [port=n] [bufsize=n] $ cat /proc/net/sctpprobe The output format is: TIME ASSOC LPORT RPORT MTU RWND UNACK <REMOTE-ADDR STATE CWND SSTHRESH INFLIGHT PARTIAL_BYTES_ACKED MTU> ... The output will be like this: 9.226086 c4064c48 9000 8000 1500 53352 1 *192.168.0.19 1 4380 54784 1252 0 1500 9.287195 c4064c48 9000 8000 1500 45144 5 *192.168.0.19 1 5880 54784 6500 0 1500 9.289130 c4064c48 9000 8000 1500 42724 5 *192.168.0.19 1 7380 54784 6500 0 1500 9.620332 c4064c48 9000 8000 1500 48284 4 *192.168.0.19 1 8880 54784 5200 0 1500 ...... Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: use sctp_chunk_is_data macro to decide a chunk is data chunkShan Wei1-1/+1
sctp_chunk_is_data macro is defined to decide that whether a chunk is data chunk or not. Signed-off-by: Shan Wei <[email protected]> Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: Do no select unconfirmed transports for retransmissionsVlad Yasevich1-2/+3
An unconfirmed transport is one that we have not been able to reach since the beginning. There is no point in trying to retrasnmit data on those transports. Also, the specification forbids it due to security issues. Reported-by: Frank Schuster <[email protected]> Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: fix to retranmit at least one DATA chunkWei Yongjun1-0/+12
While doing retranmit, if control chunk exists, such as FORWARD TSN chunk, and the DATA chunk can not be bundled with this control chunk because of PMTU limit, no DATA chunk will be retranmitted in the current implementation. This patch makes sure to retranmit at least one DATA chunk in this case. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30net/usb: remove default in Kconfig for sierra_net driverElina Pasheva1-1/+0
The following patch removes the default from the Kconfig entry for sierra_net driver as recommended. Signed-off-by: Elina Pasheva <[email protected]> Signed-off-by: Rory Filer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-04-30sctp: missing set src and dest port while lookup output routeWei Yongjun1-1/+6
While lookup the output route, we do not set the src and dest port. This will cause we got a wrong route if we had set the outbund transport to IPsec with src or dst port. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: discard ABORT chunk with zero verification tag in COOKIE-WAIT stateWei Yongjun1-1/+1
In current implementation if ABORT chunk is received with T flag is set and zero verification tag in COOKIE-WAIT state, the ABORT chunk will be always accepted. This is because in COOKIE-WAIT state, the endpoint does not know the peer's verification tag, and it's zero in the endpoint. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: assure at least one T3-rtx timer is running if a FORWARD TSN is sentWei Yongjun1-0/+6
PR-SCTP extension section 3.5 Sender Side Implementation of PR-SCTP: C5) If a FORWARD TSN is sent, the sender MUST assure that at least one T3-rtx timer is running. So this patch fix to assure at least one T3-rtx timer is running if a FORWARD TSN is or will to sent. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: send SHUTDOWN-ACK chunk back to the source.Vlad Yasevich1-2/+6
SHUTDOWN-ACK is alaways sent to the primary path at the first time, but should better transmit SHUTDOWN-ACK chunk to the same destination transport address from which it received the SHUTDOWN chunk. Based on the work from Wei Yongjun <[email protected]>. Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30sctp: Use correct address family in sctp_getsockopt_peer_addrs()Vlad Yasevich1-1/+1
The function should use the address family of the address when trying to determine the length of the structure. Signed-off-by: Vlad Yasevich <[email protected]>
2010-04-30ipv6: cleanup: remove unneeded null checkDan Carpenter1-2/+1
We dereference "sk" unconditionally elsewhere in the function. This was left over from: b30bd282 "ip6_xmit: remove unnecessary NULL ptr check". According to that commit message, "the sk argument to ip6_xmit is never NULL nowadays since the skb->priority assigment expects a valid socket." Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-04-30xfrm: potential uninitialized variable num_xfrmsChangli Gao1-1/+1
potential uninitialized variable num_xfrms fix compiler warning: 'num_xfrms' may be used uninitialized in this function. Signed-off-by: Changli Gao <[email protected]> ---- net/xfrm/xfrm_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Signed-off-by: David S. Miller <[email protected]>
2010-04-30net: speedup sock_recv_ts_and_drops()Eric Dumazet2-3/+20
sock_recv_ts_and_drops() is fat and slow (~ 4% of cpu time on some profiles) We can test all socket flags at once to make fast path fast again. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>