aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2009-11-18cfg80211: re-join IBSS when privacy changesJohannes Berg3-11/+44
When going from/to a WEP protected IBSS, we need to leave this one and join a new one to take care of the changed capability. Cc: Hong Zhang <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18mac80211: Fix panic in aggregation handlingSujith1-0/+2
Not assigning the vif pointer causes an oops. This patch fixes it. Signed-off-by: Sujith <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18cfg80211: Allow reassociation in associated stateJouni Malinen1-2/+18
cfg80211 rejects all association requests when in associated state. This prevents clean roaming within an ESS since one would first need to disassociate before being able to request reassociation. Accept the reassociation request and let the old association to be dropped when the new one is completed. This fixes nl80211-based roaming with the current snapshot version of wpa_supplicant (that has code for requesting reassociation explicitly withthe previous BSSID attribute). Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18mac80211: make software rate control optionalJohannes Berg5-13/+42
Some devices implement the entire rate control in firmware in some way, like wl1271 or like iwlwifi which does some things in software but not a lot. Therefore generic software rate control is rather useless for them and just adds avoidable overhead to the transmit path. It's fairly simple to let drivers indicate that they do not need rate control, but they need to fulfil a number of conditions that we encode in WARN_ONs. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18mac80211: use fixed broadcast addressJohannes Berg6-19/+27
The netdev broadcast address cannot change from all-ones so there's no need to use it; we can instead hard-code it. Since we already have an instance in tkip.c, which will be shared if it is marked static const, doing this reduces text size at no data/bss cost. The real motivation for this is, of course, the desire to get rid of almost all uses of netdevs in mac80211 so that auditing their use becomes easier. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18mac80211: remove dev_hold/put callsJohannes Berg1-11/+5
If we move the rcu sections a little, there's no need to touch the device refcount. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18mac80211: improve rate handlingJohannes Berg2-18/+18
Some code currently assumes that there's a valid rate pointer even in the HT case, but there can't be. To reduce reliance on that, remove the rate pointer from the RX data struct and pass it where it's needed. Also, for now, in radiotap announce HT frames as having a DYN channel type, and remove their rate from cooked monitor radiotap completely (it isn't present in the regular monitor radiotap either.) Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18mac80211: trim RX dataJohannes Berg4-54/+61
The RX data contains the netdev, which is duplicated since we have the sdata, and the RX status pointer, which is duplicate since we have the skb. Remove those two fields to have fewer fields that depend on each other and simply load them as necessary. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18mac80211: cleanup reorder buffer handlingJohannes Berg1-81/+81
The reorder buffer handling is written in a quite peculiar style (especially comments) and also has a quirk where it invokes the entire reorder code in ieee80211_sta_manage_reorder_buf() for just a handful of lines in it with a special argument. Split out ieee80211_release_reorder_frames which can then be invoked from BAR handling and other reordering code, clean up code and comments and remove function arguments that are now unused from ieee80211_sta_manage_reorder_buf(). Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18mac80211: push michael MIC report after DA checkJohannes Berg1-24/+23
When we receive a michael MIC failure report from the hardware we currently do not check whether it is actually reported on a frame that is destined to us. It shouldn't be possible to get a michael MIC failure report on other frames, but it also doesn't hurt to verify. Also, since we then don't need the station struct that early, move looking it up a bit later in the RX path. Finally, while at it, a few code cleanups in the area. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18mac80211: convert aggregation to operate on vifs/stasJohannes Berg7-72/+58
The entire aggregation code currently operates on the hw pointer and station addresses, but that needs to change to make stations purely per-vif; As one step preparing for that make the aggregation code callable with the station, or by the combination of virtual interface and station address. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18mac80211: let sta_info_get_by_idx get sta by sdataJohannes Berg3-7/+8
Instead of filtering by device, directly look up by sdata. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18mac80211: reduce the amount of unnecessary traffic on cooked monitor interfacesFelix Fietkau1-0/+5
In order to handle association and authentication in AP mode, hostapd needs access to the tx status info of its own frames through a cooked monitor interface. Without this patch the cooked monitor interfaces also passed on tx status information for packets from other virtual interfaces. This creates a significant performance issue on embedded system. Hostapd tries to work around this by installing a Linux Socket Filter that only captures the frames it's interested in, however data duplication and socket filter matching still uses up enough CPU cycles to be very noticeable on small systems. This patch ensures that tx status information of non-injected frames does not make it to cooked monitor interfaces. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18mac80211: fix addba timer (again...)Johannes Berg1-10/+8
commit 2171abc58644e09dbba546d91366b12743115396 Author: Johannes Berg <[email protected]> Date: Thu Oct 29 08:34:00 2009 +0100 mac80211: fix addba timer left a problem in there, even if the timer was never started it could be deleted and then added. Linus pointed out that del_timer_sync() isn't actually needed if we make the timer able to deal with no longer being needed when it gets queued _while_ we're in the locked section that also deletes it. For that the timer function only needs to check the HT_ADDBA_RECEIVED_MSK bit as well as the HT_ADDBA_REQUESTED_MSK bit, only if the former is clear should it do anything. Cc: Linus Torvalds <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-18Merge branch 'master' of ↵David S. Miller17-291/+742
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2009-11-18Phonet: convert devices list to RCURémi Denis-Courmont2-25/+44
Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-18sysctl: Drop & in front of every proc_handler.Eric W. Biederman8-46/+46
For consistency drop & in front of every proc_handler. Explicity taking the address is unnecessary and it prevents optimizations like stubbing the proc_handlers to NULL. Cc: Alexey Dobriyan <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]>
2009-11-18net: device name allocation cleanupsOctavian Purdila1-45/+24
Signed-off-by: Octavian Purdila <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-18netns: net_identifiers should be read_mostlyEric Dumazet9-9/+9
Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-18linkwatch: linkwatch_forget_dev() to speedup device dismantleEric Dumazet2-37/+60
Herbert Xu a écrit : > On Tue, Nov 17, 2009 at 04:26:04AM -0800, David Miller wrote: >> Really, the link watch stuff is just due for a redesign. I don't >> think a simple hack is going to cut it this time, sorry Eric :-) > > I have no objections against any redesigns, but since the only > caller of linkwatch_forget_dev runs in process context with the > RTNL, it could also legally emit those events. Thanks guys, here an updated version then, before linkwatch surgery ? In this version, I force the event to be sent synchronously. [PATCH net-next-2.6] linkwatch: linkwatch_forget_dev() to speedup device dismantle time ip link del eth3.103 ; time ip link del eth3.104 ; time ip link del eth3.105 real 0m0.266s user 0m0.000s sys 0m0.001s real 0m0.770s user 0m0.000s sys 0m0.000s real 0m1.022s user 0m0.000s sys 0m0.000s One problem of current schem in vlan dismantle phase is the holding of device done by following chain : vlan_dev_stop() -> netif_carrier_off(dev) -> linkwatch_fire_event(dev) -> dev_hold() ... And __linkwatch_run_queue() runs up to one second later... A generic fix to this problem is to add a linkwatch_forget_dev() method to unlink the device from the list of watched devices. dev->link_watch_next becomes dev->link_watch_list (and use a bit more memory), to be able to unlink device in O(1). After patch : time ip link del eth3.103 ; time ip link del eth3.104 ; time ip link del eth3.105 real 0m0.024s user 0m0.000s sys 0m0.000s real 0m0.032s user 0m0.000s sys 0m0.001s real 0m0.033s user 0m0.000s sys 0m0.000s Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-18ipv4: factorize cache clearing for batched unregister operationsOctavian Purdila1-5/+6
Signed-off-by: Octavian Purdila <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-18net: introduce NETDEV_UNREGISTER_PERNETOctavian Purdila1-2/+27
This new event is called once for each unique net namespace in batched unregister operations (with the argument set to a random device from that namespace) and once per device in non-batched unregister operations. It allows us to factorize some device unregister work such as clearing the routing cache. Signed-off-by: Octavian Purdila <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-17vlan: Precise RX stats accountingEric Dumazet3-11/+65
With multi queue devices, its possible that several cpus call vlan RX routines simultaneously for the same vlan device. We update RX stats counter without any locking, so we can get slightly wrong counters. One possible fix is to use percpu counters, to get precise accounting and also get guarantee of no cache line ping pongs between cpus. Note: this adds 16 bytes (32 bytes on 64bit arches) of percpu data per vlan device. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-17net: add dev_txq_stats_fold() helperEric Dumazet1-19/+29
Some drivers ndo_get_stats() method need to perform txqueue stats folding. Move folding from dev_get_stats() to a new dev_txq_stats_fold() function Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-17vlan: Fix register_vlan_dev() error pathEric Dumazet1-2/+5
In case register_netdevice() returns an error, and a new vlan_group was allocated and inserted in vlan_group_hash[] we call vlan_group_free() without deleting group from hash table. Future lookups can give infinite loops or crashes. We must delete the vlan_group using RCU safe procedure. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-17gro: Fix illegal merging of trailer trashHerbert Xu1-1/+2
When we've merged skb's with page frags, and subsequently receive a trailer skb (< MSS) that is not completely non-linear (this can occur on Intel NICs if the packet size falls below the threshold), GRO ends up producing an illegal GSO skb with a frag_list. This is harmless unless the skb is then forwarded through an interface that requires software GSO, whereupon the GSO code will BUG. This patch detects this case in GRO and avoids merging the trailer skb. Reported-by: Mark Wagner <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-17act_mirred: optimization.Changli Gao1-31/+29
move checking if eaction is valid in tcf_mirred_init() Signed-off-by: Changli Gao <[email protected]> Signed-off-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-17act_mirred: cleanupChangli Gao1-26/+33
1. don't let go back using goto. 2. don't call skb_act_clone() until it is necessary. 3. one exit of the critical context. Signed-off-by: Changli Gao <[email protected]> Signed-off-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-17Phonet: missing rcu_dereference()Rémi Denis-Courmont1-1/+1
Reported-by: Paul E. McKenney <[email protected]> Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-17netlink: remove subscriptions check on notifierJohannes Berg1-1/+1
The netlink URELEASE notifier doesn't notify for sockets that have been used to receive multicast but it should be called for such sockets as well since they might _also_ be used for sending and not solely for receiving multicast. We will need that for nl80211 (generic netlink sockets) in the future. Signed-off-by: Johannes Berg <[email protected]> Cc: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-17Merge commit 'v2.6.32-rc7'Eric W. Biederman9-88/+104
Resolve the conflict between v2.6.32-rc7 where dn_def_dev_handler gets a small bug fix and the sysctl tree where I am removing all sysctl strategy routines.
2009-11-17Merge branch 'master' of ↵David S. Miller9-42/+68
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/can/Kconfig
2009-11-16mac80211: Do not queue Probe Request frames for station MLMEJouni Malinen1-1/+0
Cooked monitor interfaces cannot currently receive Probe Request frames when the interface is in station mode. However, we do not process Probe Request frames internally in the station MLME, so there is no point in queueing the frame here. Remove Probe Request frames from the queued frame list to allow cooked monitor interfaces to receive these frames. Signed-off-by: Jouni Malinen <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-16net: Fix the rollback test in dev_change_name()Eric Dumazet1-5/+6
net: Fix the rollback test in dev_change_name() In dev_change_name() an err variable is used for storing the original call_netdevice_notifiers() errno (negative) and testing for a rollback error later, but the test for non-zero is wrong, because the err might have positive value as well - from dev_alloc_name(). It means the rollback for a netdevice with a number > 0 will never happen. (The err test is reordered btw. to make it more readable.) Signed-off-by: Jarek Poplawski <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-15remove deprecated and not used: print_mac()Marin Mitov1-7/+0
The function print_mac in net/ethernet/eth.c is marked __deprecated and not used. Remove it. Signed-off-by: Marin Mitov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-15vlan: Use __vlan_hwaccel_put_tag() in rxEric Dumazet1-2/+2
Commit 05423b241311c9380 (vlan: allow null VLAN ID to be used) forgot to update __vlan_hwaccel_rx() & vlan_gro_common() We need to set VLAN_TAG_PRESENT flag in skb->vlan_tci Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-15net: Optimize hard_start_xmit() return checkingJarek Poplawski2-35/+5
Recent changes in the TX error propagation require additional checking and masking of values returned from hard_start_xmit(), mainly to separate cases where skb was consumed. This aim can be simplified by changing the order of NETDEV_TX and NET_XMIT codes, because the latter are treated similarly to negative (ERRNO) values. After this change much simpler dev_xmit_complete() is also used in sch_direct_xmit(), so it is moved to netdevice.h. Additionally NET_RX definitions in netdevice.h are moved up from between TX codes to avoid confusion while reading the TX comment. Signed-off-by: Jarek Poplawski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-15net: check the return value of ndo_select_queue()Eric Dumazet1-0/+15
Check the return value of ndo_select_queue(). If the value isn't smaller than the real_num_tx_queues, print a warning message, and reset it to zero. Signed-off-by: Changli Gao <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> ---- Signed-off-by: David S. Miller <[email protected]>
2009-11-15Merge branch 'master' of ↵David S. Miller2-4/+10
git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6
2009-11-16Bluetooth: Fix regression with L2CAP configuration in Basic ModeGustavo F. Padovan1-3/+8
Basic Mode is the default mode of operation of a L2CAP entity. In this case the RFC (Retransmission and Flow Control) configuration option should not be used at all. Normally remote L2CAP implementation should just ignore this option, but it can cause various side effects with other Bluetooth stacks that are not capable of handling unknown options. Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2009-11-16Bluetooth: Select Basic Mode as default for SOCK_SEQPACKETGustavo F. Padovan1-1/+1
The default mode for SOCK_SEQPACKET is Basic Mode. So when no mode has been specified, Basic Mode shall be used. This is important for current application to keep working as expected and not cause a regression. Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2009-11-16Bluetooth: Set general bonding security for ACL by defaultAndrei Emeltchenko1-0/+1
This patch fixes double pairing issues with Secure Simple Paring support. It was observed that when pairing with SSP enabled, that the confirmation will be asked twice. http://www.spinics.net/lists/linux-bluetooth/msg02473.html This also causes bug when initiating SSP connection from Windows Vista. The reason is because bluetoothd does not store link keys since HCIGETAUTHINFO returns 0. Setting default to general bonding fixes these issues. Signed-off-by: Andrei Emeltchenko <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2009-11-14Merge branch 'for-next' of ↵David S. Miller1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan
2009-11-13Phonet: convert routing table to RCURémi Denis-Courmont1-25/+34
Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-13Phonet: put protocols array under RCURémi Denis-Courmont1-9/+11
Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-13iucv: add work_queue cleanup for suspendUrsula Braun1-3/+13
If iucv_work_queue is not empty during kernel freeze, a kernel panic occurs. This suspend-patch adds flushing of the work queue for pending connection requests and severing of remaining pending connections. Signed-off-by: Ursula Braun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-13inetpeer: Optimize inet_getid()Eric Dumazet3-13/+10
While investigating for network latencies, I found inet_getid() was a contention point for some workloads, as inet_peer_idlock is shared by all inet_getid() users regardless of peers. One way to fix this is to make ip_id_count an atomic_t instead of __u16, and use atomic_add_return(). In order to keep sizeof(struct inet_peer) = 64 on 64bit arches tcp_ts_stamp is also converted to __u32 instead of "unsigned long". Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-13ipv6: speedup inet6_dump_addr()Eric Dumazet1-74/+97
When handling large number of netdevices, inet6_dump_addr() is very slow because it has O(N^2) complexity. Instead of scanning one single list, we can use the NETDEV_HASHENTRIES sub lists of the dev_index hash table, and RCU lookups. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-13ipv4: speedup inet_dump_ifaddr()Eric Dumazet1-23/+38
Stephen Hemminger a écrit : > On Thu, 12 Nov 2009 15:11:36 +0100 > Eric Dumazet <[email protected]> wrote: > >> When handling large number of netdevices, inet_dump_ifaddr() >> is very slow because it has O(N^2) complexity. >> >> Instead of scanning one single list, we can use the NETDEV_HASHENTRIES >> sub lists of the dev_index hash table, and RCU lookups. >> >> Signed-off-by: Eric Dumazet <[email protected]> > > You might be able to make RCU critical section smaller by moving > it into loop. > Indeed. But we dump at most one skb (<= 8192 bytes ?), so rcu_read_lock holding time is small, unless we meet many netdevices without addresses. I wonder if its really common... Thanks [PATCH net-next-2.6] ipv4: speedup inet_dump_ifaddr() When handling large number of netdevices, inet_dump_ifaddr() is very slow because it has O(N2) complexity. Instead of scanning one single list, we can use the NETDEV_HASHENTRIES sub lists of the dev_index hash table, and RCU lookups. Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-11-13igmp: Use next_net_device_rcu()Eric Dumazet1-16/+11
We need to use next_det_device_rcu() in RCU protected section. We also can avoid in_dev_get()/in_dev_put() overhead (code size mainly) in rcu_read_lock() sections. Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>