1. 15 10月, 2010 1 次提交
  2. 08 10月, 2010 2 次提交
  3. 06 10月, 2010 1 次提交
    • W
      iwlagn: reduce redundant parameter definitions · 7cb1b088
      Wey-Yi Guy 提交于
      move paramater definitions to a device paramater structure only
      leaving the device name, which antennas are used and what firmware
      file to use in the iwl_cfg structure.  this will not completely
      remove the redundancies but greatly reduce them for devices that
      only vary by name or antennas.  the parameters that are more
      likely to change within a given device family are left in iwl_cfg.
      also separate bt param structure added to help reduce more.
      Signed-off-by: NJay Sternberg <jay.e.sternberg@intel.com>
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      7cb1b088
  4. 26 6月, 2010 1 次提交
  5. 11 5月, 2010 1 次提交
  6. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      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: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  7. 20 1月, 2010 1 次提交
  8. 22 12月, 2009 3 次提交
    • R
      iwlwifi: fix 40MHz operation setting on cards that do not allow it · 6c3069b1
      Reinette Chatre 提交于
      Some devices have 40MHz operation disabled entirely. Ensure that driver do
      not enable 40MHz operation if a channel does not allow this.
      
      This fixes http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2135Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      CC: stable@kernel.org
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6c3069b1
    • J
      iwlwifi: fix EEPROM/OTP reading endian annotations and a bug · af6b8ee3
      Johannes Berg 提交于
      The construct "le16_to_cpu((__force __le16)(r >> 16))" has
      always bothered me when looking through the iwlwifi code,
      it shouldn't be necessary to __force anything, and before
      this code, "r" was obtained with an ioread32, which swaps
      each of the two u16 values in it properly when swapping the
      entire u32 value. I've had arguments about this code with
      people before, but always conceded they were right because
      removing it only made things not work at all on big endian
      platforms.
      
      However, analysing a failure of the OTP reading code, I now
      finally figured out what is going on, and why my intuition
      about that code being wrong was right all along.
      
      It turns out that the 'priv->eeprom' u8 array really wants
      to have the data in it in little endian. So the force code
      above and all really converts *to* little endian, not from
      it. Cf., for instance, the function iwl_eeprom_query16() --
      it reads two u8 values and combines them into a u16, in a
      little-endian way. And considering it more, it makes sense
      to have the eeprom array as on the device, after all not
      all values really are 16-bit values, the MAC address for
      instance is not.
      
      Now, what this really means is that all the annotations are
      completely wrong. The eeprom reading code should fill the
      priv->eeprom array as a __le16 array, with __le16 values.
      
      This also means that iwl_read_otp_word() should really have
      a __le16 pointer as the data argument, since it should be
      filling that in a format suitable for priv->eeprom.
      
      Propagating these changes throughout, iwl_find_otp_image()
      is found to be, now obviously visible, defective -- it uses
      the data returned by iwl_read_otp_word() directly as if it
      was CPU endianness. Fixing that, which is this hunk of the
      patch:
      
      -               next_link_addr = link_value * sizeof(u16);
      +               next_link_addr = le16_to_cpu(link_value) * sizeof(u16);
      
      is the only real change of this patch. Everything else is
      just fixing the sparse annotations.
      
      Also, the bug only shows up on big endian platforms with a
      1000 series card. 5000 and previous series do not use OTP,
      and 6000 series has shadow RAM support which means we don't
      ever use the defective code on any cards but 1000.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: stable@kernel.org
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      af6b8ee3
    • R
      iwlwifi: power up all devices for EEPROM read · f8701fe3
      Reinette Chatre 提交于
      Recent commits "iwlwifi: remove power-wasting calls to apm_ops.init()" and
      "iwlagn: power up device before initializing EEPROM" had the goal of
      reducing device power consumption from the time the module is loaded until
      the interface is brought up and the device's power saving mechanisms kick
      in. The idea is that once the module is loaded there is no need for the
      device to consume power until the interface is brought up.
      
      With the current solution the device is only powered up during EEPROM read,
      and then so also only if the EEPROM type is OTP. We have found that on
      certain platforms even non-OTP devices require power to be up during EEPROM
      read. On these platforms the driver never loads and the system log contains
      the following:
      
      iwlagn 0000:03:00.0: MAC is in deep sleep!.  CSR_GP_CNTRL = 0x080403D8
      
      We thus now power up all devices during EEPROM read.
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f8701fe3
  9. 19 11月, 2009 4 次提交
    • R
      iwlagn: power up device before initializing EEPROM · e43ab94d
      Reinette Chatre 提交于
      A recent change optimized the power usage by the device by only powering it
      up during EEPROM load if it is required (for OTP devices). This change causes
      an error on the 1000 series devices during module load.
      
      The error looks as follows:
      [ 1624.024524] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27kds
      [ 1624.024527] iwlagn: Copyright(c) 2003-2009 Intel Corporation
      [ 1624.024711] iwlagn 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
      [ 1624.024749] iwlagn 0000:01:00.0: setting latency timer to 64
      [ 1624.024909] iwlagn 0000:01:00.0: Detected Intel Wireless WiFi Link 1000 Series BGN REV=0x6C
      [ 1624.081263] iwlagn 0000:01:00.0: MAC is in deep sleep!.  CSR_GP_CNTRL = 0x080003D8
      [ 1624.092967] iwlagn 0000:01:00.0: OTP is empty
      [ 1624.092988] iwlagn 0000:01:00.0: Unable to init EEPROM
      [ 1624.093033] iwlagn 0000:01:00.0: PCI INT A disabled
      [ 1624.093065] iwlagn: probe of 0000:01:00.0 failed with error -2
      
      Adding a dump_stack() to where that error is printed shows the following:
      
      [ 1624.024524] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27kds
      [ 1624.024527] iwlagn: Copyright(c) 2003-2009 Intel Corporation
      [ 1624.024711] iwlagn 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
      [ 1624.024749] iwlagn 0000:01:00.0: setting latency timer to 64
      [ 1624.024909] iwlagn 0000:01:00.0: Detected Intel Wireless WiFi Link 1000 Series BGN REV=0x6C
      [ 1624.081263] iwlagn 0000:01:00.0: MAC is in deep sleep!.  CSR_GP_CNTRL = 0x080003D8
      [ 1624.081263] Pid: 3073, comm: work_for_cpu Tainted: G        W 2.6.31.5 #4
      [ 1624.081263] Call Trace:
      [ 1624.081263]  [<ffffffffa02395db>] T.726+0x22b/0x420 [iwlcore]
      [ 1624.081263]  [<ffffffffa023985a>] iwlcore_eeprom_acquire_semaphore+0x8a/0x190 [iwlcore]
      [ 1624.081263]  [<ffffffff81110c94>] ? __kmalloc+0x194/0x1c0
      [ 1624.081263]  [<ffffffffa02391f5>] ?  iwlcore_eeprom_verify_signature+0x25/0xf0 [iwlcore]
      [ 1624.081263]  [<ffffffffa0239c67>] iwl_eeprom_init+0x107/0xf40 [iwlcore]
      [ 1624.081263]  [<ffffffffa026ab9c>] ?  iwl_prepare_card_hw+0x11c/0x470 [iwlagn]
      [ 1624.081263]  [<ffffffff8127e2a4>] ?  pci_bus_write_config_byte+0x64/0x80
      [ 1624.081263]  [<ffffffffa026b1f8>] iwl_pci_probe+0x308/0xac0 [iwlagn]
      [ 1624.081263]  [<ffffffff810710a0>] ? do_work_for_cpu+0x0/0x30
      [ 1624.081263]  [<ffffffff81284912>] local_pci_probe+0x12/0x20
      [ 1624.081263]  [<ffffffff810710b3>] do_work_for_cpu+0x13/0x30
      [ 1624.081263]  [<ffffffff81075826>] kthread+0xa6/0xb0
      [ 1624.081263]  [<ffffffff81012fea>] child_rip+0xa/0x20
      [ 1624.081263]  [<ffffffff81075780>] ? kthread+0x0/0xb0
      [ 1624.081263]  [<ffffffff81012fe0>] ? child_rip+0x0/0x20
      [ 1624.092967] iwlagn 0000:01:00.0: OTP is empty
      [ 1624.092988] iwlagn 0000:01:00.0: Unable to init EEPROM
      [ 1624.093033] iwlagn 0000:01:00.0: PCI INT A disabled
      [ 1624.093065] iwlagn: probe of 0000:01:00.0 failed with error -2
      
      We know that the routines in this trace, iwlcore_eeprom_acquire_semaphore
      and iwlcore_eeprom_verify_signature, only access CSR registers and thus do
      not need the device to be awake if it is EEPROM. But for OTP it is required
      for the device to be awake to read these registers. Ensure device is awake
      before accessing these registers.
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Acked-by: NBen Cahill <ben.m.cahill@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e43ab94d
    • W
      iwlwifi: eliminate the possible 1/2 dBm tx power loss in 6x00 & 6x50 series · ae16fc3c
      Wey-Yi Guy 提交于
      In both 6x00 and 6x50 series, the enhanced/extended tx power table in
      EEPROM is used to set the max. tx power limit.
      This new tx power table is in 1/2 dBm format, which creates an issue of
      possibility of 1/2 dBm loss when driver set the tx power limit; because
      of driver keep track and report the tx power in dBm format.
      
      In order to prevent the 1/2 dBm loss, keep track of the true max tx
      power in 1/2 dBm format in driver; do the comparison and adjust the tx
      power if needed when send tx power command to uCode.
      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>
      ae16fc3c
    • W
      iwlwifi: remove unused parameter from iwl_channel_info · d7d14401
      Wey-Yi Guy 提交于
      Number of HT40 power parameters are not used; remove those from
      iwl_channel_info data structure
      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>
      d7d14401
    • W
      iwlwifi: validate enhanced tx power entry · 85f0d9e8
      Wey-Yi Guy 提交于
      Validate enhanced tx power entry read from EEPROM before applying the
      tx power value. Different versions of EEPROM might contain different size
      of table; always a good idea to make sure the entry is valid before
      applying to the targeted channel.
      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>
      85f0d9e8
  10. 03 11月, 2009 1 次提交
    • B
      iwlwifi: remove power-wasting calls to apm_ops.init() · 88521364
      Ben Cahill 提交于
      To save power, don't run apm_ops.init() until needed at "up" time.
      
      EEPROM (5000 and earlier devices) may be read without running apm_ops.init(),
      but OTP reads (6000 and newer devices) require a powered-up chip.
      Therefore, remove apm_ops.init() from the general path in XXXX_pci_probe(),
      and call it only if device uses OTP.  Once done with OTP read, call
      apm_ops.stop() to reset chip and save power until "up" time comes around.
      
      NOTE:  This patch depends on removal of priv->lock from iwl_apm_stop();
      lock does not get initialized until later in flow.  See patch
      "remove unneeded locks from apm_stop()".
      Signed-off-by: NBen Cahill <ben.m.cahill@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      88521364
  11. 28 10月, 2009 1 次提交
  12. 08 10月, 2009 3 次提交
  13. 29 8月, 2009 1 次提交
  14. 20 8月, 2009 2 次提交
  15. 14 8月, 2009 1 次提交
  16. 25 7月, 2009 1 次提交
  17. 04 6月, 2009 1 次提交
  18. 23 5月, 2009 2 次提交
  19. 21 5月, 2009 1 次提交
  20. 12 5月, 2009 1 次提交
  21. 14 2月, 2009 1 次提交
  22. 10 2月, 2009 1 次提交
  23. 30 1月, 2009 4 次提交
  24. 13 12月, 2008 3 次提交
  25. 01 11月, 2008 1 次提交