1. 04 11月, 2009 2 次提交
    • I
      wimax/i2400m: fix device getting stuck in IDLE mode · 5ab5a721
      Inaky Perez-Gonzalez 提交于
      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: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      5ab5a721
    • I
      wimax/i2400m: introduce i2400m_reset(), stopping TX and carrier · c931ceeb
      Inaky Perez-Gonzalez 提交于
      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: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      c931ceeb
  2. 19 10月, 2009 4 次提交
    • I
      wimax/i2400m: fix race condition with tcpdump et al · 9835fd84
      Inaky Perez-Gonzalez 提交于
      tcpdump and friends were not being able to decode packets sent via
      WiMAX; they had a zero ethernet type, even when the stack was properly
      sending them to the device with the right type.
      
      It happens that the driver was overwriting the (fake) ethernet header
      for creating the hardware header and that was bitting the cloning used
      by tcpdump (et al) to look into the packets.
      
      Use pkskb_expand_head() [method copied from the e1000 driver] to fix.
      
      Thanks to Herbert Xu and Andi Kleen for helping to diagnose and
      pointing to the right fix.
      
      Cc: Herbert Xu <gondor.apana.org.au>
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      9835fd84
    • I
      wimax/i2400m: cleanup initialization/destruction flow · 8f90f3ee
      Inaky Perez-Gonzalez 提交于
      Currently the i2400m driver was starting in a weird way: registering a
      network device, setting the device up and then registering a WiMAX
      device.
      
      This is an historic artifact, and was causing issues, a some early
      reports the device sends were getting lost by issue of the wimax_dev
      not being registered.
      
      Fix said situation by doing the wimax device registration in
      i2400m_setup() after network device registration and before starting
      thed device.
      
      As well, removed spurious setting of the state to UNINITIALIZED;
      i2400m.dev_start() does that already.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      8f90f3ee
    • I
      wimax/i2400m: on device stop, clean up pending wake & TX work · ac53aed9
      Inaky Perez-Gonzalez 提交于
      When the i2400m device needs to wake up an idle WiMAX connection, it
      schedules a workqueue job to do it.
      
      Currently, only when the network stack called the _stop() method this
      work struct was being cancelled. This has to be done every time the
      device is stopped.
      
      So add a call in i2400m_dev_stop() to take care of such cleanup, which
      is now wrapped in i2400m_net_wake_stop().
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      ac53aed9
    • D
      i2400m: minimal ethtool support · abb30733
      Dan Williams 提交于
      Add minimal ethtool support for carrier detection.
      Signed-off-by: NDan Williams <dcbw@redhat.com>
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      abb30733
  3. 01 9月, 2009 1 次提交
  4. 29 5月, 2009 1 次提交
    • I
      wimax/i2400m: generate fake source MAC address with random_ether_addr() · fe442683
      Inaky Perez-Gonzalez 提交于
      The WiMAX i2400m driver needs to generate a fake source MAC address to
      fake an ethernet header (for destination, the card's MAC is
      used). This is the source of the packet, which is the basestation it
      came from. The basestation's mac address is not usable for this, as it
      uses its own namespace and it is not always available.
      
      Currently the fake source MAC address was being set to all zeros,
      which was causing trouble with bridging.
      
      Use random_ether_addr() to generate a proper one that creates no
      trouble.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      fe442683
  5. 12 3月, 2009 1 次提交
  6. 02 3月, 2009 2 次提交
  7. 01 2月, 2009 1 次提交
  8. 22 1月, 2009 1 次提交
  9. 08 1月, 2009 1 次提交
    • I
      i2400m: linkage to the networking stack · ce6cde92
      Inaky Perez-Gonzalez 提交于
      Implementation of the glue to the network stack so the WiMAX device
      shows up as an Ethernet device.
      
      Initially we shot for implementing a Pure IP device -- however, the
      world seems to turn around Ethernet devices. Main issues were with the
      ISC DHCP client and servers (as they don't understand types other than
      Ethernet and Token Ring).
      
      We proceeded to register with IANA the PureIP hw type, so that DHCP
      requests could declare such. We also created patches to the main ISC
      DHCP versions to support it. However, until all that permeates into
      deployments, there is going to be a long time.
      
      So we moved back to wrap Ethernet frames around the PureIP device. At
      the time being this has overhead; we need to reallocate with space for
      an Ethernet header. The reason is the device-to-host protocol
      coalesces many network packets into a single message, so we can't
      introduce Ethernet headers without overwriting valid data from other
      packets.
      
      Coming-soon versions of the firmware have this issue solved.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ce6cde92