summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* net: Support specifying the network namespace upon device creation.Eric W. Biederman2009-11-087-23/+50
| | | | | | | | | | | | | | | | | | | There is no good reason to not support userspace specifying the network namespace during device creation, and it makes it easier to create a network device and pass it to a child network namespace with a well known name. We have to be careful to ensure that the target network namespace for the new device exists through the life of the call. To keep that logic clear I have factored out the network namespace grabbing logic into rtnl_link_get_net. In addtion we need to continue to pass the source network namespace to the rtnl_link_ops.newlink method so that we can find the base device source network namespace. Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
* appletalk/ddp.c: Neaten checksum functionJoe Perches2009-11-081-7/+2
| | | | | | | atalk_sum_partial can now use the rol16 function in bitops.h Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: avoid dev_hold()/dev_put() in rawv6_bind()Eric Dumazet2009-11-081-12/+11
| | | | | | | Using RCU helps not touching device refcount in rawv6_bind() Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Fix compiler and sparse warningsAnton Vorontsov2009-11-082-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit fba4ed030cfae7efdb6b79a57b0c5a9d72c9de83 ("gianfar: Add Multiple Queue Support") introduced the following warnings: CHECK gianfar.c gianfar.c:333:8: warning: incorrect type in assignment (different address spaces) gianfar.c:333:8: expected unsigned int [usertype] *baddr gianfar.c:333:8: got unsigned int [noderef] <asn:2>*<noident> [... 67 lines skipped ...] gianfar.c:2565:3: warning: incorrect type in argument 1 (different type sizes) gianfar.c:2565:3: expected unsigned long const *addr gianfar.c:2565:3: got unsigned int *<noident> CC gianfar.o gianfar.c: In function 'gfar_probe': gianfar.c:985: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:985: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:993: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:993: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c: In function 'gfar_configure_coalescing': gianfar.c:1680: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:1680: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:1688: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:1688: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c: In function 'gfar_poll': gianfar.c:2565: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:2565: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:2566: warning: passing argument 2 of 'test_bit' from incompatible pointer type gianfar.c:2585: warning: passing argument 2 of 'set_bit' from incompatible pointer type Following warnings left unfixed (looks like sparse doesn't like locks in loops, so __acquires/__releases() doesn't help): gianfar.c:441:40: warning: context imbalance in 'lock_rx_qs': wrong count at exit gianfar.c:441:40: context '<noident>': wanted 0, got 1 gianfar.c:449:40: warning: context imbalance in 'lock_tx_qs': wrong count at exit gianfar.c:449:40: context '<noident>': wanted 0, got 1 gianfar.c:458:3: warning: context imbalance in 'unlock_rx_qs': __context__ statement expected different context gianfar.c:458:3: context '<noident>': wanted >= 0, got -1 gianfar.c:466:3: warning: context imbalance in 'unlock_tx_qs': __context__ statement expected different context gianfar.c:466:3: context '<noident>': wanted >= 0, got -1 Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* fsl_pq_mdio: Fix compiler/sparse warnings (part 2)Anton Vorontsov2009-11-081-4/+9
| | | | | | | | | | | | | | | This patch fixes following warnings: fsl_pq_mdio.c:112:38: warning: cast adds address space to expression (<asn:2>) fsl_pq_mdio.c:124:38: warning: cast adds address space to expression (<asn:2>) fsl_pq_mdio.c:133:38: warning: cast adds address space to expression (<asn:2>) fsl_pq_mdio.c:414:11: warning: cast adds address space to expression (<asn:2>) Instead of adding __force all over the place, introduce convenient fsl_pq_mdio_get_regs() call that does the ugly casting just once. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* fsl_pq_mdio: Fix compiler/sparse warnings (part 1)Anton Vorontsov2009-11-081-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 1d2397d742b7a2b39b2f09dd9da3b9d1463f55e9 ("fsl_pq_mdio: Add Suport for etsec2.0 devices") introduced the following warnings: CHECK fsl_pq_mdio.c fsl_pq_mdio.c:287:22: warning: incorrect type in initializer (different base types) fsl_pq_mdio.c:287:22: expected unknown type 11 const *__mptr fsl_pq_mdio.c:287:22: got unsigned long long [unsigned] [assigned] [usertype] addr fsl_pq_mdio.c:287:19: warning: incorrect type in assignment (different base types) fsl_pq_mdio.c:287:19: expected unsigned long long [unsigned] [usertype] ioremap_miimcfg fsl_pq_mdio.c:287:19: got struct fsl_pq_mdio *<noident> CC fsl_pq_mdio.o fsl_pq_mdio.c: In function 'fsl_pq_mdio_probe': fsl_pq_mdio.c:287: warning: initialization makes pointer from integer without a cast fsl_pq_mdio.c:287: warning: assignment makes integer from pointer without a cast These warnings are not easy to fix without ugly __force casts. So, instead of introducing the casts, rework the code to substitute an offset from an already mapped area. This makes the code a lot simpler and less duplicated. Plus, from now on we don't actually map reserved registers on non-etsec2.0 devices, so we have more chances to catch programming errors. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rtnetlink: CleanupsEric Dumazet2009-11-071-31/+23
| | | | | | | Pure cleanups patch Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: kill proto_ops wrapperArnd Bergmann2009-11-071-83/+0
| | | | | | | | | | All users of wrapped proto_ops are now gone, so we can safely remove the wrappers as well. Cc: David S. Miller <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/x25: push BKL usage into x25_protoArnd Bergmann2009-11-071-11/+60
| | | | | | | | | | | | | | | | | | The x25 driver uses lock_kernel() implicitly through its proto_ops wrapper. The makes the usage explicit in order to get rid of that wrapper and to better document the usage of the BKL. The next step should be to get rid of the usage of the BKL in x25 entirely, which requires understanding what data structures need serialized accesses. Cc: Henner Eisen <eis@baty.hanse.de> Cc: David S. Miller <davem@davemloft.net> Cc: linux-x25@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/irda: push BKL into proto_opsArnd Bergmann2009-11-071-107/+224
| | | | | | | | | | | | | | | | | The irda driver uses the BKL implicitly in its protocol operations. Replace the wrapped proto_ops with explicit lock_kernel() calls makes the usage more obvious and shrinks the size of the object code. The calls t lock_kernel() should eventually all be replaced by other serialization methods, which requires finding out The calls t lock_kernel() should eventually all be replaced by other serialization methods, which requires finding out which data actually needs protection. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/ipx: push down BKL into a ipx_dgram_opsArnd Bergmann2009-11-071-8/+46
| | | | | | | | | | | | | | | | | | | Making the BKL usage explicit in ipx makes it more obvious where it is used, reduces code size and helps getting rid of the BKL in common code. I did not analyse how to kill lock_kernel from ipx entirely, this will involve either proving that it's not needed, or replacing with a proper mutex or spinlock, after finding out which data structures are protected by the lock. Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Cc: David S. Miller <davem@davemloft.net> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: netdev@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/appletalk: push down BKL into a atalk_dgram_opsArnd Bergmann2009-11-071-28/+77
| | | | | | | | | | | | | | | | | | | Making the BKL usage explicit in appletalk makes it more obvious where it is used, reduces code size and helps getting rid of the BKL in common code. I did not analyse how to kill lock_kernel from appletalk entirely, this will involve either proving that it's not needed, or replacing with a proper mutex or spinlock, after finding out which data structures are protected by the lock. Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Cc: David S. Miller <davem@davemloft.net> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: netdev@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* atl1c: change atl1c_buffer struct and restructure clean atl1c_buffer procedureJie Yang2009-11-072-45/+61
| | | | | | | | | change atl1c_buffer struct, use "u16 flags" instead of "u16 state" to store more infomation for atl1c_buffer, and restructure clean atl1c_buffer procedure, add common api atl1c_clean_buffer. Signed-off-by: Jie Yang <jie.yang@atheros.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Replace old style lock initializerThomas Gleixner2009-11-071-1/+1
| | | | | | | SPIN_LOCK_UNLOCKED is deprecated. Use DEFINE_SPINLOCK instead. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: compat: No need to define IFHWADDRLEN and IFNAMSIZ twice.David S. Miller2009-11-071-2/+0
| | | | | | | It's defined colloqually in linux/if.h and linux/compat.h includes that. Signed-off-by: David S. Miller <davem@davemloft.net>
* net, compat_ioctl: handle more ioctls correctlyArnd Bergmann2009-11-071-14/+17
| | | | | | | | | | | | The MII ioctls and SIOCSIFNAME need to go through ifsioc conversion, which they never did so far. Some others are not implemented in the native path, so we can just return -EINVAL directly. Add IFSLAVE ioctls to the EINVAL list and move it to the end to optimize the code path for the common case. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* compat: move sockios handling to net/socket.cArnd Bergmann2009-11-072-950/+240
| | | | | | | | | | | | | | | | | | | | | | | | | This removes the original socket compat_ioctl code from fs/compat_ioctl.c and converts the code from the copy in net/socket.c into a single function. We add a few cycles of runtime to compat_sock_ioctl() with the long switch() statement, but gain some cycles in return by simplifying the call chain to get there. Due to better inlining, save 1.5kb of object size in the process, and enable further savings: before: text data bss dec hex filename 13540 18008 2080 33628 835c obj/fs/compat_ioctl.o 14565 636 40 15241 3b89 obj/net/socket.o after: text data bss dec hex filename 8916 15176 2080 26172 663c obj/fs/compat_ioctl.o 20725 636 40 21401 5399 obj/net/socket.o Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* appletalk: handle SIOCATALKDIFADDR compat ioctlArnd Bergmann2009-11-072-6/+7
| | | | | | | | | We must not have a compat ioctl handler for SIOCATALKDIFADDR in common code, because the same number is used in other protocols with different data structures. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: copy socket ioctl code to net/socket.hArnd Bergmann2009-11-071-0/+716
| | | | | | | | | | | | | This makes an identical copy of the socket compat_ioctl code from fs/compat_ioctl.c to net/socket.c, as a preparation for moving the functionality in a way that can be easily reviewed. The code is hidden inside of #if 0 and gets activated in the patch that will make it work. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net, compat_ioctl: handle socket ioctl abuses in tty driversArnd Bergmann2009-11-076-2/+103
| | | | | | | | | | | | | | | | | | Slip and a few other drivers use the same ioctl numbers on tty devices that are normally meant for sockets. This causes problems with our compat_ioctl handling that tries to convert the data structures in a different format. Fortunately, these five drivers all use 32 bit compatible data structures in the ioctl numbers, so we can just add a trivial compat_ioctl conversion function to each of them. SIOCSIFENCAP and SIOCGIFENCAP do not need to live in fs/compat_ioctl.c after this any more, and they are not used on any sockets. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/tun: handle compat_ioctl directlyArnd Bergmann2009-11-072-27/+46
| | | | | | | | | | | | | | | | | | The tun driver is the only code in the kernel that operates on a character device with struct ifreq. Change the driver to handle the conversion itself so we can contain the remaining ifreq handling in the socket layer. This also fixes a bug in the handling of invalid ioctl numbers on an unbound tun device. The driver treats this as a TUNSETIFF in native mode, but there is no way for the generic compat_ioctl() function to emulate this behaviour. Possibly the driver was only doing this accidentally anyway, but if any code relies on this misfeature, it now also works in compat mode. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* compat: add struct compat_ifreq etc to compat.hArnd Bergmann2009-11-071-0/+39
| | | | | | | | | | | | In order to move socket ioctl conversion code into multiple places in the socket code, we need a common defintion of the data structures it uses. Also change the name from ifreq32 to compat_ifreq to follow the naming convention for compat.h Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'for-next' of ↵David S. Miller2009-11-0711-611/+1202
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan
| * ieee802154: add support for creation/removal of logic interfacesDmitry Eremin-Solenikov2009-11-063-0/+162
| | | | | | | | | | | | | | | | Add support for two more NL802154 commands: ADD_IFACE and DEL_IFACE, thus allowing creation and removal of logic WPAN interfaces on the top of wpan-phy. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * ieee802154: add PHY_NAME to LIST_IFACE command resultsDmitry Eremin-Solenikov2009-11-061-0/+8
| | | | | | | | Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * ieee802154: add two nl802154 helpersDmitry Eremin-Solenikov2009-11-062-0/+38
| | | | | | | | | | | | Add two nl802154 helpers: one for starting a reply message, one for sending. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * fakehard: mlme_ops->get_phy implementationDmitry Eremin-Solenikov2009-11-061-6/+32
| | | | | | | | Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * ieee802154: add an mlme_ops call to retrieve PHY objectDmitry Eremin-Solenikov2009-11-062-0/+8
| | | | | | | | | | | | | | ops->get_phy should increment reference to wpan-phy. As we return the external structure, we should do refcounting correctly. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * fakehard: claim all 2.4 Ghz channels as supportedDmitry Eremin-Solenikov2009-11-061-1/+9
| | | | | | | | | | | | | | Make fakehard device claim all 2.4 Ghz channels from 802.15.4-2006, 802.15.4a-2007 as supported by the hw. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * fakehard: no need to export net_to_phy, make it staticDmitry Eremin-Solenikov2009-11-061-1/+1
| | | | | | | | Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * ieee802154: add LIST_PHY command supportDmitry Eremin-Solenikov2009-11-065-1/+199
| | | | | | | | | | | | | | Add nl802154 command to get information about PHY's present in the system. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * ieee802154: split away MAC commands implementationDmitry Eremin-Solenikov2009-11-064-595/+669
| | | | | | | | | | | | | | Move all mac-related stuff to separate file so that ieee802154/netlink.c contains only generic code. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * ieee802154: merge nl802154 and wpan-class in single moduleDmitry Eremin-Solenikov2009-11-063-12/+24
| | | | | | | | | | | | | | There is no real need to have ieee802154 interfaces separate into several small modules, as neither of them has it's own use. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * ieee802154: constify struct net_device in some operationsDmitry Eremin-Solenikov2009-11-062-9/+9
| | | | | | | | | | | | | | Some of ieee802154 operations really shouldn't change passed net_device. Constify passed argument. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * wpan-phy: follow usual patter of devices registrationDmitry Eremin-Solenikov2009-11-063-5/+8
| | | | | | | | | | | | | | | | Follow the usual pattern of devices registration by adding new function (wpan_phy_set_dev) that sets child->parent relationship and removing parent argument from wpan_phy_register call. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * wpan-phy: allow specifying a per-page channel maskDmitry Eremin-Solenikov2009-11-063-3/+21
| | | | | | | | | | | | | | | | IEEE 802.15.4-2006 defines channel pages that hold channels (max 32 pages, 27 channels per page). Allow the driver to specify supported channels on pages, other than the first one. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * wpan-phy: use snprintf to limit the amount of chars writtenDmitry Eremin-Solenikov2009-11-061-1/+1
| | | | | | | | | | | | Use snprintf to limit the amount of chars put in the buffer for attr -> show. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * wpan-phy: init channel/page fieldsDmitry Eremin-Solenikov2009-11-061-0/+3
| | | | | | | | | | | | | | | | Set page to zero (for compatibility w/ devices supporting only first page). Also init channel by default to -1 to disallow transfers for non-initialised devices. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * wpan-phy: add wpan-phy iteration functionsDmitry Eremin-Solenikov2009-11-062-0/+27
| | | | | | | | | | | | Add API to iterate over the wpan-phy instances. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * wpan-phy: add a helper to put the wpan_phy deviceDmitry Eremin-Solenikov2009-11-061-0/+6
| | | | | | | | Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* | Merge branch 'linux-2.6.33.y' of ↵David S. Miller2009-11-0626-618/+2104
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax
| * | wimax/i2400m: fix inverted value in i2400ms_bus_setup()Inaky Perez-Gonzalez2009-11-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix inverted setting of 'retries'; when we are in the probe() path, we should retry to enable the function only once; otherwise until it times out. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * | wimax/i2400m: fix SDIO debugfs dentry nameInaky Perez-Gonzalez2009-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | The SDIO specific debugfs dentry was being misnamed "i2400m-usb" instead of "i2400m-sdio". Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * | wimax/i2400m: fix bad assignment of return value in i2400mu_tx_bulk_outInaky Perez-Gonzalez2009-11-031-1/+0
| | | | | | | | | | | | | | | | | | | | | The function was always setting the return value to the amount of bytes transferred, overwriting the error code in error paths. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * | wimax/i2400m: handle USB stallsInaky Perez-Gonzalez2009-11-034-6/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the device stalls, clear it and retry; if it keeps failing too often, reset the device. This specially happens when running on virtual machines; the real hardware doesn't seem to trip on stalls too much, except for a few reports in the mailing list (still to be confirmed this is the cause, although it seems likely. NOTE: it is not clear if the URB has to be resubmitted fully or start only at the offset of the first transaction sent. Can't find documentation to clarify one end or the other. Tests that just resubmit the whole URB seemed to work in my environment. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * | wimax/i2400m: don't retry SDIO enable in probe() pathsInaky Perez-Gonzalez2009-11-032-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iwmc3200 has a quirk where retrying SDIO enable during the probe() path causes bad interactions with the TOP function controller that causes a reset storm. The workaround is simply not to retry an SDIO enable in said path (and still do in the reset / reinitialization paths). The driver does so by checking i2400ms->debugfs_dentry to see if it has been initialized; if not, it is in the probe() path. Document said fact in i2400ms->debugfs_entry. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * | wimax/i2400m: correctly identify all iwmc3200-based SKUsInaky Perez-Gonzalez2009-11-032-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Different paths of the i2400m SDIO driver need to take care of a few SKU-specific quirks. For the ones that are common to to all the iwmc3200 based devices, introduce i2400ms->iwmc3200 [set in i2400ms_probe()], so it doesn't have to check against the list of iwmc3200 SKU IDs on each quirk site. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * | wimax/i2400m: Fix USB timeout specifications (to ms from HZ)Inaky Perez-Gonzalez2009-11-034-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The USB code was incorrectly specifiying timeouts to be in jiffies vs msecs. On top of that, lower it to 200ms, as 1s is really too long (doesn't allow the watchdog to trip a reset if the device timesout too often). Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * | wimax/i2400m: fix device getting stuck in IDLE modeInaky Perez-Gonzalez2009-11-031-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i2400m, when conected, will negotiate with the WiMAX basestation to put the link in IDLE mode when it is not being used. Upon RX/TX traffic, the link has to be restablished and that might require some crypto handshakes and maybe a DHCP renew. This process might take up to 20 (!) seconds and in some cases we were seeing network watchdog warnings that weren't needed. So the network watchdog timeout is updated to be slightly above that 20s threshold. As well, the driver itself will double check if the device is stuck in IDLE mode -- if that happens, the device will be reset (in this case the queue is also woken up to remove bogus--once the device is reset--warnings). Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * | wimax/i2400m: introduce i2400m_reset(), stopping TX and carrierInaky Perez-Gonzalez2009-11-039-21/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the i2400m driver was resetting by just calling i2400m->bus_reset(). However, this was missing stopping the TX queue and downing the carrier. This was causing, for the corner case of the driver reseting a device that refuses to go out of idle mode, that a few packets would be queued and more than one reset would go through, making the recovery a wee bit messy. To avoid introducing the same cleanup in all the bus-specific driver, introduced a i2400m_reset() function that takes care of house cleaning and then calling the bus-level reset implementation. The bulk of the changes in all files are just to rename the call from i2400m->bus_reset() to i2400m_reset(). Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>