1. 26 1月, 2010 1 次提交
    • W
      iwlwifi: configure missed beacon threshold · a13d276f
      Wey-Yi Guy 提交于
      Add support to configure missed beacon threshold, by default, if receive
      "missed beacon" notification from uCode and has more than 5 consecutive
      beacon missed, then perform sensitivity calibration; with this change,
      allow user to adjust the missed beacon threshold from debugfs in case
      more sensitivity calibration required for better performance in noisy
      environment
      
      The default value (=5) should be good enough for the normal condition,
      but for very noisy environment, more sensitivity calibration could help
      improve the throughput, so by setting the missed beacon threshold to
      lower number, user might experience better performance result.
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a13d276f
  2. 20 1月, 2010 6 次提交
  3. 13 1月, 2010 2 次提交
  4. 22 12月, 2009 3 次提交
    • W
      iwlwifi: on-screen event log dump · b03d7d0f
      Wey-Yi Guy 提交于
      This feature enables the on-screen uCode event log dump. The original
      method will append the event log to syslog; with this capability,
      we also enable the user to write script to capture the
      events which provide additional flexibility to help uCode debugging
      
      Method
      1) change to debugfs directory (sys/kernel/debug/phyX/iwlagn/data)
      2) #cat log_event
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b03d7d0f
    • W
      iwlwifi: add continuous uCode event log capability · a9e1cb6a
      Wey-Yi Guy 提交于
      In order to help uCode debugging, adding the capability to provide
      continuous uCode event logging function.
      
      uCode events is located in round-robin event queue and filled by uCode,
      by enable continuous event logging, driver check the write pointer
      and log the newly added events in iwl_bg_ucode_trace() timer function.
      
      There is still possibility of missing events if event queue being
      wrapped before next event dump; but with this capability, we can have
      much better understanding of the uCode behavior during runtime; it can
      help to debug the uCode related issues.
      
      Methods to enable/disable the continuous event log:
      step 1: enable ucode trace timer
           "echo 1 >
      /sys/kernel/debug/ieee80211/phyX/iwlagn/debug/ucode_tracing"
      step 2: start ftrace
           sudo ./trace-cmd record -e iwlwifi_ucode:* sleep 1d
      step 3: stop ftrace
           sudo ./trace-cmd report trace.dat
      step 4: disable ucode trace timer
           "echo 0 >
      /sys/kernel/debug/ieee80211/phyX/iwlagn/debug/ucode_tracing"
      
      use "ucode_tracing" debugfs file to display number of event
      queue wrapped when driver attempt the continuous event logging. If event
      queue being wrapped more than once when driver has opportunity to log
      the event; it indicated there are events missing in the event log trace.
      
      This continuous event log function only available for 4965 and newer
      NICs.
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a9e1cb6a
    • W
      iwlwifi: dump "Control and Status Register" when detect uCode HW/SW error · 696bdee3
      Wey-Yi Guy 提交于
      When uCode HW/SW error detected, dumping important CSR (Control and Status
      Registers) values.
      Also add "csr" debugfs file to dump the current values of CSR defined in
      CSR table to syslog.
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      696bdee3
  5. 24 11月, 2009 6 次提交
  6. 19 11月, 2009 3 次提交
  7. 28 10月, 2009 5 次提交
  8. 08 10月, 2009 3 次提交
    • J
      iwlwifi: LED cleanup · e932a609
      Johannes Berg 提交于
      The iwlwifi drivers have LED blinking requirements that
      mac80211 cannot fulfill due to the use of just a single
      LED instead of different ones for TX, RX, radio etc.
      Instead, the single LED blinks according to transfers
      and is solid on the rest of the time. As such, having
      LED class devices registered that mac80211 triggers are
      connected to is pointless as we don't use the triggers
      anyway.
      
      Remove all the useless code and add hooks into the
      driver itself. At the same time, make the LED code
      abstracted so the core code that determines blink rate
      etc. can be shared between 3945 and agn in iwlcore.
      
      At the same time, the fact that we removed the use of
      the mac80211 LED triggers means we can also remove the
      IWLWIFI_LEDS Kconfig symbol since the LED support is
      now self-contained.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e932a609
    • W
      iwlwifi: reliable entering of critical temperature state · 7812b167
      Wey-Yi Guy 提交于
      When uCode detects critical temperature it should send "card state
      notification" interrupt to driver and then shut itself down to prevent
      overheating. There is a race condition where uCode shuts down before it
      can deliver the interrupt to driver.
      Additional method provided here for driver to enter CT_KILL state based
      on temperature reading.
      
      How it works:
      Method 1:
      If driver receive "card state notification" interrupt from uCode; it
      enters "CT_KILL" state immediately
      
      Method 2:
      If the last temperature report by Card reach Critical temperature,
      driver will send "statistic notification" request to uCode to verify the
      temperature reading, if driver can not get reply from uCode within
      300ms, driver will enter CT_KILL state automatically.
      
      Method 3:
      If the last temperature report by Card did not reach Critical
      temperature, but uCode already shut down due to critical temperature.
      All the host commands send to uCode will not get process by uCode;
      when command queue reach the limit, driver will check the last reported
      temperature reading, if it is within pre-defined margin, enter "CT_KILL"
      state immediately. In this case, when uCode ready to exit from "CT_KILL" state,
      driver need to restart the adapter in order to reset all the queues and
      resume normal operation.
      
      One additional issue being address here, when system is in CT_KILL
      state, both tx and rx already stopped, but driver still can send host
      command to uCode, it will flood the command queue since card was not
      responding; adding STATUS_CT_KILL flag to reject enqueue host commands
      to uCode if it is in CT_KILL state, when uCode is ready to come out of
      CT_KILL, driver will clear  the STATUS_CT_KILL bit and allow enqueue the host
      commands to uCode to recover from CT_KILL state.
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7812b167
    • W
      iwlwifi: show NVM version in debugfs · e307ddce
      Wey-Yi Guy 提交于
      Show version number along with dumping NVM data, the version information
      being removed from sysfs, add it back to debugfs to help debugging.
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e307ddce
  9. 29 9月, 2009 2 次提交
    • R
      iwlwifi: fix 3945 ucode info retrieval after failure · b7a79404
      Reinette Chatre 提交于
      When hardware or uCode problem occurs driver captures significant
      information from device to enable debugging. The format of this information
      is different between 3945 and 4965 and later devices, yet currently the
      3945 uses the 4965 and later format. Fix this by adding a new library call
      that is initialized to the correct formatting routine based on device.
      
      This moves the iwlagn event and error log handling back to iwl-agn.c to
      make it part of iwlagn module.
      
      Also remove the 3945 sysfs file that triggers dump of event log - there is
      already a debugfs file that can do it for all drivers.
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b7a79404
    • R
      iwlwifi: fix debugfs buffer handling · 2fac9717
      Reinette Chatre 提交于
      We keep track of where to write into a buffer by keeping a count of how
      much has been written so far. When writing to the buffer we thus take the
      buffer pointer and adding the count of what has been written so far.
      Keeping track of what has been written so far is done by incrementing
      this number every time something is written to the buffer with how much has
      been written at that time.
      
      Currently this number is incremented incorrectly when using the
      "hex_dump_to_buffer" call to add data to the buffer. Fix this by only
      adding what has been added to the buffer in that call instead of what has
      been added since beginning of buffer.
      
      Issue was discovered and discussed during testing of
      https://bugzilla.redhat.com/show_bug.cgi?id=464598 .
      
      When a user views any of these files they will see something like:
      
      [  179.355202] ------------[ cut here ]------------
      [  179.355209] WARNING: at ../lib/vsprintf.c:989 vsnprintf+0x5ec/0x5f0()
      [  179.355212] Hardware name: VGN-Z540N
      [  179.355213] Modules linked in: i915 drm i2c_algo_bit i2c_core ipv6 acpi_cpufreq cpufreq_userspace cpufreq_powersave cpufreq_ondemand cpufreq_conservative cpufreq_stats freq_table container sbs sbshc arc4 ecb iwlagn iwlcore joydev led_class mac80211 af_packet pcmcia psmouse sony_laptop cfg80211 iTCO_wdt iTCO_vendor_support pcspkr serio_raw rfkill intel_agp video output tpm_infineon tpm tpm_bios button battery yenta_socket rsrc_nonstatic pcmcia_core processor ac evdev ext3 jbd mbcache sr_mod sg cdrom sd_mod ahci libata scsi_mod ehci_hcd uhci_hcd usbcore thermal fan thermal_sys
      [  179.355262] Pid: 5449, comm: cat Not tainted 2.6.31-wl-54419-ge881071 #62
      [  179.355264] Call Trace:
      [  179.355267]  [<ffffffff811ad14c>] ? vsnprintf+0x5ec/0x5f0
      [  179.355271]  [<ffffffff81041348>] warn_slowpath_common+0x78/0xd0
      [  179.355275]  [<ffffffff810413af>] warn_slowpath_null+0xf/0x20
      [  179.355277]  [<ffffffff811ad14c>] vsnprintf+0x5ec/0x5f0
      [  179.355280]  [<ffffffff811ad23d>] ? scnprintf+0x5d/0x80
      [  179.355283]  [<ffffffff811ad23d>] scnprintf+0x5d/0x80
      [  179.355286]  [<ffffffff811aed29>] ? hex_dump_to_buffer+0x189/0x340
      [  179.355290]  [<ffffffff810e91d7>] ? __kmalloc+0x207/0x260
      [  179.355303]  [<ffffffffa02a02f8>] iwl_dbgfs_nvm_read+0xe8/0x220 [iwlcore]
      [  179.355306]  [<ffffffff811a9b62>] ? __up_read+0x92/0xb0
      [  179.355310]  [<ffffffff810f0988>] vfs_read+0xc8/0x1a0
      [  179.355313]  [<ffffffff810f0b50>] sys_read+0x50/0x90
      [  179.355316]  [<ffffffff8100bd6b>] system_call_fastpath+0x16/0x1b
      [  179.355319] ---[ end trace 2383d0d5e0752ca0 ]---
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2fac9717
  10. 29 8月, 2009 1 次提交
  11. 14 8月, 2009 7 次提交
  12. 04 8月, 2009 1 次提交
    • J
      drivers/net/wireless/iwlwifi: introduce missing kfree · c37457e6
      Julia Lawall 提交于
      Move orthogonal error handling code up before a kzalloc, so that it
      doesn't have to free the allocated data.
      
      The semantic match that finds the problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      expression E;
      identifier f,f1,l;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      <... when != x
           when != if (...) { <+...x...+> }
      (
      x->f1 = E
      |
       (x->f1 == NULL || ...)
      |
       f(...,x->f1,...)
      )
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Acked-by: NZhu Yi <yi.zhu@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c37457e6