summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sony: fix rfkill codeJohannes Berg2009-06-101-2/+1
| | | | | | | | | | | | During the rfkill conversion I added code to call sony_nc_rfkill_set with the wrong argument, causing a segfault Reinette reported. The compiler could not catch that because the argument is, and needs to be, void *. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Reported-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rfkill: remove input KconfigJohannes Berg2009-06-101-1/+1
| | | | | | | | | | Now that we added the ioctl, there's no need to ask the user to configure this. We will keep it enabled for now, and eventually swap the default to n. Also let embedded users select it only if they need it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43/legacy: port to cfg80211 rfkillJohannes Berg2009-06-1015-341/+66
| | | | | | | | | | This ports the b43/legacy rfkill code to the new API offered by cfg80211 and thus removes a lot of useless stuff. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: added cfg80211 based rfkill supportTobias Doerffel2009-06-107-17/+163
| | | | | | | | | | | | | | This patch introduces initial rfkill support for the ath5k driver based on rfkill support in the cfg80211 framework. All rfkill related code is separated into newly created rfkill.c. Changes to existing code are minimal: * added a new data structure ath5k_rfkill to the ath5k_softc structure * inserted calls to HW rfkill init/deinit routines * ath5k_intr() has been extended to handle AR5K_INT_GPIO interrupts Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rfkill: print events when input handler is disabled/enabledJohannes Berg2009-06-101-2/+4
| | | | | | | | | It is useful for debugging when we know if something disabled the in-kernel rfkill input handler. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ar9170: xmit code revampChristian Lamparter2009-06-105-260/+550
| | | | | | | | | | | | | | | | This patch is a back-port from aggregation testing code. In the past, we didn't limit the amount of active tx urbs. However, ar9170 only has a limited buffer reserved for pending data frames. This wasn't much of a problem with the slower 802.11b/g. We simply stopped the full queue and moved on to something different in the mean time. But - as you guessed it - this simple approach stands in way for a decent aggregation implementation. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ar9170: interpret firmware debug commandsJohannes Berg2009-06-101-0/+32
| | | | | | | | This adds new commands that the original firmware will not send but we can use them to debug firmware. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211 : fix unaligned rx skbmatthieu castet2009-06-101-1/+1
| | | | | | | | | | mac80211 is checking is the skb is aligned on 32 bit boundary. But it is checking against ethernet header, whereas Linux expect IP header aligned. And ethernet ether size is 6*2+2=14, so aligning ethernet header make IP header unaligned. Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Fix possible unaligned u32 accessMatthieu CASTET2009-06-101-3/+2
| | | | | | | | | | | Fix possible unaligned u32 access in b43_generate_plcp_hdr(). Unaligned data is read/write with a u32 pointer instead of using the packed structure. Some versions of gcc ignore the "packed" attribute, if the structure element is accessed through a local pointer. Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix minstrel single-rate memory corruptionBob Copeland2009-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The minstrel rate controller periodically looks up rate indexes in a sampling table. When accessing a specific row and column, minstrel correctly does a bounds check which, on the surface, appears to handle the case where mi->n_rates < 2. However, mi->sample_idx is actually defined as an unsigned, so the right hand side is taken to be a huge positive number when negative, and the check will always fail. Consequently, the RC will overrun the array and cause random memory corruption when communicating with a peer that has only a single rate. The max value of mi->sample_idx is around 25 so casting to int should have no ill effects. Without the change, uptime is a few minutes under load with an AP that has a single hard-coded rate, and both the AP and STA could potentially crash. With the change, both lasted 12 hours with a steady load. Thanks to Ognjen Maric for providing the single-rate clue so I could reproduce this. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=12490 on the regression list (also http://bugzilla.kernel.org/show_bug.cgi?id=13000). Cc: stable@kernel.org Reported-by: Sergey S. Kostyliov <rathamahata@gmail.com> Reported-by: Ognjen Maric <ognjen.maric@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* net/libertas: remove GPIO-CS handling in SPI interface codeSebastian Andrzej Siewior2009-06-103-52/+45
| | | | | | | | | | | | | | | This removes the dependency on GPIO framework and lets the SPI host driver handle the chip select. The SPI host driver is required to keep the CS active for the entire message unless cs_change says otherwise. This patch collects the two/three single SPI transfers into a message. Also the delay in read path in case use_dummy_writes are not used is moved into the SPI host driver. Tested-by: Mike Rapoport <mike@compulab.co.il> Tested-by: Andrey Yurovsky <andrey@cozybit.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rndis_wlan: cleanup: rename all rndis_wext* objects to rndis_wlan*Jussi Kivilinna2009-06-101-78/+78
| | | | | | | | | | Driver used to be named rndis_wext before inclusion to upstream. Since rndis_wlan is being converted to cfg80211, use of rndis_wext* names can be confusing. So rename all rndis_wext to rndis_wlan (as should have been when driver was renamed). Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rndis_wlan: cleanup: capitalize enum labelsJussi Kivilinna2009-06-101-68/+68
| | | | | | | Capitalize enum labels as told in Documents/CodingStyle. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: port to cfg80211 rfkillJohannes Berg2009-06-1011-414/+19
| | | | | | | | | | | This ports the iwlwifi rfkill code to the new API offered by cfg80211 and thus removes a lot of useless stuff. The soft- rfkill is completely removed since that is now handled by setting the interfaces down. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Tested-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rfkill: include err.hJohannes Berg2009-06-091-0/+1
| | | | | | | | Since we use ERR_PTR and similar macros, we need to include linux/err.h. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2: no need to check before vfreeingBreno Leitao2009-06-091-4/+2
| | | | | | | | There is no need to check if a pointer is NULL before calling vfree(), since vfree() function already check for it. Signed-off-by: Breno Leitão <leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: Include offloaded FCoE data into total rx/tx statistics for 82599Yi Zou2009-06-093-5/+42
| | | | | | | | | Include offloaded FCoE data into total rx/tx statistics for 82599 so they are properly reflected by ethtool or ifconfig. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000e: Expose MDI-X status via ethtool changeChaitanya Lala2009-06-092-1/+16
| | | | | | | | | | | | Ethtool is a standard way of getting information about ethernet interfaces. We enhance ethtool kernel interface & e1000e to make the MDI-X status readable via ethtool in userspace. Signed-off-by: Chaitanya Lala <clala@riverbed.com> Signed-off-by: Arthur Jones <ajones@riverbed.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000e: Call e1000e_config_collision_dist() after TCTL has been setSimon Horman2009-06-091-2/+2
| | | | | | | | | | | | e1000e_config_collision_dist() sets tctl, but subsequently tctl is overwritten. It seems to me that as things stand the call to e1000e_config_collision_dist() has no effect and should either be removed or moved down a little bit. This kernel patch takes the latter option. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000e: Fixes possible phy corrupton on 82571 designs.Dave Graham2009-06-093-7/+83
| | | | | | | | | | | | | | | Phy corruption has been observed on 2-port 82571 adapters, and is root-caused to lack of synchronization between the 2 driver instances, which conflict when attempting to access the phy via the single MDIC register. A semaphore exists for this purpose, and is now used on these designs. Because PXE &/or EFI boot code (which we cannot expect to be built with this fix) may leave the inter-instance semaphore in an invalid initial state when the driver first loads, this fix also includes a one-time (per driver load) fix-up of the semaphore initial state. Signed-off-by: dave graham <david.graham@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ieee802154: add simple HardMAC driver sampleSergey Lapin2009-06-095-0/+298
| | | | | | | | | | fakehard is a really simple driver implementing only necessary callbacks and serves the role of an example of driver for HardMAC IEEE 802.15.4 device. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Sergey Lapin <slapin@ossfans.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ieee802154: add documentation about our stackSergey Lapin2009-06-092-0/+88
| | | | | | | | | Add MAINTAINERS entry and a small text describing our stack interfaces, how to hook the drivers, etc. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Sergey Lapin <slapin@ossfans.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: add NL802154 interface for configuration of 802.15.4 devicesSergey Lapin2009-06-095-1/+737
| | | | | | | | | Add a netlink interface for configuration of IEEE 802.15.4 device. Also this interface specifies events notification sent by devices towards higher layers. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Sergey Lapin <slapin@ossfans.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: add IEEE 802.15.4 socket family implementationSergey Lapin2009-06-0911-0/+1409
| | | | | | | | | | | | | | | | | | | | Add support for communication over IEEE 802.15.4 networks. This implementation is neither certified nor complete, but aims to that goal. This commit contains only the socket interface for communication over IEEE 802.15.4 networks. One can either send RAW datagrams or use SOCK_DGRAM to encapsulate data inside normal IEEE 802.15.4 packets. Configuration interface, drivers and software MAC 802.15.4 implementation will follow. Initial implementation was done by Maxim Gorbachyov, Maxim Osipov and Pavel Smolensky as a research project at Siemens AG. Later the stack was heavily reworked to better suit the linux networking model, and is now maitained as an open project partially sponsored by Siemens. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Sergey Lapin <slapin@ossfans.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Add constants for the ieee 802.15.4 stackSergey Lapin2009-06-095-3/+13
| | | | | | | | IEEE 802.15.4 stack requires several constants to be defined/adjusted. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Sergey Lapin <slapin@ossfans.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* pkt_sched: Change PSCHED_SHIFT from 10 to 6Jarek Poplawski2009-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | | Change PSCHED_SHIFT from 10 to 6 to increase schedulers time resolution. This will increase 16x a number of (internal) ticks per nanosecond, and is needed to improve accuracy of schedulers based on rate tables, like HTB, TBF or CBQ, with rates above 100Mbit. It is assumed this change is safe for 32bit accounting of time diffs up to 2 minutes, which should be enough for common use (extremely low rate values may overflow, so get inaccurate instead). To make full use of this change an updated iproute2 will be needed. (But using older iproute2 should be safe too.) This change breaks ticks - microseconds similarity, so some minor code fixes might be needed. It is also planned to change naming adequately eg. to PSCHED_TICKS2NS() etc. in the near future. Reported-by: Antonio Almeida <vexwek@gmail.com> Tested-by: Antonio Almeida <vexwek@gmail.com> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* pkt_sched: Use PSCHED_SHIFT in PSCHED time conversionJarek Poplawski2009-06-092-5/+8
| | | | | | | | | | | | | | Use PSCHED_SHIFT constant instead of '10' in PSCHED_US2NS() and PSCHED_NS2US() macros to enable changing this value later. Additionally use PSCHED_SHIFT in sch_hfsc SM_SHIFT and ISM_SHIFT definitions. This part of the patch is based on feedback from Patrick McHardy <kaber@trash.net>. Reported-by: Antonio Almeida <vexwek@gmail.com> Tested-by: Antonio Almeida <vexwek@gmail.com> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: dev_addr_init() fixEric Dumazet2009-06-091-2/+2
| | | | | | | | | | | | | | | | | | commit f001fde5eadd915f4858d22ed70d7040f48767cf (net: introduce a list of device addresses dev_addr_list (v6)) added one regression Vegard Nossum found in its testings. With kmemcheck help, Vegard found some uninitialized memory was read and reported to user, potentialy leaking kernel data. ( thread can be found on http://lkml.org/lkml/2009/5/30/177 ) dev_addr_init() incorrectly uses sizeof() operator. We were initializing one byte instead of MAX_ADDR_LEN bytes. Reported-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* be2net: Remove unnecessary frag list traversing.David S. Miller2009-06-091-31/+25
| | | | | | | | | | | | | | | | | | | | | | This driver does not indicate support for frag lists. Furthermore, even if it did, the code is walking the frag lists incorrectly. The idiom is: for (iter = skb_shinfo(skb)->frag_list; iter; iter = iter->next) but it's doing: for (iter = skb_shinfo(skb)->frag_list; iter; iter = skb_shinfo(iter)->frag_list) which would never work. And this proves that this driver never saw an SKB with active frag lists. So just remove the code altogether and the driver TX path becomes much simpler. Signed-off-by: David S. Miller <davem@davemloft.net>
* xfrm: Use frag list abstraction interfaces.David S. Miller2009-06-091-22/+19
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sctp: Use frag list abstraction interfaces.David S. Miller2009-06-093-9/+8
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* phonet: Use frag list abstraction interfaces.David S. Miller2009-06-092-4/+4
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* netfilter: Use frag list abstraction interfaces.David S. Miller2009-06-092-4/+5
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Use frag list abstraction interfaces.David S. Miller2009-06-092-5/+5
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv4: Use frag list abstraction interfaces.David S. Miller2009-06-092-5/+5
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* net/core/user_dma.c: Use frag list abstraction interfaces.David S. Miller2009-06-091-24/+22
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* net/core/skbuff.c: Use frag list abstraction interfaces.David S. Miller2009-06-091-124/+106
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* net/core/dev.c: Use frag list abstraction interfaces.David S. Miller2009-06-091-2/+2
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* datagram: Use frag list abstraction interfaces.David S. Miller2009-06-091-95/+83
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* appletalk: Use frag list abstraction interfaces.David S. Miller2009-06-091-17/+14
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* netdevice.h: Use frag list abstraction interfaces.David S. Miller2009-06-091-1/+1
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* skbuff: Add frag list abstraction interfaces.David S. Miller2009-06-091-1/+20
| | | | | | | With the hope that these can be used to eliminate direct references to the frag list implementation. Signed-off-by: David S. Miller <davem@davemloft.net>
* bluetooth: Kill skb_frags_no(), unused.David S. Miller2009-06-081-9/+0
| | | | | | | Furthermore, it twiddles with the details of SKB list handling directly, which we're trying to eliminate. Signed-off-by: David S. Miller <davem@davemloft.net>
* declance: Restore tx descriptor ring lockingMaciej W. Rozycki2009-06-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | A driver overhaul on 29 Feb 2000 (!) broke locking around fiddling with the tx descriptor ring in start_xmit(); a follow-on "fix" removed the broken remnants altogether. Here's a patch to restore proper locking in the function -- the complement in the interrupt handler has been correct all the time. This *may* have been the reason for the occasional confusion of the chip -- triggering a tx timeout followed by a chip reset sequence -- seen on R4k-based DECstations with the onboard Ethernet interface. Another theory is the confusion is due to an unindentified problem -- perhaps a silicon erratum -- associated with the variation of the MT ASIC used to interface the R4k CPU to the rest of the system on these computers; with its aggressive write-back buffering the design is particularly weakly ordered when it comes to MMIO (in the absence of ordering barriers uncached reads are allowed to bypass earlier uncached writes, even if to the same location), which may trigger all kinds of corner cases in peripheral hardware as well as software. Either way this piece of code is buggy. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn: extend INTERFACE.CAPI documentTilman Schmidt2009-06-081-2/+88
| | | | | | | | | Clarify calling context and return codes of callback methods, and add a description of the _cmsg structure and helper functions. Impact: documentation Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn: prevent NULL ptr Oops in capi_cmsg2str()Tilman Schmidt2009-06-081-0/+2
| | | | | | | | | | | The dereferencing of the private pointer cmsg->m in capi_cmsg2str() may cause an Oops in case of an error, which is particularly inconvenient as that function is typically used to format an error message. Add a NULL pointer check to avoid this. Impact: error handling improvement Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn: kerneldoc for capiutil.cTilman Schmidt2009-06-081-3/+62
| | | | | | | | Add kerneldoc comments for the exported funtions in capiutil.c. Impact: documentation Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn: rename capi_ctr_reseted() to capi_ctr_down()Tilman Schmidt2009-06-089-15/+15
| | | | | | | | | Change the name of the Kernel CAPI exported function capi_ctr_reseted() to something representing its purpose better. Impact: renaming, no functional change Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* tun: Fix unregister raceEric W. Biederman2009-06-081-3/+4
| | | | | | | | | | | | | | | | | | It is possible for tun_chr_close to race with dellink on the a tun device. In which case if __tun_get runs before dellink but dellink runs before tun_chr_close calls unregister_netdevice we will attempt to unregister the netdevice after it is already gone. The two cases are already serialized on the rtnl_lock, so I have gone for the cheap simple fix of moving rtnl_lock to cover __tun_get in tun_chr_close. Eliminating the possibility of the tun device being unregistered between __tun_get and unregister_netdevice in tun_chr_close. Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Tested-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e100: Fix napi_enable BUG_ON when recovering from EEH errorAndre Detsch2009-06-081-5/+6
| | | | | | | | | | | | | | | BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)) was being hit during e100 EEH recovery. The problem source was a napi_enable call being made during e100_io_error_detected. Napi should remain disabled after e100_down, and only be reenabled when the interface is recovered. This patch also updates e100_io_error_detected in order to make it similar to the current versions of the error_detected callback in drivers such as e1000e and ixgbe. Signed-off-by: Andre Detsch <adetsch@br.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>