1. 04 11月, 2009 1 次提交
  2. 19 10月, 2009 1 次提交
  3. 11 6月, 2009 4 次提交
    • C
      wimax/i2400m: use -EL3RST to indicate device reset instead of -ERESTARTSYS · 0bcfc5ef
      Cindy H Kao 提交于
      When the i2400m device resets, the driver code will force some
      functions to return a -ERESTARTSYS error code, which can is used by
      the caller to determine which recovery actions to take.
      
      However, in certain situations the only thing that can be done is to
      bubble up said error code to user space, for handling.
      
      However, -ERESTARSYS was a poor choice, as it is supposed to be used
      by the kernel only.
      
      As such, replace -ERESTARTSYS with -EL3RST; as well, in
      i2400m_msg_to_dev(), when the device is in boot mode (following a
      recent reset), return -EL3RST instead of -ENODEV (meaning the device
      is in bootrom mode after a reset, not that the device was
      disconnected, and thus, normal commands cannot be executed).
      Signed-off-by: NCindy H Kao <cindy.h.kao@intel.com>
      0bcfc5ef
    • I
      wimax/i2400m: if a device reboot happens during probe, handle it · b4013f91
      Inaky Perez-Gonzalez 提交于
      When a device reboot happens when we are under probe, with init_mutex
      taken, make sure we can recover. Have dev_reset_handle set boot mode
      and i2400m_msg_to_dev() will see it and fail gracefully instead of
      timing out.
      
      Found and diagnosed by Cindy H. Kao.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      b4013f91
    • I
      wimax/i2400m: don't reset device on i2400m_dev_shutdown() · b4bd07e3
      Inaky Perez-Gonzalez 提交于
      i2400m_dev_shutdown() tried to reset the device to put it in a known
      state before shutting down.
      
      But that turned out to be pointless. We reach this case in two paths:
      
       1 - when the device resets, to clean up state
       2 - when the driver is unloaded, for the same
      
      however, in both cases it is pointless; in (1) the device is already
      reset, why do it again? in (2) we can't -- the USB stack, for example,
      doesn't allow communicating with the device when the driver is being
      unbound and if the device is disconnected, the device is gone already.
      
      So just remove it. Leave the function as a placeholder for future
      cleanups that will be done from data allocated by the driver during
      device operation.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      b4bd07e3
    • I
      wimax/i2400m: introduce module parameter to disable entering power save · fb101674
      Inaky Perez-Gonzalez 提交于
      The i2400m driver waits for the device to report being ready for
      entering power save before asking it to do so. This module parameter
      allows control of said operation; if disabled, the driver won't ask
      the device to enter power save mode.
      
      This is useful in setups where power saving is not so important or
      when the overhead imposed by network reentry after power save is not
      acceptable; by combining this with parameter 'idle_mode_disabled', the
      driver will always maintain both the connection and the device in
      active state.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      fb101674
  4. 29 5月, 2009 3 次提交
  5. 02 3月, 2009 5 次提交
    • I
      wimax/i2400m: implement RX reorder support · c747583d
      Inaky Perez-Gonzalez 提交于
      Allow the device to give the driver RX data with reorder information.
      
      When that is done, the device will indicate the driver if a packet has
      to be held in a (sorted) queue. It will also tell the driver when held
      packets have to be released to the OS.
      
      This is done to improve the WiMAX-protocol level retransmission
      support when missing frames are detected.
      
      The code docs provide details about the implementation.
      
      In general, this just hooks into the RX path in rx.c; if a packet with
      the reorder bit in the RX header is detected, the reorder information
      in the header is extracted and one of the four main reorder operations
      are executed. In one case (queue) no packet will be delivered to the
      networking stack, just queued, whereas in the others (reset, update_ws
      and queue_update_ws), queued packet might be delivered depending on
      the window start for the specific queue.
      
      The modifications to files other than rx.c are:
      
      - control.c: during device initialization, enable reordering support
        if the rx_reorder_disabled module parameter is not enabled
      
      - driver.c: expose a rx_reorder_disable module parameter and call
        i2400m_rx_setup/release() to initialize/shutdown RX reorder
        support.
      
      - i2400m.h: introduce members in 'struct i2400m' needed for
        implementing reorder support.
      
      - linux/i2400m.h: introduce TLVs, commands and constant definitions
        related to RX reorder
      
      Last but not least, the rx reorder code includes an small circular log
      where the last N reorder operations are recorded to be displayed in
      case of inconsistency. Otherwise diagnosing issues would be almost
      impossible.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c747583d
    • I
      wimax/i2400m: support extended data RX protocol (no need to reallocate skbs) · fd5c565c
      Inaky Perez-Gonzalez 提交于
      Newer i2400m firmwares (>= v1.4) extend the data RX protocol so that
      each packet has a 16 byte header. This header is mainly used to
      implement host reordeing (which is addressed in later commits).
      
      However, this header also allows us to overwrite it (once data has
      been extracted) with an Ethernet header and deliver to the networking
      stack without having to reallocate the skb (as it happened in fw <=
      v1.3) to make room for it.
      
      - control.c: indicate the device [dev_initialize()] that the driver
        wants to use the extended data RX protocol. Also involves adding the
        definition of the needed data types in include/linux/wimax/i2400m.h.
      
      - rx.c: handle the new payload type for the extended RX data
        protocol. Prepares the skb for delivery to
        netdev.c:i2400m_net_erx().
      
      - netdev.c: Introduce i2400m_net_erx() that adds the fake ethernet
        address to a prepared skb and delivers it to the networking
        stack.
      
      - cleanup: in most instances in rx.c, the variable 'single' was
        renamed to 'single_last' for it better conveys its meaning.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd5c565c
    • I
      wimax/i2400m: allow control of the base-station idle mode timeout · 8987691a
      Inaky Perez-Gonzalez 提交于
      For power saving reasons, WiMAX links can be put in idle mode while
      connected after a certain time of the link not being used for tx or
      rx. In this mode, the device pages the base-station regularly and when
      data is ready to be transmitted, the link is revived.
      
      This patch allows the user to control the time the device has to be
      idle before it decides to go to idle mode from a sysfs
      interace.
      
      It also updates the initialization code to acknowledge the module
      variable 'idle_mode_disabled' when the firmware is a newer version
      (upcoming 1.4 vs 2.6.29's v1.3).
      
      The method for setting the idle mode timeout in the older firmwares is
      much more limited and can be only done at initialization time. Thus,
      the sysfs file will return -ENOSYS on older ones.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8987691a
    • I
      wimax/i2400m: firmware_check() encodes the firmware version in i2400m->fw_version · 6a0f7ab8
      Inaky Perez-Gonzalez 提交于
      Upcoming modifications will need to test for the running firmware
      version before activating a feature or not. This is helpful to
      implement backward compatibility with older firmware versions.
      
      Modify i2400m_firmware_check() to encode in i2400m->fw_version the
      major and minor version numbers of the firmware interface.
      
      As well, move the call to be done as the very first operation once we
      have communication with the device during probe() [in
      __i2400m_dev_start()]. This is needed so any operation that is
      executed afterwards can determine which fw version it is talking to.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6a0f7ab8
    • I
      wimax/i2400m: drop support for deprecated major fw interface, add for new minor · efa05d0f
      Inaky Perez-Gonzalez 提交于
      Firmware interface version 8.x.x has long been deprecated and is no
      longer supported (nor available, as it is a preproduction firmware),
      so it can be safely dropped.
      
      Add support for firmware interface v9.2.x (current is 9.1.x). Firmware
      version 9.2.x is backwards compatible with 9.1.x; new features are
      enabled if switches are pressed to turn them on. Forthcoming commits
      to the driver will start pressing those switches when the firmware
      interface supports it.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      efa05d0f
  6. 20 1月, 2009 1 次提交
  7. 08 1月, 2009 1 次提交
    • I
      i2400m: various functions for device management · 3a35a1d0
      Inaky Perez-Gonzalez 提交于
      This is a collection of functions used to control the device (plus a
      few helpers).
      
      There are utilities for handling TLV buffers, hooks on the device's
      reports to act on device changes of state [i2400m_report_hook()], on
      acks to commands [i2400m_msg_ack_hook()], a helper for sending
      commands to the device and blocking until a reply arrives
      [i2400m_msg_to_dev()], a few high level commands for manipulating the
      device state, powersaving mode and configuration plus the routines to
      setup the device once communication is established with it
      [i2400m_dev_initialize()].
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3a35a1d0