summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* net: ip_vs_proto_{tcp,udp} build fixStephen Rothwell2008-09-122-0/+2
| | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* multiq: Further multiqueue cleanupAlexander Duyck2008-09-121-4/+9
| | | | | | | | | This patch resolves a few issues found with multiq including wording suggestions and a problem seen in the allocation of queues. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* pkt_action: add new action skbeditAlexander Duyck2008-09-123-0/+215
| | | | | | | | | This new action will have the ability to change the priority and/or queue_mapping fields on an sk_buff. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* pkt_sched: Add multiqueue scheduler supportAlexander Duyck2008-09-123-0/+477
| | | | | | | | | | | | | | | This patch is intended to add a qdisc to support the new tx multiqueue architecture by providing a band for each hardware queue. By doing this it is possible to support a different qdisc per physical hardware queue. This qdisc uses the skb->queue_mapping to select which band to place the traffic onto. It then uses a round robin w/ a check to see if the subqueue is stopped to determine which band to dequeue the packet from. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp_ipv6: fix use of uninitialized memoryVegard Nossum2008-09-121-1/+2
| | | | | | | | | | | | | | | | | | inet6_rsk() is called on a struct request_sock * before we have checked whether the socket is an ipv6 socket or a ipv6- mapped ipv4 socket. The access that triggers this is the inet_rsk(rsk)->inet6_rsk_offset dereference in inet6_rsk(). This is arguably not a critical error as the inet6_rsk_offset is only used to compute a pointer which is never really used (in the code path in question) anyway. But it might be a latent error, so let's fix it. Spotted by kmemcheck. Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: fix scheduling of dst_gc_task by __dst_freeBenjamin Thery2008-09-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dst garbage collector dst_gc_task() may not be scheduled as we expect it to be in __dst_free(). Indeed, when the dst_gc_timer was replaced by the delayed_work dst_gc_work, the mod_timer() call used to schedule the garbage collector at an earlier date was replaced by a schedule_delayed_work() (see commit 86bba269d08f0c545ae76c90b56727f65d62d57f). But, the behaviour of mod_timer() and schedule_delayed_work() is different in the way they handle the delay. mod_timer() stops the timer and re-arm it with the new given delay, whereas schedule_delayed_work() only check if the work is already queued in the workqueue (and queue it (with delay) if it is not) BUT it does NOT take into account the new delay (even if the new delay is earlier in time). schedule_delayed_work() returns 0 if it didn't queue the work, but we don't check the return code in __dst_free(). If I understand the code in __dst_free() correctly, we want dst_gc_task to be queued after DST_GC_INC jiffies if we pass the test (and not in some undetermined time in the future), so I think we should add a call to cancel_delayed_work() before schedule_delayed_work(). Patch below. Or we should at least test the return code of schedule_delayed_work(), and reset the values of dst_garbage.timer_inc and dst_garbage.timer_expires back to their former values if schedule_delayed_work() failed. Otherwise the subsequent calls to __dst_free will test the wrong values and assume wrong thing about when the garbage collector is supposed to be scheduled. dst_gc_task() also calls schedule_delayed_work() without checking its return code (or calling cancel_scheduled_work() first), but it should fine there: dst_gc_task is the routine of the delayed_work, so no dst_gc_work should be pending in the queue when it's running. Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vlan: vlan device not reading gso max size of parent.Alexander Duyck2008-09-112-0/+2
| | | | | | | | | | | | | The vlan devices are not reading the gso max size of the parent device. As a result devices that do not support 64K max gso size are currently failing. This issue is seen on 2.6.26 kernels as well and the same patch should be able to be applied without any issues. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2008-09-1112-2865/+3029
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
| * mac80211: Reorder debugfs calls during netdev deinitJouni Malinen2008-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | ieee80211_free_keys() must be called before ieee80211_debugfs_remove_netdev() in order to make sure that the possible default_key symlink is removed before attempting to remove the netdev debugfs directory. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: move frame TX functionJohannes Berg2008-09-118-30/+30
| | | | | | | | | | | | | | | | | | The ieee80211_sta_tx function isn't MLME code any more, it's getting used by a lot of code. Move it to utils and rename it to ieee80211_tx_skb. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: make ieee80211_rx_h_mgmt more readableJohannes Berg2008-09-111-8/+8
| | | | | | | | | | | | | | | | | | That function isn't exactly easy to read especially since it does something in an if branch that continues after the if because the else returns. Express it in a more readable way. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: move spectrum management code outJohannes Berg2008-09-115-89/+114
| | | | | | | | | | | | | | | | | | | | Like the HT code, this doesn't depend on the STA-mode implementation and can be handled entirely independently. There's only stub code for now, but when it gets filled having it in its own file will be beneficial. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: make BA session handling independent of STA modeJohannes Berg2008-09-114-362/+380
| | | | | | | | | | | | | | | | | | | | | | The aggregation handling isn't dependent on anything related to our STA-mode implementation, and doesn't need to depend on it for frame processing. This patch moves the relevant code to ht.c and adds a hook in rx.c. For now, the relevant action frames are only processed in STA/IBSS modes, but that's now something we can easily change. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: initialise queue QoS parameters at hw startJohannes Berg2008-09-114-27/+35
| | | | | | | | | | | | | | | | | | | | When hardware is started it might be in a confused state with respect to queue QoS parameters. This patch changes mac80211 to set sane defaults right after the hardware is brought up. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: split ieee80211_sta_def_wmm_paramsJohannes Berg2008-09-111-21/+27
| | | | | | | | | | | | | | | | Cleans up the code a bit and prepares for the next patch that will use the function elsewhere. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: consolidate deauth/disassocJohannes Berg2008-09-111-36/+11
| | | | | | | | | | | | | | | | | | deauth and disassoc frames are completely identical so there's little point in having two functions to send them rather than one that gets a parameter. This same a bit of code size. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: reorder frame code in mlmeJohannes Berg2008-09-111-389/+387
| | | | | | | | | | | | | | | | | | | | | | This reorders all frame sending functions to be at the top of the file. When reading the file, I tend to be looking at either the frame code or the state machine, and having them mixed in the file is confusing. When all frame sending is at the top the remainder of the file is more readable, in my opinion. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: remove useless 'ibss' parameterJohannes Berg2008-09-111-4/+3
| | | | | | | | | | | | | | | | | | Ever since we refactored beaconing to not be controlled by a fake queue this parameter to ieee80211_sta_def_wmm_params has been unused. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: simplify scan startJohannes Berg2008-09-111-4/+1
| | | | | | | | | | | | | | | | ieee80211_sta_start_scan() can very well take a non-NULL ssid pointer with a zero ssid_len. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: clarify scan requestJohannes Berg2008-09-111-1/+10
| | | | | | | | | | | | | | | | | | | | When a scan is requested for non-STA interfaces, we simply fire off a scan, but for STA interfaces we shouldn't because they could be in the middle of an association. This clarifies the corresponding code. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: move some HT code out of main.cJohannes Berg2008-09-112-375/+375
| | | | | | | | | | | | | | | | Now that I've created ht.c, I can move the aggregation code from main.c into it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: move some HT code out of mlme.cJohannes Berg2008-09-113-321/+329
| | | | | | | | | | | | | | | | | | Some of the HT code in mlme.c is misplaced: * constants/definitions belong to the ieee80211.h header * code being used in other modes as well shouldn't be there Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: move BSS handling to scan codeJohannes Berg2008-09-113-308/+313
| | | | | | | | | | | | | | | | | | This moves all the BSS list handling out of mlme.c to scan.c, no further changes except fixing kzalloc/atomic_inc/atomic_inc to kzalloc/atomic_set(2). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: refactor and move scan RX codeJohannes Berg2008-09-113-136/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch refactors some code and moves the scan RX function to scan.c. More importantly, however, it changes it so that the MLME's beacon/probe_resp functions aren't invoked when scanning so that we can remove a "if (scanning)" conditions from two places. There's a very slight behavioural change in this patch: now, when scanning, IBSS and mesh aren't updated even on the same channel. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: start moving scan code from mlmeJohannes Berg2008-09-114-544/+582
| | | | | | | | | | | | | | | | | | Here's a first patch to move some code from mlme.c to a new file called scan.c. The end result will hopefully be a more manageable mlme.c. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: remove useless non-NULL tests from scan results codeJohannes Berg2008-09-111-22/+18
| | | | | | | | | | | | | | I'm surprised nobody complained about these before. What a waste. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: use sdata pointer for scan interfaceJohannes Berg2008-09-113-15/+13
| | | | | | | | | | | | | | | | | | Since we now use sdata pointers most of the time, using a netdev pointer here is somewhat artificial, use an sdata pointer instead. Replace a netdev-prefix in a few messages by a wiphy-prefix. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: reorder mlme codeJohannes Berg2008-09-111-530/+500
| | | | | | | | | | | | | | | | | | This reorders the mlme code a bit so we don't need all the forward function declarations. It also removes the ERP_INFO_USE_PROTECTION define that is unused, but otherwise contains no real changes. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: stop queues before carrier offTomas Winkler2008-09-111-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | During testing of the disassociation fixes, Tomas noticed that it was possible to run into a situation where you'd suddenly get a few "wlan0: dropped frame to <AP> (unauthorized port)" messages and I found this to be due to the AP's sta_info having been removed but netif_carrier_off not having removed/stopped traffic yet. To avoid that, stop the queue for the interface (and avoid bringing them up when another vif scans when they weren't up.) Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: remove disassociation code from ieee80211_set_associatedTomas Winkler2008-09-111-46/+56
| | | | | | | | | | | | | | | | | | | | | | | | This patch moves disassociation code from ieee80211_set_associated to ieee80211_set_disassoc. To reduce code duplication, it introduces the ieee80211_sta_send_apinfo function. Additionally, it fixes a lapse where BSS_CHANGED_HT wasn't set when notifying the driver of changes due to disassociation. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: disassociate when moving to new BSSTomas Winkler2008-09-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the MLME cleanly disassociate from the current BSS when leaving it for a new one. This is not just nicer to the old AP (we're leaving it, might as well tell it!) but also required for some drivers that keep track of the station we're associated with, they'd get confused because they'd think we are associated with two APs. Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: restructure disassoc/deauth flowsTomas Winkler2008-09-111-31/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch restructure the flow of disassociation and deauthentication flows to be consistent under all circumstances. It ensures that BA session is treated down before deauthentication or disassociation, adds the removal of the obsolete sta form station table and fixes a related bug (sta_info_destroy without sta_info_unlink) in ieee80211_associated() and reduce some code duplication Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: move IE parsing to util fileJohannes Berg2008-09-112-145/+144
| | | | | | | | | | | | | | | | | | Since IE parsing is required for the mlme and mesh code, it's not a static function anyway, and it's much better to have it in util rather than the overly large mlme.c Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: fix typo in action frame handlingJohannes Berg2008-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | This says chan_switch.action_code but really means measurement.action_code, of course the actual offset in the frame is the same, it's just harder to understand this way. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: fix action frame length checksJohannes Berg2008-09-113-2/+11
| | | | | | | | | | | | | | | | | | | | The action frame length checks are one too small, there's not just an action code as the comment makes you believe, there's a category code too, and the category code is required in each action frame (hence part of IEEE80211_MIN_ACTION_SIZE). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: BSS info: check channel firstJohannes Berg2008-09-111-11/+11
| | | | | | | | | | | | | | | | | | | | | | When we receive information about a BSS we check at some point whether or not we think we're allowed to use the channel it is on, but we do that fairly late. I don't think we should do it that late, so do it earlier to avoid doing IBSS/mesh stuff on that channel and then getting confused because it's disabled. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: make conf_tx non-atomicJohannes Berg2008-09-111-5/+8
| | | | | | | | | | | | | | | | | | | | | | The conf_tx callback currently needs to be atomic, this requirement is just because it can be called from scanning. This rearranges it slightly to only update while not scanning (which is fine, we'll be getting beacons when associated) and thus removes the atomic requirement. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: move some RCU locking into an if branchJohannes Berg2008-09-111-5/+4
| | | | | | | | | | | | | | | | | | The if itself doesn't need to be protected, so move in the RCU locking to avoid doing anything at all when the condition isn't true. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: change MIMO_PS to SM_PSTomas Winkler2008-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch follows 11n spec naming more rigorously replacing MIMO_PS with SM_PS (Spatial Multiplexing Power Save). (Originally submitted as 4 patches, "mac80211: change MIMO_PS to SM_PS", "iwlwifi: change MIMO_PS to SM_PS", "ath9k: change MIMO_PS to SM_PS", and "iwlwifi: remove double definition of SM PS". -- JWL) Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | net: Add SKB DMA mapping helper functions.David S. Miller2008-09-112-0/+67
|/ | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: On interface down/unregister, purge icmp routes too.David S. Miller2008-09-101-0/+20
| | | | | | | | | | | | | | | | | Johannes Berg reported that occaisionally, bringing an interface down or unregistering it would hang for up to 30 seconds. Using debugging output he provided it became clear that ICMP6 routes were the culprit. The problem is that ICMP6 routes live in their own world totally separate from normal ipv6 routes. So there are all kinds of special cases throughout the ipv6 code to handle this. While we should really try to unify all of this stuff somehow, for the time being let's fix this by purging the ICMP6 routes that match the device in question during rt6_ifdown(). Signed-off-by: David S. Miller <davem@davemloft.net>
* ipsec: Add missing list_del() in xfrm_state_gc_task().David S. Miller2008-09-091-0/+1
| | | | | | | Otherwise entries stay on the GC todo list forever, even after we free them. Signed-off-by: David S. Miller <davem@davemloft.net>
* ipsec: Use RCU-like construct for saved state within a walkHerbert Xu2008-09-091-13/+39
| | | | | | | | | | | | | | | | | Now that we save states within a walk we need synchronisation so that the list the saved state is on doesn't disappear from under us. As it stands this is done by keeping the state on the list which is bad because it gets in the way of the management of the state life-cycle. An alternative is to make our own pseudo-RCU system where we use counters to indicate which state can't be freed immediately as it may be referenced by an ongoing walk when that resumes. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'lvs-next-2.6' of ↵David S. Miller2008-09-0922-726/+2231
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/horms/lvs-2.6
| * Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 into ↵Simon Horman2008-09-1051-256/+415
| |\ | | | | | | | | | lvs-next-2.6
| * | ipvs: Embed user stats structure into kernel stats structureSven Wegener2008-09-093-67/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of duplicating the fields, integrate a user stats structure into the kernel stats structure. This is more robust when the members are changed, because they are now automatically kept in sync. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Reviewed-by: Julius Volz <juliusv@google.com> Signed-off-by: Simon Horman <horms@verge.net.au>
| * | ipvs: Restrict connection table size via KconfigSven Wegener2008-09-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of checking the value in include/net/ip_vs.h, we can just restrict the range in our Kconfig file. This will prevent values outside of the range early. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Reviewed-by: Julius Volz <juliusv@google.com> Signed-off-by: Simon Horman <horms@verge.net.au>
| * | IPVS: Remove incorrect ip_route_me_harder(), fix IPv6Julius Volz2008-09-091-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove an incorrect ip_route_me_harder() that was probably a result of merging my IPv6 patches with the local client patches. With this, IPv6+NAT are working again. Signed-off-by: Julius Volz <juliusv@google.com> Signed-off-by: Simon Horman <horms@verge.net.au>
| * | ipvs: handle PARTIAL_CHECKSUMSimon Horman2008-09-092-4/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that LVS can load balance locally generated traffic, packets may come from the loopback device and thus may have a partial checksum. The existing code allows for the case where there is no checksum at all for TCP, however Herbert Xu has confirmed that this is not legal. Signed-off-by: Simon Horman <horms@verge.net.au> Acked-by: Julius Volz <juliusv@google.com>
| * | IPVS: use ipv6_addr_copy()Simon Horman2008-09-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is standard to use ipv6_addr_copy() to fill in the in6 element of a union nf_inet_addr snet. Thanks to Julius Volz for pointing this out. Cc: Brian Haley <brian.haley@hp.com> Signed-off-by: Simon Horman <horms@verge.net.au> Acked-by: Julius Volz <juliusv@google.com>
OpenPOWER on IntegriCloud