summaryrefslogtreecommitdiffstats
path: root/net
AgeCommit message (Collapse)Author
2012-04-11batman-adv: don't let backbone gateways exchange tt entriesSimon Wunderlich
As the backbone gateways are connected to the same backbone, they should announce the same clients on the backbone non-exclusively. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11batman-adv: allow multiple entries in tt_global_entriesSimon Wunderlich
as backbone gateways will all independently announce the same clients, also the tt global table must be able to hold multiple originators per client entry. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11batman-adv: export claim tables through debugfsSimon Wunderlich
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11batman-adv: make bridge loop avoidance switchableSimon Wunderlich
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11batman-adv: add basic bridge loop avoidance codeSimon Wunderlich
This second version of the bridge loop avoidance for batman-adv avoids loops between the mesh and a backbone (usually a LAN). By connecting multiple batman-adv mesh nodes to the same ethernet segment a loop can be created when the soft-interface is bridged into that ethernet segment. A simple visualization of the loop involving the most common case - a LAN as ethernet segment: node1 <-- LAN --> node2 | | wifi <-- mesh --> wifi Packets from the LAN (e.g. ARP broadcasts) will circle forever from node1 or node2 over the mesh back into the LAN. With this patch, batman recognizes backbone gateways, nodes which are part of the mesh and backbone/LAN at the same time. Each backbone gateway "claims" clients from within the mesh to handle them exclusively. By restricting that only responsible backbone gateways may handle their claimed clients traffic, loops are effectively avoided. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11batman-adv: remove old bridge loop avoidance codeSimon Wunderlich
The functionality is to be replaced by an improved implementation, so first clean up. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11batman-adv: encourage batman to take shorter routes by changing the default ↵Marek Lindner
hop penalty Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11batman-adv: Remove declaration of only locally used functionsSven Eckelmann
Signed-off-by: Sven Eckelmann <sven@narfation.org> Acked-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11batman-adv: Replace bitarray operations with bitmapSven Eckelmann
bitarray.c consists mostly of functionality that is already available as part of the standard kernel API. batman-adv could use architecture optimized code and reduce the binary size by switching to the standard functions. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11batman-adv: use ETH_ALEN instead of hardcoded numeric constantsAntonio Quartulli
In packet.h the numeric constant 6 is used instead of the more portable ETH_ALEN define. This patch substitute any hardcoded value with such define. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Acked-by: Sven Eckelmann <sven@narfation.org>
2012-04-11batman-adv: clean up KconfigAntonio Quartulli
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-10Merge tag 'dmaengine-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine Pull dmaengine fixes from Dan Williams: 1/ regression fix for Xen as it now trips over a broken assumption about the dma address size on 32-bit builds 2/ new quirk for netdma to ignore dma channels that cannot meet netdma alignment requirements 3/ fixes for two long standing issues in ioatdma (ring size overflow) and iop-adma (potential stack corruption) * tag 'dmaengine-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine: netdma: adding alignment check for NETDMA ops ioatdma: DMA copy alignment needed to address IOAT DMA silicon errata ioat: ring size variables need to be 32bit to avoid overflow iop-adma: Corrected array overflow in RAID6 Xscale(R) test. ioat: fix size of 'completion' for Xen
2012-04-10{nl,cfg}80211: Support for mesh synchronizationJavier Cardona
Report Toffset to userspace. Let userspace select the mesh synchronization method. Signed-off-by: Marco Porsch <marco.porsch@s2005.tu-chemnitz.de> Signed-off-by: Pavel Zubarev <pavel.zubarev@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: Implement mesh synchronization frameworkJavier Cardona
This patch adds MBSS extensible synchronization framework (Sec. 13.13.2 of IEEE Std. 802.11-2012). The framework is implemented via an ops table which defines the following functions: rx_bcn_presp() - this is called every time a mesh beacon is received. adjust_tbtt() - this is called immediately before a beacon is about to be transmitted. The default neighbor offset synchronization defined in the standard is implemented. We also provide template functions for vendor specific methods. When neighbor offset synchronization is active (which is the default) mesh neighbors in the same MBSS will track timing offsets to each other and compensate clock drift. In our tests we observed that this mesh synchronization implementation successfully corrected drifts between stations of ~2PPM while introducing a jitter of ~20us. It is also possible to test this framework on mac80211_hwsim simulated phys to see how it behaves under different topologies, over poor links, etc. Signed-off-by: Marco Porsch <marco.porsch@s2005.tu-chemnitz.de> Signed-off-by: Pavel Zubarev <pavel.zubarev@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: Allow tsf increments via debugfsJavier Cardona
Reading and writing back the tsf value via tsf is too slow if one wants to make small increments to this timer. With this change you can use the syntax "+=<some value>" or "-=<some value>" to add or substract a value from the tsf counter. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: sanity check for null SSIDStanislaw Gruszka
While associated we should never have empty SSID, but life can be full of surprises, and is allways better to print a warning than crash. Before memcpy() in ieee80211_probereq_get() check ssid_len instead of ssid pointer, sice pointer it always passed by "ssidie + 2" expression to send probe functions, so practically never can be NULL. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: use IEEE80211_NUM_ACSJohannes Berg
When comparing hw->queues to determine if the device is QoS capable, use IEEE80211_NUM_ACS instead of just 4. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: lazily stop queues in add_pendingJohannes Berg
When adding pending SKBs there's no need to stop all queues, we only need to stop those that we're adding frames to. Implement that by lazily stopping a queue as we add an SKB. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: debounce queue stop/wakeJohannes Berg
When the queue status changes we need to do a fair bit of work, so ignore no-op changes early. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: decouple # of netdev queues from HW queuesJohannes Berg
When we get more hardware queues, we'll still want to only have netdev queues per AC, so set it up in that way. If the hardware doesn't support QoS (by not supporting at least 4 queues) the netdevs get a single queue only (this is no change in behavior as there are no drivers with 2 or 3 queues today.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: refuse TX queue configuration on non-QoS HWJohannes Berg
Drivers that don't support QoS also don't support setting up their ACs, catch that early. While at it, remove the input check since cfg80211 does it now. Also fix up the restart code to not try to set up the queues in this case. Finally also change the tx_conf array to have IEEE80211_NUM_ACS entries instead of # of queues since that's what it really needs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10cfg80211/nl80211: clarify TX queue APIJohannes Berg
With the plan to change mac80211's queue API to not map ACs to queues 1:1, it seems necessary to clarify some APIs that act on ACs rather than on queues to spell that out explicitly. Do this. Also verify that the AC number given is valid. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: notify driver of rate control updatesJohannes Berg
Devices that have internal rate control need to be notified when the bandwidth or SMPS state changes just like external rate control algorithms get a notification now. Add this notification and clarify the change bits while at it, the HT_CHANGED bit really meant only bandwidth changed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: remove queue stop on rate control updateJohannes Berg
We currently stop the queue when changing the rate control between 20/40 MHz in the BSS. This seems to have been necessary when we actually changed the channel, but now that we just update the station it doesn't seem right any more. Remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: remove channel type argument from rate_updateJohannes Berg
The channel type argument to the rate_update() callback isn't really the correct way to give the rate control algorithm about the desired RX bandwidth of the peer. Remove this argument, and instead update the STA capabilities with 20/40 appropriately. The SMPS update done by this callback works in the same way, so this makes the callback cleaner. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: set HT channel before associationJohannes Berg
Changing the channel type during operation is confusing to some drivers and will be hard to handle in multi-channel scenarios. Instead of changing the channel, set it to the right HT channel before authenticating/associating and don't change it -- just update the 20/40 MHz restrictions in rate control as needed when changed by the AP. This also fixes a problem that Paul missed in his fix for the "regulatory makes us deaf" issue -- when we couldn't use 40 MHz we still associated saying we were using 40 MHz, which could in similarly broken APs make us never even connect successfully. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: use AC constantsJohannes Berg
Use the AC constants instead of hard-coding the numbers with comments. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: inline ieee80211_add_pending_skbsJohannes Berg
This is a trivial wrapper function, inline it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: make ieee80211_downgrade_queue staticJohannes Berg
There's no reason for it to not be static. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: clean up uAPSD TX codeJohannes Berg
Clean up the code formatting and also replace the constant 0 by IEEE80211_AC_VO. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: fix mesh TX coding styleJohannes Berg
Fix bad indentation & pointless if nesting. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: don't always advertise remain-on-channelJohannes Berg
Not all devices are really capable of implementing remain-on-channel, even if it is implemented in SW, as they can't necessarily deal with channel changes while associated. Remove the WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL and add it only if either the driver has remain_on_channel implemented in the driver/device. Also add it to all drivers that advertise P2P right now since those definitely have to have it working. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10tcp: fix tcp_rcv_rtt_update() use of an unscaled RTT sampleNeal Cardwell
Fix a code path in tcp_rcv_rtt_update() that was comparing scaled and unscaled RTT samples. The intent in the code was to only use the 'm' measurement if it was a new minimum. However, since 'm' had not yet been shifted left 3 bits but 'new_sample' had, this comparison would nearly always succeed, leading us to erroneously set our receive-side RTT estimate to the 'm' sample when that sample could be nearly 8x too high to use. The overall effect is to often cause the receive-side RTT estimate to be significantly too large (up to 40% too large for brief periods in my tests). Signed-off-by: Neal Cardwell <ncardwell@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-10tcp: restore correct limitEric Dumazet
Commit c43b874d5d714f (tcp: properly initialize tcp memory limits) tried to fix a regression added in commits 4acb4190 & 3dc43e3, but still get it wrong. Result is machines with low amount of memory have too small tcp_rmem[2] value and slow tcp receives : Per socket limit being 1/1024 of memory instead of 1/128 in old kernels, so rcv window is capped to small values. Fix this to match comment and previous behavior. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Jason Wang <jasowang@redhat.com> Cc: Glauber Costa <glommer@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-10Merge branch 'master' of git://1984.lsi.us.es/netDavid S. Miller
2012-04-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
2012-04-10netfilter: nf_conntrack: fix incorrect logic in nf_conntrack_init_netGao feng
in function nf_conntrack_init_net,when nf_conntrack_timeout_init falied, we should call nf_conntrack_ecache_fini to do rollback. but the current code calls nf_conntrack_timeout_fini. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2012-04-10netfilter: nf_ct_ipv4: packets with wrong ihl are invalidJozsef Kadlecsik
It was reported that the Linux kernel sometimes logs: klogd: [2629147.402413] kernel BUG at net / netfilter / nf_conntrack_proto_tcp.c: 447! klogd: [1072212.887368] kernel BUG at net / netfilter / nf_conntrack_proto_tcp.c: 392 ipv4_get_l4proto() in nf_conntrack_l3proto_ipv4.c and tcp_error() in nf_conntrack_proto_tcp.c should catch malformed packets, so the errors at the indicated lines - TCP options parsing - should not happen. However, tcp_error() relies on the "dataoff" offset to the TCP header, calculated by ipv4_get_l4proto(). But ipv4_get_l4proto() does not check bogus ihl values in IPv4 packets, which then can slip through tcp_error() and get caught at the TCP options parsing routines. The patch fixes ipv4_get_l4proto() by invalidating packets with bogus ihl value. The patch closes netfilter bugzilla id 771. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2012-04-10netfilter: nf_ct_ipv4: handle invalid IPv4 and IPv6 packets consistentlyJozsef Kadlecsik
IPv6 conntrack marked invalid packets as INVALID and let the user drop those by an explicit rule, while IPv4 conntrack dropped such packets itself. IPv4 conntrack is changed so that it marks INVALID packets and let the user to drop them. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2012-04-09cfg80211: warn if db.txt is empty with CONFIG_CFG80211_INTERNAL_REGDBLuis R. Rodriguez
It has happened twice now where elaborate troubleshooting has undergone on systems where CONFIG_CFG80211_INTERNAL_REGDB [0] has been set but yet net/wireless/db.txt was not updated. Despite the documentation on this it seems system integrators could use some more help with this, so throw out a kernel warning at boot time when their database is empty. This does mean that the error-prone system integrator won't likely realize the issue until they boot the machine but -- it does not seem to make sense to enable a build bug breaking random build testing. [0] http://wireless.kernel.org/en/developers/Regulatory/CRDA#CONFIG_CFG80211_INTERNAL_REGDB Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Youngsin Lee <youngsin@qualcomm.com> Cc: Raja Mani <rmani@qca.qualcomm.com> Cc: Senthil Kumar Balasubramanian <senthilb@qca.qualcomm.com> Cc: Vipin Mehta <vipimeht@qca.qualcomm.com> Cc: yahuan@qca.qualcomm.com Cc: jjan@qca.qualcomm.com Cc: vthiagar@qca.qualcomm.com Cc: henrykim@qualcomm.com Cc: jouni@qca.qualcomm.com Cc: athiruve@qca.qualcomm.com Cc: cjkim@qualcomm.com Cc: philipk@qca.qualcomm.com Cc: sunnykim@qualcomm.com Cc: sskwak@qualcomm.com Cc: kkim@qualcomm.com Cc: mattbyun@qualcomm.com Cc: ryanlee@qualcomm.com Cc: simbap@qualcomm.com Cc: krislee@qualcomm.com Cc: conner@qualcomm.com Cc: hojinkim@qualcomm.com Cc: honglee@qualcomm.com Cc: johnwkim@qualcomm.com Cc: jinyong@qca.qualcomm.com Cc: stable@vger.kernel.org Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mac80211: fix the RANN propagation issuesChun-Yeow Yeoh
This patch is intended to solve the follwing issues in RANN propagation: [1] The interval in propagated RANN should be based on the interval of received RANN. [2] The aggregated path metric for propagated RANN is as received plus own link metric towards the transmitting mesh STA (not root mesh STA). [3] The comparison of path metric for RANN with same sequence number should be done before deciding whether to propagate or not. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mac80211: fix the sparse warnings on endian handling in RANN propagationChun-Yeow Yeoh
The HWMP sequence number of received RANN element is compared to decide whether to be propagated. The sequence number is required to covert from 32bit little endian data into CPUs endianness for comparison. The same applies to the RANN metric. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mac80211: when receiving DTIM disable power-save mode only if it was enabledRonald Wahl
When receiving DTIM we currently disable power save mode in the hardware unconditionally, i.e. also when the hardware was not sleeping. This causes trouble with at least one wireless chipset (Ralink RT3572). When the hardware is not sleeping and we send a wakeup command (e.g. this happens after a scan) then a significant decrease of the link quality or a disconnect may occur. Disabling power save mode only when it was enabled prevents this issue. Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com> Reviewed-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mac80211: optimize aggregation session timeout handlingFelix Fietkau
Calling mod_timer from the rx/tx hotpath is somewhat expensive, and the timeout doesn't need to be so precise. Switch to a different strategy: Schedule the timer initially, store jiffies of all last rx/tx activity which would previously modify the timer, and let the timer re-arm itself after checking the last rx/tx timestamp. Make the session timers deferrable to avoid causing extra wakeups on systems running on battery. This visibly reduces CPU load under high network load on small embedded systems. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mac80211: reduce code duplication in debugfs codeFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09cfg80211: use compare_ether_addr on MAC addresses instead of memcmpFelix Fietkau
Because of the constant size and guaranteed 16 bit alignment, the inline compare_ether_addr function is much cheaper than calling memcmp. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mac80211: end service period only after sending last buffered frameMarco Porsch
Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mac80211: Add iface name when calling WARN-ON.Ben Greear
This lets the user know which interface has failed the check_sdata_in_driver check. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09wireless: rename ht_info to ht_operationJohannes Berg
Since some of the HT code pre-dates 802.11n-2009 some names are wrong. The one that bothers me most is that "HT operation" is called "HT information" in our code and that causes confusion. Rename "HT information" to "HT operation" and also the control_chan field to primary_chan to match the name used in the spec. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mac80211: flush to get the tx status of nullfunc frame immediatelyRajkumar Manoharan
Sometimes the probe frame (nullfunc) is stuck at the hw queue. so that the mac80211 terminates the connection as it wont see the tx status. Instead of waiting for long period for ack status, lets call flush to get nullfunc status immediately. It also helps to send the nullfunc till max tries reached. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>