summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* [IPV6] SYSCTL: complete initialization for sysctl table in subsystem code.YOSHIFUJI Hideaki2008-03-043-14/+19
| | | | | | | | | Move initialization bits for subsystem sysctl tables to appropriate functions. - route - icmp Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Move packet_type{} related bits to af_inet6.c.YOSHIFUJI Hideaki2008-03-042-122/+123
| | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6] UDP: Rename IPv6 UDP files.YOSHIFUJI Hideaki2008-03-043-2/+2
| | | | | | | Rename net/ipv6/udp.c to net/ipv6/udp_ipv6.c Rename net/ipv6/udplite.c to net/ipv6/udplite_ipv6.c. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV4] UDP: Move IPv4-specific bits to other file.YOSHIFUJI Hideaki2008-03-044-1088/+1136
| | | | | | | Move IPv4-specific UDP bits from net/ipv4/udp.c into (new) net/ipv4/udp_ipv4.c. Rename net/ipv4/udplite.c to net/ipv4/udplite_ipv4.c. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV4]: Fix size description of CONFIG_INET.YOSHIFUJI Hideaki2008-03-041-1/+1
| | | | | | CONFIG_INET now enlarges about 400KB, not 140KB. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [UDP]: Allow users to configure UDP-Lite.YOSHIFUJI Hideaki2008-03-0410-23/+71
| | | | | | | | | | | | | | | | Let's give users an option for disabling UDP-Lite (~4K). old: | text data bss dec hex filename | 286498 12432 6072 305002 4a76a net/ipv4/built-in.o | 193830 8192 3204 205226 321aa net/ipv6/ipv6.o new (without UDP-Lite): | text data bss dec hex filename | 284086 12136 5432 301654 49a56 net/ipv4/built-in.o | 191835 7832 3076 202743 317f7 net/ipv6/ipv6.o Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [TCP]: Add IPv6 support to TCP SYN cookiesGlenn Griffin2008-03-047-26/+330
| | | | | | | | | Updated to incorporate Eric's suggestion of using a per cpu buffer rather than allocating on the stack. Just a two line change, but will resend in it's entirety. Signed-off-by: Glenn Griffin <ggriffin.kernel@gmail.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [TCP]: lower stack usage in cookie_hash() functionEric Dumazet2008-03-041-1/+3
| | | | | | | | 400 bytes allocated on stack might be a litle bit too much. Using a per_cpu var is more friendly. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [ARP]: Introduce the arp_hdr_len helper.Pavel Emelyanov2008-03-034-18/+7
| | | | | | | | | | | | | | There are some place, that calculate the ARP header length. These calculations are correct, but a) some operate with "magic" constants, b) enlarge the code length (sometimes at the cost of coding style), c) are not informative from the first glance. The proposal is to introduce a helper, that includes all the good sides of these calculations. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: fix inet6_init/icmpv6_cleanup sections mismatchAlexey Dobriyan2008-03-031-2/+2
| | | | | Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
* [TCP]: Merge exit paths in tcp_v4_conn_request.Denis V. Lunev2008-03-031-10/+6
| | | | | Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: seq_printf format warning. (fixed)Denis V. Lunev2008-03-031-1/+1
| | | | | | | sctp_association->hbinterval is unsigned long. Replace %8d with %8lu. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV4]: skb->dst can't be NULL in ip_options_echo.Denis V. Lunev2008-03-031-4/+1
| | | | | | | | | ip_options_echo is called on the packet input path after the initial routing. The dst entry on the packet is cleared only in the several very specific places and immidiately assigned back (may be new). Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ICMP]: Section conflict between icmp_sk_init/icmp_sk_exit.Denis V. Lunev2008-02-291-1/+3
| | | | | | | | Functions from __exit section should not be called from ones in __init section. Fix this conflict. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2008-02-2934-1946/+3201
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.26
| * mac80211: fix key replacing, hw accelJohannes Berg2008-02-291-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though I thought about it a lot and had also tested it, some of my recent changes in the key code broke replacing keys, making the kernel oops because a key is removed from a list while not on it. This patch fixes that using the list as an indication whether or not the key is on it (an empty list means it's not on any list.) Also, this patch fixes hw accel enabling, the check for not doing hw accel when the interface is down was lost and is restored by this. Additionally, move adding the key to the list into the function __ieee80211_key_replace() for more consistency. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: split ieee80211_key_alloc/freeJohannes Berg2008-02-295-98/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to RCU-ify sta_info, we need to be able to allocate a key without linking it to an sdata/sta structure (because allocation cannot be done in an rcu critical section). This patch splits up ieee80211_key_alloc() and updates all users appropriately. While at it, this patch fixes a number of race conditions such as finally making key replacement atomic, unfortunately at the expense of more complex code. Note that this patch documents /existing/ bugs with sta info and key interaction, there is currently a race condition when a sta info is freed without holding the RTNL. This will finally be fixed by a followup patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: remove STA infos last_ack stuffJohannes Berg2008-02-294-39/+0
| | | | | | | | | | | | | | | | | | | | These things aren't used and the only possible use is within rate control algorithms, however those can, if they need it, keep track of it in their private data. last_ack_ms isn't even updated so completely useless. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: safely free beacon in ieee80211_if_reinitJohannes Berg2008-02-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | If ieee80211_if_reinit() is called from ieee80211_unregister_hw() then it is possible that the driver will still request a beacon (it is allowed to until ieee80211_unregister_hw() has returned.) This means we need to use an RCU-protected write to the beacon information even in this function. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: fix IBSS codeJohannes Berg2008-02-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes two errors introduced by commit 19d35612f3cd7f60dd9174c0100584e21f5a1025 Author: Bruno Randolf <bruno@thinktube.com> Date: Mon Feb 18 11:21:36 2008 +0900 mac80211: enable IBSS merging The first error is an endianness problem that sparse found and the second is a build failure when CONFIG_MAC80211_IBSS_DEBUG is not set. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Bruno Randolf <bruno@thinktube.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: fix debugfs_sta print_mac() warningJohannes Berg2008-02-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | When print_mac() was marked as __pure to avoid emitting a function call in pr_debug() scenarios, a warning in this code surfaced since it relies on the fact that the buffer is modified and doesn't use the return value. This patch makes it use the return value instead. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Reported-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: Disallow concurrent IBSS/STA mode interfacesJohannes Berg2008-02-291-4/+47
| | | | | | | | | | | | | | | | | | | | | | Disallow having more than one IBSS interface up at any time because of beacon distribution issues, and for now also disallow having more than one IBSS/STA interface up at the same time because we use the master interface's BSS struct which would be completely corrupted when we have more than one up. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: atomically check whether STA exists alreadyJohannes Berg2008-02-295-27/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a STA structure is added, it is often checked whether it already exists before adding it. This, however, isn't done atomically so there is a race condition that could lead to two STA structures being added with the same MAC address. This patch changes sta_info_add() to return an ERR_PTR in case of failure and adds the failure mode -EEXIST when the STA already exists. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: rework TX filtered frame codeJohannes Berg2008-02-293-50/+89
| | | | | | | | | | | | | | | | | | | | | | This reworks the code for TX filtered frames, splitting it out to a new function to handle those cases, making the clear instruction a flag and renaming a few things to be easier to understand and less Atheros hardware specific. Finally, it also makes the comments explain more. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: fix incorrect use of CONFIG_MAC80211_IBSS_DEBUGPavel Roskin2008-02-291-1/+3
| | | | | | | | | | | | | | Configuration variables are only available to the preprocessor Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: consolidate TIM handling codeJohannes Berg2008-02-295-83/+84
| | | | | | | | | | | | | | | | | | | | This consolidates all TIM handling code to avoid re-introducing errors with the bitmap/set_tim order and to reduce code. While reading the code I noticed a possible problem so I also added a comment about that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: remove sta TIM flag, fix expiry TIM handlingJohannes Berg2008-02-295-25/+28
| | | | | | | | | | | | | | | | | | | | | | The TIM flag that is kept in each station's info is completely useless, there's no code (aside from the debugfs display code) checking it, hence it can be removed. While doing that, I noticed that the TIM handling is broken when buffered frames expire, so fix that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: invoke set_tim() callback after setting own TIM infoJohannes Berg2008-02-293-8/+8
| | | | | | | | | | | | | | | | | | | | | | Drivers should be allowed to simply get a complete new beacon when set_tim() is invoked (and set_tim() is required for drivers that just want a beacon template!), so we need to update our own TIM bitmap before calling set_tim() so that getting the beacon will now get an already updated beacon. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * wireless: update US regulatory domainTomas Winkler2008-02-291-2/+8
| | | | | | | | | | | | | | This patch adds channels to US regulatory domain Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: convert sta_info.pspoll to a flagJohannes Berg2008-02-293-9/+12
| | | | | | | | | | | | | | | | This doesn't really need to be a full int variable since it's just a flag to indicate a PS-poll is in progress. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: enable IBSS mergingBruno Randolf2008-02-292-30/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enable IBSS cell merging. if an IBSS beacon with the same channel, same ESSID and a TSF higher than the local TSF (mactime) is received, we have to join its BSSID. while this might not be immediately apparent from reading the 802.11 standard it is compliant and necessary to make IBSS mode functional in many cases. most drivers have a similar behaviour. * move the relevant code section (previously only containing debug code) down to the end of the function, so we can reuse the bss structure. * we have to compare the mactime (TSF at the time of packet receive) rather than the current TSF. since mactime is defined as the time the first data symbol arrived we add the time until byte 24 where the timestamp resides, since this is how the beacon timestamp is defined. as some some drivers are not able to give a reliable mactime we fall back to use the current TSF, which will be enough to catch most (but not all) cases where an IBSS merge is necessary. * in IBSS mode we want to allow beacons to override probe response info so we can correctly do merges. * we don't only configure beacons based on scan results, so change that message. * to enable this we have to let all beacons thru in IBSS mode, even if they have a different BSSID. Signed-off-by: Bruno Randolf <bruno@thinktube.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: move function ieee80211_sta_join_ibss()Bruno Randolf2008-02-291-158/+159
| | | | | | | | | | | | | | | | this moves ieee80211_sta_join_ibss() up for the next patch (ibss merge). Signed-off-by: Bruno Randolf <bruno@thinktube.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * net/mac80211/: Use time_* macrosS.Çağlar Onur2008-02-292-2/+4
| | | | | | | | | | | | | | | | | | | | The functions time_before, time_before_eq, time_after, and time_after_eq are more robust for comparing jiffies against other values. So following patch implements usage of the time_after() macro, defined at linux/jiffies.h, which deals with wrapping correctly Cc: linux-wireless@vger.kernel.org Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: fix ecw2cw brain-damageJohannes Berg2008-02-291-6/+1
| | | | | | | | | | | | | | This brain-damaged code just bothers me, fix it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: give burst time in txop rather than 0.1msec unitsJohannes Berg2008-02-291-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This changes mac80211 to pass the burst time to conf_tx in txop units rather than 0.1msec units. 0.1msec units are only required by atheros hardware (according to current driver support), all other drivers do other calculations or require the txop value. Therefore, it results in fewer calculations and more precision if we just pass the txop value through to the driver. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: defer master netdev allocation to ieee80211_register_hwJohannes Berg2008-02-291-34/+38
| | | | | | | | | | | | | | | | | | | | | | When we want to go multiqueue, we will need to know the number of queues the hardware has for registering the master netdev. This number is only available in ieee80211_register_hw() rather than ieee80211_alloc_hw(), so defer allocation of the master device to ieee80211_register_hw(). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: adjustable number of bits for qdisc poolRon Rindjunsky2008-02-291-9/+9
| | | | | | | | | | | | | | | | | | This fix allows to control the number of bits that qdiscs book keeping can be done for with respect to the qdisc pool Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: Add cooked monitor mode supportMichael Wu2008-02-293-31/+126
| | | | | | | | | | | | | | | | | | | | This adds "cooked" monitor mode to mac80211. A monitor interface in "cooked" mode will see all frames that mac80211 has not used internally. Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: move some code into ieee80211_invoke_rx_handlersJohannes Berg2008-02-291-24/+18
| | | | | | | | | | | | | | | | | | There is some duplicated code that sits in front of each function call to ieee80211_invoke_rx_handlers() that can very well be part of that function if it gets slightly different arguments. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: remove "dynamic" RX/TX handlersJohannes Berg2008-02-294-61/+43
| | | | | | | | | | | | | | | | | | It doesn't really make sense to have extra pointers to the RX/TX handler arrays instead of just using the arrays directly, that also allows us to make them static. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: clean up some things in the RX pathJohannes Berg2008-02-291-27/+10
| | | | | | | | | | | | | | | | | | | | Uninline ieee80211_invoke_rx_handlers to save .text space, make the code more readable in some places and remove the "optimisation" that is hit only very few times and unclear to start with. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: Use monitor configuration flagsMichael Wu2008-02-294-16/+60
| | | | | | | | | | | | | | | | Take advantage of the monitor configuration flags now provided by cfg80211. Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * nl80211: Add monitor interface configuration flagsMichael Wu2008-02-292-4/+44
| | | | | | | | | | | | | | | | This allows precise control over what a monitor interface shows. Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: split RX_DROPJohannes Berg2008-02-295-43/+45
| | | | | | | | | | | | | | | | | | | | Some instances of RX_DROP mean that the frame was useless, others mean that the frame should be visible in userspace on "cooked" monitor interfaces. This patch splits up RX_DROP and changes each instance appropriately. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: split ieee80211_txrx_resultJohannes Berg2008-02-298-197/+204
| | | | | | | | | | | | | | | | | | | | The _DROP result will need to be split in the RX path but not in the TX path, so for preparation split up the type into two types, one for RX and one for TX. Also make sure (via sparse) that they cannot be confused. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * wireless: Fix WARN_ON() with ieee802.11bIvo van Doorn2008-02-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When the driver registers a IEEE80211_BAND_2GHZ band, it can either be 802.11b or 802.11g. But when 802.11b rates are registered "want" will be 3 (since 4 rates are being registered, and each of those 4 rates will decrease "want"). Since this is a correct situation, there is no need to trigger a WARN_ON() for this. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * wireless: fix ERP rate flagsJohannes Berg2008-02-291-4/+4
| | | | | | | | | | | | | | | | | | In the rate API patch I accidentally reverted the test for ERP rates, this fixes it. All rates except 1, 2, 5.5 and 11 MBit are ERP rates, not those. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * rc80211-pid: fix rate adjustmentStefano Brivio2008-02-291-49/+44
| | | | | | | | | | | | | | | | | | | | | | | | Merge rate_control_pid_shift_adjust() to rate_control_pid_adjust_rate() in order to make the learning algorithm aware of constraints on rates. Also add some comments and rename variables. This fixes a bug which prevented 802.11b/g non-AP STAs from working with 802.11b only AP STAs. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: remove port control enable switch, clean up sta flagsJohannes Berg2008-02-298-45/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the 802.1X port acess control enable flag since it is not required. Instead, set the authorized flag for each station that we normally communicate with (WDS peers, IBSS peers and APs we're associated to) and require hostapd to set the authorized flag for all stations when port control is not enabled. Also, since I was working in that area, this documents station flags and removes the unused "permanent" one. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: fix scan band off-by-one errorJohannes Berg2008-02-291-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | When checking for the next band to advance to, there was an off-by-one error that could lead to an access to an invalid array index. Additionally, the later check for scan_band >= IEEE80211_NUM_BANDS is not required since that will never be true. This also improves the comments related to that code. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud