1. 05 Oct, 2010 1 commit
  2. 14 May, 2010 1 commit
    • Joe Perches's avatar
      drivers/net: Remove unnecessary returns from void function()s · a4b77097
      Joe Perches authored
      This patch removes from drivers/net/ all the unnecessary
      return; statements that precede the last closing brace of
      void functions.
      
      It does not remove the returns that are immediately
      preceded by a label as gcc doesn't like that.
      
      It also does not remove null void functions with return.
      
      Done via:
      $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
        xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'
      
      with some cleanups by hand.
      
      Compile tested x86 allmodconfig only.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4b77097
  3. 11 May, 2010 5 commits
    • Prasanna S Panchamukhi's avatar
      wimax/i2400m: Move module params to other file so they can be static · 9d7fdf1b
      Prasanna S Panchamukhi authored
      This patch moves the module parameters to the file where they
      can be avoided to be global and allow them to be static.
      
      The module param : idle_mode_disabled and power_save_disabled
      are moved from  driver.c to control.c. Also these module parameters
      are declared to be static as they are not required to be global anymore.
      The module param : rx_reorder_disabled is moved from driver.c file to
      rx.c file. Also this parameter is declated as static as it is not
      required to be global anymore.
      
      Signed-off-by: Prasanna S Panchamukhi<prasannax.s.panchamukhi@intel.com>
      9d7fdf1b
    • Cindy H Kao's avatar
      wimax/i2400m: Correct the error path handlers order in i2400m_post_reset() · 2354161d
      Cindy H Kao authored
      When bus_setup fails in i2400m_post_reset(), it falls to the error path handler
      "error_bus_setup:" which includes unlock the mutext. However, we didn't ever
      try to the obtain the lock when running bus_setup.
      
      The patch is to fix the misplaced error path handler "error_bus_setup:".
      Signed-off-by: default avatarCindy H Kao <cindy.h.kao@intel.com>
      2354161d
    • Cindy H Kao's avatar
      wimax/i2400m: add the error recovery mechanism on TX path · 599e5953
      Cindy H Kao authored
      This patch adds an error recovery mechanism on TX path.
      The intention is to bring back the device to some known state
      whenever TX sees -110 (-ETIMEOUT) on copying the data to the HW FIFO.
      
      The TX failure could mean a device bus stuck or function stuck, so
      the current error recovery implementation is to trigger a bus reset
      and expect this can bring back the device.
      
      Since the TX work is done in a thread context, there may be a queue of TX works
      already that all hit the -ETIMEOUT error condition because the device has
      somewhat stuck already. We don't want any consecutive bus resets simply because
      multiple TX works in the queue all hit the same device erratum, the flag
      "error_recovery" is introduced to denote if we are ready for taking any
      error recovery. See @error_recovery doc in i2400m.h.
      Signed-off-by: default avatarCindy H Kao <cindy.h.kao@intel.com>
      599e5953
    • Cindy H Kao's avatar
      wimax/i2400m: fix for missed reset events if triggered by dev_reset_handle() · f4e41345
      Cindy H Kao authored
      The problem is only seen on SDIO interface since on USB, a bus reset would
      really re-probe the driver, but on SDIO interface, a bus reset will not
      re-enumerate the SDIO bus, so no driver re-probe is happening. Therefore,
      on SDIO interface, the reset event should be still detected and handled by
      dev_reset_handle().
      
      Problem description:
      Whenever a reboot barker is received during operational mode (i2400m->boot_mode == 0),
      dev_reset_handle() is invoked to handle that function reset event.
      dev_reset_handle() then sets the flag i2400m->boot_mode to 1 indicating the device is
      back to bootmode before proceeding to dev_stop() and dev_start().
      If dev_start() returns failure, a bus reset is triggered by dev_reset_handle().
      
      The flag i2400m->boot_mode then remains 1 when the second reboot barker arrives.
      However the interrupt service routine i2400ms_rx() instead of invoking dev_reset_handle()
      to handle that reset event, it filters out that boot event to bootmode because it sees
      the flag i2400m->boot_mode equal to 1.
      
      The fix:
      Maintain the flag i2400m->boot_mode within dev_reset_handle() and set the flag
      i2400m->boot_mode to 1 when entering dev_reset_handle(). It remains 1
      until the dev_reset_handle() issues a bus reset. ie: the bus reset is
      taking place just like it happens for the first time during operational mode.
      
      To denote the actual device state and the state we expect, a flag i2400m->alive
      is introduced in addition to the existing flag i2400m->updown.
      It's maintained with the same way for i2400m->updown but instead of reflecting
      the actual state like i2400m->updown does, i2400m->alive maintains the state
      we expect. i2400m->alive is set 1 just like whenever i2400m->updown is set 1.
      Yet i2400m->alive remains 1 since we expect the device to be up all the time
      until the driver is removed. See the doc for @alive in i2400m.h.
      
      An enumeration I2400M_BUS_RESET_RETRIES is added to define the maximum number of
      bus resets that a device reboot can retry.
      
      A counter i2400m->bus_reset_retries is added to track how many bus resets
      have been retried in one device reboot. If I2400M_BUS_RESET_RETRIES bus resets
      were retried in this boot, we give up any further retrying so the device would enter
      low power state. The counter i2400m->bus_reset_retries is incremented whenever
      dev_reset_handle() is issuing a bus reset and is cleared to 0 when dev_start() is
      successfully done, ie: a successful reboot.
      Signed-off-by: default avatarCindy H Kao <cindy.h.kao@intel.com>
      f4e41345
    • Cindy H Kao's avatar
      wimax/i2400m: correct the error path handlers in dev_start() · 49d72df3
      Cindy H Kao authored
      This fix is to correct order of the handlers in the error path
      of dev_start(). When i2400m_firmware_check fails, all the works done
      before it should be released or cleared.
      Signed-off-by: default avatarCindy H Kao <cindy.h.kao@intel.com>
      49d72df3
  4. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  5. 07 Jan, 2010 1 commit
  6. 03 Nov, 2009 1 commit
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: introduce i2400m_reset(), stopping TX and carrier · c931ceeb
      Inaky Perez-Gonzalez authored
      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: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      c931ceeb
  7. 19 Oct, 2009 19 commits
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: make i2400m->bus_dev_{stop,start}() optional · 097acbef
      Inaky Perez-Gonzalez authored
      In coming commits, the i2400m SDIO driver will not use
      i2400m->bus_dev_stop().
      
      Thus changed to check before calling, as an empty stub has more
      overhead than a call to check if the function pointer is non-NULL.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      097acbef
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: Let device's status reports change the device state · 0c96859d
      Inaky Perez-Gonzalez authored
      Currently __i2400m_dev_start was forcing, after uploading firmware and
      doing a few checks to WIMAX_ST_UNINITIALIZED.
      
      This can be overriding state changes that the device might have caused
      by sending reports; thus it makes more sense to remove it and let the
      device update the status on its own by sending reports.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      0c96859d
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: queue device's report until the driver is ready for them · a0beba21
      Inaky Perez-Gonzalez authored
      The i2400m might start sending reports to the driver before it is done
      setting up all the infrastructure needed for handling them.
      
      Currently we were just dropping them when the driver wasn't ready and
      that is bad in certain situations, as the sync between the driver's
      idea of the device's state and the device's state dissapears.
      
      This changes that by implementing a queue for handling
      reports. Incoming reports are appended to it and a workstruct is woken
      to process the list of queued reports.
      
      When the device is not yet ready to handle them, the workstruct is not
      woken, but at soon as the device becomes ready again, the queue is
      processed.
      
      As a consequence of this, i2400m_queue_work() is no longer used, and
      thus removed.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      a0beba21
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: move i2400m_init() out of i2400m.h · af77dfa7
      Inaky Perez-Gonzalez authored
      Upcoming changes will have to add things to this function that expose
      more internals, which would mean more forward declarators.
      
      Frankly, it doesn't need to be an inline, so moved to driver.c, where
      the declarations will be taken from the header file.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      af77dfa7
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: fix deadlock: don't do BUS reset under i2400m->init_mutex · b9ee9501
      Inaky Perez-Gonzalez authored
      Since the addition of the pre/post reset handlers, it became clear
      that we cannot do a I2400M-RT-BUS type reset while holding the
      init_mutex, as in the case of USB, it will deadlock when trying to
      call i2400m_pre_reset().
      
      Thus, the following changes:
      
       - clarify the fact that calling bus_reset() w/ I2400M_RT_BUS while
         holding init_mutex is a no-no.
      
       - i2400m_dev_reset_handle() will do a BUS reset to recover a gone
         device after unlocking init_mutex.
      
       - in the USB reset implementation, when cold and warm reset fails,
         fallback to QUEUING a usb reset, not executing a USB reset, so it
         happens from another context and does not deadlock.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      b9ee9501
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: when stopping the device, cancel any pending message · 5eeae35b
      Inaky Perez-Gonzalez authored
      The stop procedure for the device must make sure that any task that is
      waiting on a message is properly cancelled.
      
      This was being taken care of only by the __i2400m_dev_reset_handle()
      path and the rest was working by chance because the waits have a
      timeout.
      
      Fixed by adding a proper cancellation in __i2400m_dev_stop().
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      5eeae35b
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: Implement pre/post reset support in the USB driver · 3725d8c9
      Inaky Perez-Gonzalez authored
      The USB stack can callback a driver is about to be reset by an
      external entity and right after it, so the driver can save state and
      then restore it.
      
      This commit implements said support; it is implemented actually in the
      core, bus-generic driver [i2400m_{pre,post}_reset()] and used by the
      bus-specific drivers. This way the SDIO driver can also use it once
      said support is brought to the SDIO stack.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      3725d8c9
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: do bootmode buffer management in i2400m_setup/release() · 2869da85
      Inaky Perez-Gonzalez authored
      After the introduction of i2400m->bus_setup/release, there is no more
      race condition where the bootmode buffers are needed before
      i2400m_setup() is called.
      
      Before, the SDIO driver would setup RX before calling i2400m_setup()
      and thus need those buffers; now RX setup is done in
      i2400m->bus_setup(), which is called by i2400m_setup().
      
      Thus, all the bootmode buffer management can now be done completely
      inside i2400m_setup()/i2400m_release(), removing complexity from the
      bus-specific drivers.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      2869da85
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: introduce i2400m->bus_setup/release · 0856ccf2
      Inaky Perez-Gonzalez authored
      The SDIO subdriver of the i2400m requires certain steps to be done
      before we do any acces to the device, even for doing firmware upload.
      
      This lead to a few ugly hacks, which basically involve doing those
      steps in probe() before calling i2400m_setup() and undoing them in
      disconnect() after claling i2400m_release(); but then, much of those
      steps have to be repeated when resetting the device, suspending, etc
      (in upcoming pre/post reset support).
      
      Thus, a new pair of optional, bus-specific calls
      i2400m->bus_{setup/release} are introduced. These are used to setup
      basic infrastructure needed to load firmware onto the device.
      
      This commit also updates the SDIO subdriver to use said calls.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      0856ccf2
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: clarify and fix i2400m->{ready,updown} · c2315b4e
      Inaky Perez-Gonzalez authored
      The i2400m driver uses two different bits to distinguish how much the
      driver is up. i2400m->ready is used to denote that the infrastructure
      to communicate with the device is up and running. i2400m->updown is
      used to indicate if 'ready' and the device is up and running, ready to
      take control and data traffic.
      
      However, all this was pretty dirty and not clear, with many open spots
      where race conditions were present.
      
      This commit cleans up the situation by:
      
       - documenting the usage of both bits
      
       - setting them only in specific, well controlled places
         (i2400m_dev_start, i2400m_dev_stop)
      
       - ensuring the i2400m workqueue can't get in the middle of the
         setting by flushing it when i2400m->ready is set to zero. This
         allows the report hook not having to check again for the bit to be
         set [rx.c:i2400m_report_hook_work()].
      
       - using i2400m->updown to determine if the device is up and running
         instead of the wimax state in i2400m_dev_reset_handle().
      
       - not loosing missed messages sent by the hardware before
         i2400m->ready is set. In rx.c, whatever the device sends can be
         sent to user space over the message pipes as soon as the wimax
         device is registered, so don't wait for i2400m->ready to be set.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      c2315b4e
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: cleanup initialization/destruction flow · 8f90f3ee
      Inaky Perez-Gonzalez authored
      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: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      8f90f3ee
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: on device stop, clean up pending wake & TX work · ac53aed9
      Inaky Perez-Gonzalez authored
      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: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      ac53aed9
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: cache firmware on system suspend · 7b43ca70
      Inaky Perez-Gonzalez authored
      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: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      7b43ca70
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: add reason argument to i2400m_dev_reset_handle() · 3ef6129e
      Inaky Perez-Gonzalez authored
      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: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      3ef6129e
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: clean up & add a payload argument to i2400m_schedule_work() · b0fbcb2a
      Inaky Perez-Gonzalez authored
      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: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      b0fbcb2a
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: rework bootrom initialization to be more flexible · aba3792a
      Inaky Perez-Gonzalez authored
      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: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      aba3792a
    • Inaky Perez-Gonzalez's avatar
      wimax: allow specifying debug levels as command line option · 4c2b1a11
      Inaky Perez-Gonzalez authored
      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: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      4c2b1a11
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: add missing debug submodule definition · 4dc1bf07
      Inaky Perez-Gonzalez authored
      The i2400m driver was missing the definition for the sysfs debug
      level, which is declared in debug-levels.h.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      4dc1bf07
    • Dirk Brandewie's avatar
      wimax/i2400m: Ensure boot mode cmd and ack buffers are alloc'd before first message · a134fd6b
      Dirk Brandewie authored
      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: default avatarDirk Brandewie <dirk.j.brandewie@intel.com>
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      a134fd6b
  8. 11 Jun, 2009 7 commits
  9. 29 May, 2009 3 commits
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: allow kernel commands to device to be logged too · 223beea2
      Inaky Perez-Gonzalez authored
      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: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      223beea2
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: trace commands sent from user space on the "echo" pipe · 44b849d1
      Inaky Perez-Gonzalez authored
      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: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      44b849d1
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: generate fake source MAC address with random_ether_addr() · fe442683
      Inaky Perez-Gonzalez authored
      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: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      fe442683
  10. 24 Mar, 2009 1 commit