1. 20 1月, 2010 1 次提交
  2. 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
  3. 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
  4. 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
  5. 28 10月, 2009 1 次提交
  6. 08 10月, 2009 3 次提交
  7. 29 8月, 2009 1 次提交
  8. 20 8月, 2009 2 次提交
  9. 14 8月, 2009 1 次提交
  10. 25 7月, 2009 1 次提交
  11. 04 6月, 2009 1 次提交
  12. 23 5月, 2009 2 次提交
  13. 21 5月, 2009 1 次提交
  14. 12 5月, 2009 1 次提交
  15. 14 2月, 2009 1 次提交
  16. 10 2月, 2009 1 次提交
  17. 30 1月, 2009 4 次提交
  18. 13 12月, 2008 3 次提交
  19. 01 11月, 2008 2 次提交
  20. 18 8月, 2008 2 次提交
    • H
      removed unused #include <version.h> · 3eb75aac
      Huang Weiyi 提交于
      The drivers below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
        drivers/net/wireless/ath5k/base.c
        drivers/net/wireless/b43/main.c
        drivers/net/wireless/ipw2100.c
        drivers/net/wireless/ipw2200.c
        drivers/net/wireless/iwlwifi/iwl-3945.c
        drivers/net/wireless/iwlwifi/iwl-4965.c
        drivers/net/wireless/iwlwifi/iwl-5000.c
        drivers/net/wireless/iwlwifi/iwl-agn.c
        drivers/net/wireless/iwlwifi/iwl-core.c
        drivers/net/wireless/iwlwifi/iwl-eeprom.c
        drivers/net/wireless/iwlwifi/iwl-hcmd.c
        drivers/net/wireless/iwlwifi/iwl-power.c
        drivers/net/wireless/iwlwifi/iwl3945-base.c
      
      This patch removes the said #include <version.h>.
      Signed-off-by: NHuang Weiyi <weiyi.huang@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3eb75aac
    • J
      iwlwifi: fix printk newlines · 6f147926
      Jiri Slaby 提交于
      Add newlines at printk outputs to not break dmesg.
      Signed-off-by: NJiri Slaby <jirislaby@gmail.com>
      Cc: Zhu Yi <yi.zhu@intel.com>
      Cc: Reinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6f147926
  21. 05 8月, 2008 1 次提交
  22. 15 6月, 2008 2 次提交
  23. 04 6月, 2008 1 次提交