1. 19 10月, 2009 7 次提交
    • I
      wimax/i2400m: cache firmware on system suspend · 7b43ca70
      Inaky Perez-Gonzalez 提交于
      In preparation for a reset_resume implementation, have the firmware
      image be cached in memory when the system goes to suspend and released
      when out.
      
      This is needed in case the device resets during suspend; the driver
      can't load firmware until resume is completed or bad deadlocks
      happen.
      
      The modus operandi for this was copied from the Orinoco USB driver.
      
      The caching is done with a kobject to avoid race conditions when
      releasing it. The fw loader path is altered only to first check for a
      cached image before trying to load from disk. A Power Management event
      notifier is register to call i2400m_fw_cache() or i2400m_fw_uncache()
      which take care of the actual cache management.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      7b43ca70
    • I
      wimax/i2400m: add reason argument to i2400m_dev_reset_handle() · 3ef6129e
      Inaky Perez-Gonzalez 提交于
      In preparation for reset_resume support, in which the same code path
      is going to be used, add a diagnostic message to dev_reset_handle()
      that can be used to distinguish how the device got there.
      
      This uses the new payload argument added to i2400m_schedule_work() by
      the previous commit.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      3ef6129e
    • I
      wimax/i2400m: clean up & add a payload argument to i2400m_schedule_work() · b0fbcb2a
      Inaky Perez-Gonzalez 提交于
      Forthcoming commits use having a payload argument added to
      i2400m_schedule_work(), which then becomes nearly identical to
      i2400m_queue_work().
      
      This patch thus cleans up both's implementation, making it share
      common helpers and adding the payload argument to
      i2400m_schedule_work().
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      b0fbcb2a
    • I
      wimax/i2400m: rework bootrom initialization to be more flexible · aba3792a
      Inaky Perez-Gonzalez 提交于
      This modifies the bootrom initialization code of the i2400m driver so
      it can more easily support upcoming hardware.
      
      Currently, the code detects two types of barkers (magic numbers) sent
      by the device to indicate the types of firmware it would take (signed
      vs non-signed).
      
      This schema is extended so that multiple reboot barkers are
      recognized; upcoming hw will expose more types barkers which will have
      to match a header in the firmware image before we can load it.
      
      For that, a barker database is introduced; the first time the device
      sends a barker, it is matched in the database. That gives the driver
      the information needed to decide how to upload the firmware and which
      types of firmware to use. The database can be populated from module
      parameters.
      
      The execution flow is not altered; a new function
      (i2400m_is_boot_barker) is introduced to determine in the RX path if
      the device has sent a boot barker. This function is becoming heavier,
      so it is put away from the hot reception path [this is why there is
      some reorganization in sdio-rx.c:i2400ms_rx and
      usb-notifc.c:i2400mu_notification_grok()].
      
      The documentation on the process has also been updated.
      
      All these modifications are heavily based on previous work by Dirk
      Brandewie <dirk.brandewie@intel.com>.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      aba3792a
    • I
      wimax: allow specifying debug levels as command line option · 4c2b1a11
      Inaky Perez-Gonzalez 提交于
      Add "debug" module options to all the wimax modules (including
      drivers) so that the debug levels can be set upon kernel boot or
      module load time.
      
      This is needed as currently there was a limitation where the debug
      levels could only be set when a device was succesfully
      enumerated. This made it difficult to debug issues that made a device
      not probe properly.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      4c2b1a11
    • I
      wimax/i2400m: add missing debug submodule definition · 4dc1bf07
      Inaky Perez-Gonzalez 提交于
      The i2400m driver was missing the definition for the sysfs debug
      level, which is declared in debug-levels.h.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      4dc1bf07
    • D
      wimax/i2400m: Ensure boot mode cmd and ack buffers are alloc'd before first message · a134fd6b
      Dirk Brandewie 提交于
      The change to the SDIO boot mode RX chain could try to use the cmd and
      ack buffers befor they were allocated.  USB does not have the problem
      but both were changed for consistency's sake.
      Signed-off-by: NDirk Brandewie <dirk.j.brandewie@intel.com>
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      a134fd6b
  2. 11 6月, 2009 7 次提交
  3. 29 5月, 2009 3 次提交
    • I
      wimax/i2400m: allow kernel commands to device to be logged too · 223beea2
      Inaky Perez-Gonzalez 提交于
      By running 'echo 1 > /sys/kernel/debug/wimax:wmxX/i2400m/trace_msg_from_user',
      the driver will echo to user space all the commands being sent to the
      device from user space, along with the responses.
      
      However, this only helps with the commands being sent from user space;
      with this patch, the trace hook is moved to i2400m_msg_to_dev(), which
      is the single access point for running commands to the device (both by
      user space and the kernel driver). This allows better debugging by
      having a complete stream of commands/acks and reports.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      223beea2
    • I
      wimax/i2400m: trace commands sent from user space on the "echo" pipe · 44b849d1
      Inaky Perez-Gonzalez 提交于
      When commands are sent from user space, trace both the command sent
      and the answer received over the "echo" pipe instead of over the
      "trace" pipe when command tracing is enabled. As well, when the device
      sends a reports/indications, send it over the "echo" pipe.
      
      The "trace" pipe is used by the device to send firmware traces;
      gets confusing. Another named pipe makes it easier to split debug
      information.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      44b849d1
    • 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
  4. 25 3月, 2009 1 次提交
  5. 02 3月, 2009 4 次提交
    • 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
    • K
      wimax: struct device - replace bus_id with dev_name(), dev_set_name() · 347707ba
      Kay Sievers 提交于
      Cc: inaky.perez-gonzalez@intel.com
      Cc: linux-wimax@intel.com
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      347707ba
    • 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
  6. 30 1月, 2009 1 次提交
  7. 08 1月, 2009 1 次提交