Commit Graph

172 Commits (2814298639619b0aa994fe1aee55438f1e26a2a8)

Author SHA1 Message Date
Johannes Berg 559a4741b8 iwlwifi: disable powersave for 4965
There's a bug in 4965 powersave that appears to
be related to the way it keeps track of its data
during sleep, but we haven't found it yet. Due to
that, using powersave may spontaneously cause the
device to SYSASSERT when transitioning from sleep
to wake. Therefore, disable powersave for 4965,
until (if ever, unfortunately) we can identify
and fix the problem.

Cf. http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=1982
which was closed, but now has re-appeared with
IDLE mode, which probably means we never really
fixed it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-14 14:36:05 -04:00
Daniel C Halperin 31513be8a0 iwlwifi: use iwl_hwrate_get_mac80211_idx where appropriate
For HT packets, mac80211 expects the rate_idx to be an MCS number, which is the
lower byte of rate_n_flags.  However, iwl_hwrate_to_plcp_idx takes the MCS
number and reduces it down to the range 0-8 (6 to 60 Mbps), removing the bits
that signify multiply streams, HT40 Duplicate mode, or unequal modulation.
This version is used for various internal purposes through the driver.

Add the function iwl_hwrate_get_mac80211_idx, an alternate version which takes
the rate and the band and returns the mac80211 index (MCS, for HT packets, and
PLCP rate, for legacy packets).

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31 14:42:10 -04:00
Johannes Berg 3ac64beecd mac80211: allow configure_filter callback to sleep
Over time, a whole bunch of drivers have come up
with their own scheme to delay the configure_filter
operation to a workqueue. To be able to simplify
things, allow configure_filter to sleep, and add
a new prepare_multicast callback that drivers that
need the multicast address list implement. This new
callback must be atomic, but most drivers either
don't care or just calculate a hash which can be
done atomically and then uploaded to the hardware
non-atomically.

A cursory look suggests that at76c50x-usb, ar9170,
mwl8k (which is actually very broken now), rt2x00,
wl1251, wl1271 and zd1211 should make use of this
new capability.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:58 -04:00
Daniel C Halperin b261793da5 iwlwifi: use station HT capabilities and BSS operating mode for Green-field
Green-field mode should be configured in the HT station table.  This patch uses
both the per-station GF support flag as well as the current BSS HT operation
mode (non-GF stations present flag).

Added the "ht_greenfield_support" field to struct iwl_cfg to replace the
device-specific check in rs_use_green().  That check has been moved to
iwlcore_init_ht_hw_capab().

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:33:12 -04:00
Wey-Yi Guy 415e49936b iwlwifi: traverse linklist to find the valid OTP block
For devices using OTP memory, EEPROM image can start from
any one of the OTP blocks. If shadow RAM is disabled, we need to
traverse link list to find the last valid block, then start the EEPROM
image reading.

If OTP is not full, the valid block is the block _before_ the last block
on the link list; the last block on the link list is the empty block
ready for next OTP refresh/update.

If OTP is full, then the last block is the valid block to be used for
configure the device.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:33:11 -04:00
Reinette Chatre 450ccb36b4 iwlwifi: fix missing EXPORT_SYMBOL
When compiling without CONFIG_IWLWIFI_DEBUGFS there is a missing
iwl_update_stats symbol. This is fixed by making this function an inline in
the case when CONFIG_IWLWIFI_DEBUGFS is not set due to the hot path in
which it is used.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-14 09:13:50 -04:00
Reinette Chatre c03ea16285 iwlwifi: revert uCode Alive notification with timeout
commit "iwlwifi: uCode Alive notification with timeout" introduced a more
reliable mechanism for ucode loading. Unfortunately we hit a problem with
it frequently enough to make a 4965 unusable. The problem can be seen in
debug log below. What this code attempts is to set runtime ucode up to
load, start a timer to wait for the alive response from runtime ucode, and
if it times out it tries again. As can be seen below we receive the alive
response and wake the waiting task _before_ the tasks starts waiting. The
task thus times out as the alive response is not received while it is
waiting for it and it restarts the device. This starts the cycle all over
again.

[29739.000819] ieee80211 phy0: U iwl_mac_start enter
[29739.005751] ieee80211 phy0: U iwl_prepare_card_hw iwl_prepare_card_hw enter
[29739.012798] ieee80211 phy0: U iwl_set_hw_ready hardware ready
[29739.057200] ieee80211 phy0: U iwl4965_load_bsm Begin load bsm
[29739.063366] ieee80211 phy0: U iwl4965_verify_bsm Begin verify bsm
[29739.072485] ieee80211 phy0: U iwl4965_verify_bsm BSM bootstrap uCode image OK
[29739.079671] ieee80211 phy0: U iwl4965_load_bsm BSM write complete, poll 0 iterations
[29739.257019] ieee80211 phy0: I iwl_rx_reply_alive Alive ucode status 0x00000001 revision 0x1 0x9
[29739.260964] ieee80211 phy0: I iwl_rx_reply_alive Initialization Alive received.
[29739.260964] ieee80211 phy0: U __iwl_up iwlagn is coming up
[29739.278571] ieee80211 phy0: U iwl_mac_start Start UP work done.
[29739.284509] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 788
[29739.292432] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 10312
[29739.302004] ieee80211 phy0: U iwl_verify_ucode Initialize uCode is good in inst SRAM
[29739.309746] ieee80211 phy0: U iwl4965_hw_get_temperature Running temperature calibration
[29739.317833] ieee80211 phy0: U iwl4965_hw_get_temperature Calib values R[1-3]: -36 13522 -13496 R4: -2726
[29739.327337] ieee80211 phy0: U iwl4965_hw_get_temperature Calibrated temperature: 310K, 37C
[29739.335598] ieee80211 phy0: U iwl4965_init_alive_start Initialization Alive received.
[29739.343477] ieee80211 phy0: U iwl4965_set_ucode_ptrs Runtime uCode pointers are set.
[29739.351283] ieee80211 phy0: I iwl_rx_reply_alive Alive ucode status 0x00000001 revision 0x1 0x0
[29739.355210] ieee80211 phy0: I iwl_rx_reply_alive Runtime Alive received.
[29739.366731] iwlagn 0000:03:00.0: Runtime uCode already alive? Waiting for alive anyway
[29743.284110] iwlagn 0000:03:00.0: START_ALIVE timeout after 4000ms.
[29743.290337] ieee80211 phy0: U iwl_mac_add_interface enter: type 2
[29744.364089] iwlagn 0000:03:00.0: Runtime timeout after 5000ms
[29744.370882] ieee80211 phy0: U iwl_alive_start Runtime Alive received.
[29744.377347] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 788
[29744.385287] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 10312
[29744.393397] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 94720
[29744.415835] ieee80211 phy0: U iwl_verify_ucode Runtime uCode is good in inst SRAM

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-14 09:13:48 -04:00
Wey-Yi Guy 22fdf3c9e1 iwlwifi: Traffic type and counter for debugFs
Break down the traffic type and counter for both Tx and Rx.
Enhance the tx_statistics and rx_statistics debugfs function and move
to /sys/kernel/debug/ieee80211/phy0/iwlagn/debug directory to help
better debugging both driver and uCode related problems.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-14 09:13:47 -04:00
Wey-Yi Guy 20594eb0da iwlwifi: new debugging feature for dumping data traffic
The traffic buffer will only beallocated and used if either bit 23
(IWL_DX_TX) or bit 24 (IWL_DL_RX) of "debug" is set;
example: "debug=0x800000" - log tx data traffic
         "debug=0x1000000" - log rx data traffic
         "debug=0x1800000" - log both tx and rx traffic

The traffic log will store the beginning portion (64 bytes)  of the
latest 256 of tx and rx packets in the round-robbin buffer for
debugging,
user can examine the log through debugfs file.

How to display the current logged tx/rx traffic and txfifo and rxfifo
read/write point:
"cat traffic_log" in /sys/kernel/debug/ieee80211/phy0/iwlagn/debug
directory

By echo "0" to traffic_log file will empty the traffic log buffer and
reset both tx and rx taffic log index to 0.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-14 09:13:46 -04:00
Wey-Yi Guy 7aafef1c6e iwlwifi: name changed from "fat" to "ht40"
Rename "fat" to "ht40"
The term "fat channel" is deprecated in favor of "HT40"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-14 09:13:46 -04:00
Wey-Yi Guy 65b7998a9b iwlwifi: Distinguish power amplifier for 6000 series
For 6x00 2x2 NIC, two types of Power Amplifier are available.
In order for uCode to apply correct tx power,
driver needs to program the CSR_GP_DRIVER_REG register and
let uCode know the type of PA.
If driver do not program CSR_GP_DRIVER_REG register (default to 0),
then it is uCode's decision for tx power

2x2 Hybrid card: use both internal and external PA
2x2 IPA(Internal Power Amplifier) card: internal PA only

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:44:22 -04:00
Johannes Berg 5696aea6f2 iwlwifi: remove command callback return value
No existing callbacks use anything other than the return
value 1, which means that the caller should free the
reply skb, so it seems safer in terms of not introducing
memory leaks to simply remove the return value and let
the caller always free the skb.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-27 15:24:22 -04:00
Johannes Berg c2acea8e9b iwlwifi: fix up command sending
The current command sending in iwlwifi is a bit of a mess:
 1) there is a struct, iwl_cmd, that contains both driver
    and device data in a single packed structure -- this
    is very confusing
 2) the on-stack data and the command metadata share a
    structure by embedding the latter in the former, which
    is also rather confusing because it leads to weird
    unions and similarly odd constructs
 3) each txq always has enough space for 256 commands,
    even if only 32 end up being used

This patch fixes these things:
 1) rename iwl_cmd to iwl_device_cmd and keep track of
    command metadata and device command separately, in
    two arrays in each tx queue
 2) remove the 'meta' member from iwl_host_cmd and only
    put in the required members
 3) allocate the cmd/meta arrays separately instead of
    embedding them into the txq structure

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-27 15:24:21 -04:00
Wey-Yi Guy 30a12a8fbb iwlwifi: change iwl_enable/disable_interrupts to "inline"
iwl_enable_interrupts is being called inside the interrupt,
change from function call to inline

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-24 15:05:26 -04:00
Reinette Chatre a562a9dda7 iwlwifi: make debug level more user friendly
* Deprecate the "debug50" module parameter used to obtain
  5000 series and up debugging. Replace it with "debug" module
  parameter to match with original driver and be consistent
  between them. The "debug50" module parameter can still be used,
  except that the module parameter is not writable in keeping
  with its previous state. We currently just mark it as "deprecated"
  and do not have it in the feature-removal-schedule. Some more
  cleanup of module parameters needs to be done and can then be
  entered together.

* Only make "debug" module parameters visible if the driver
  is compiled with CONFIG_IWLWIFI_DEBUG. This will eliminate
  a lot of confusion where users think they have set debug flags
  but yet cannot see any debug output.

* Make module parameters writable. This eliminates the need for the
  "debug_level" sysfs file, which can now also be deprecated and
  added to feature-removal-schedule. This file is in significant
  use though with many iwlwifi documents and text referring users
  to it. We can thus not take its removal lightly and keep it around.

With iwlcore shared between iwlagn and iwl3945 we really do not need
debug module parameters for each but can instead have one debug
module parameter for the iwlcore module. The same issue is here as
with the sysfs file - a lot of iwlwifi documentation and text (like
bug reports) rely on iwlagn and iwl3945 having this module parameter,
so changing this to a module parameter of iwlcore will have significant
impact and we do not do this for that reason.

One consequence of this patch is that if a user is running a system
with both 3945 and later hardware then the setting of the one module
parameter will affect the value of the other. The likelihood of this
seems low - and even if this setup is present it does not seem like an
issue for both modules to run with the same debug level.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-24 15:05:25 -04:00
Wey-Yi Guy 34a66de628 iwlwifi: uCode Alive notification with timeout
Wait for REPLY_ALIVE notification from init and runtime uCode.
based on the type of REPLY_ALIVE, different status bit will be set to
wake up the queue:
STATUS_INIT_UCODE_ALIVE for init uCode
STATUS_RT_UCODE_ALIVE for runtime uCode.

If timeout, attempt to download the failing uCode image again. This can
only be done for the init ucode images of all iwlagn devices and the
runtime ucode image of the 5000 series and up. If there is a problem
with the 4965 runtime ucode coming up we restart the interface and thus
trigger a new download of the init ucode also.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-24 15:05:25 -04:00
Jay Sternberg cc0f555d51 iwlwifi: Handle new firmware file with ucode build number in header
Adding new API version to account for change to ucode file format.  New
header includes the build number of the ucode.  This build number is the
SVN revision thus allowing for exact correlation to the code that
generated it.

The header adds the build number so that older ucode images can also be
enhanced to include the build in the future.

some cleanup in iwl_read_ucode needed to ensure old header not used and
reduce unnecessary references through pointer with the data is already
in heap variable.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-24 15:05:24 -04:00
Johannes Berg a94ca4e7af iwlwifi: make some logging functions static/unexport
iwl_dump_nic_error_log can be static and iwl_dump_nic_event_log
doesn't need to be exported.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-24 15:05:14 -04:00
Tomas Winkler 2c2f3b3388 iwlwifi: unify iwl_setup_rxon_timing
This patch unifies setup_rxon_timing funcions
of AGN and 3945. HWs differ only in supported maximal
beacon interval. This is reflected in hw_paras.max_beacon_itrvl

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10 15:01:57 -04:00
Johannes Berg 4e05c2347a iwlwifi: scan requested channels only
When userspace requests only certain channels to be scanned,
we currently ignore that request entirely.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10 15:01:56 -04:00
Johannes Berg a60e77e5a4 iwlwifi: port to cfg80211 rfkill
This ports the iwlwifi rfkill code to the new API offered by
cfg80211 and thus removes a lot of useless stuff. The soft-
rfkill is completely removed since that is now handled by
setting the interfaces down.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:27:49 -04:00
Reinette Chatre c18bd87b65 iwlwifi: fix comment describing disable_11n
Fixing a comment in the code describing this module parameter.
The description printed when user runs "modinfo" is correct.

Reported-by: Jiajia Zheng <jiajia.zheng@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-04 10:58:13 -04:00
Tomas Winkler c587de0b8d iwlwifi: unify station management
This patch unifies 3945 and AGN station management
It also removes useless struct iwl_station_mgmt ops
and cleanups a bit the interface

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Tested-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-04 10:56:20 -04:00
Mohamed Abbas 4752c93c30 iwlcore: Allow skb allocation from tasklet.
If RX queue becomes empty then we need to restock the queue from tasklet to prevent
ucode from starving. A caller to iwl_rx_allocate will decide if allocated buffer should
come from GFP_ATOMIC or GFP_KERNEL.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-22 14:06:08 -04:00
Mohamed Abbas ef850d7cb3 iwlcore: support ICT interrupt
Add ICT interrupt handler support, ICT should improve CPU utilization
 since it does not require target read which is very expensive. This
 interrupt handler only added to 5000 cards and newer. Device will write
 interrupts to ICT shared table to inform driver about its interrupts.

These patches will not touch 3945 and 4965 interrupt handlers and tasklet.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-22 14:06:05 -04:00
Wey-Yi Guy 62161aefa4 iwlwifi: Temperature sensor voltage reading for 5150
The temperature measurement by uCode for 5150 and 5000 are different
        CSR_HW_REV_TYPE_5150: temperature sensor output voltage
        CSR_HW_REV_TYPE_5000: temperature in Celsius
temperature related operation for 5150 is measured by temperature sensor
output voltage; additional conversion is required for set and store
the temperature.

To make sure support different HW design; implement _ops method for
temperature related functions (temperature reading and set ct kill
threshold)

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-22 14:06:03 -04:00
Johannes Berg 782571f46f iwlwifi: make iwl_set_rate static
It's not needed outside iwl-core.c

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-11 15:23:55 -04:00
Johannes Berg 2d0ddec5b2 mac80211: unify config_interface and bss_info_changed
The config_interface method is a little strange, it contains the
BSSID and beacon updates, while bss_info_changed contains most
other BSS information for each interface. This patch removes
config_interface and rolls all the information it previously
passed to drivers into bss_info_changed.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06 15:14:36 -04:00
Abhijeet Kolekar 09f9bf79b7 iwlwifi: remove radio disable parameter.
Patch removes the "manual radio disable" parameter
as there is no usage scenario of disabling radio using this module parameter.
User can use iwconfig's txpower to enable and disable radio.

This module parameter also does not work as expected. During module load
the status of radio is set, the radio is not actually disabled. Even so,
the moment mac80211 requests the interface to be up the radio will be
enabled again.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:19 -04:00
Wey-Yi Guy 279b05d436 iwlwifi: clean up unused NL80211_IFTYPE_MONITOR for Monitor mode
This patch clean up the code for NL80211_IFTYPE_MONITOR mode,
priv->iw_mode is set in add_interface, but add_interface is never called
for monitor mode.
The only way mac80211 informs us about monitor mode is through
configuring filter; since iw_mode will never set to
NL80211_IFTYPE_MONITOR, modify and remove all the code refer to
NL80211_IFTYPE_MONITOR and replace with iwl_is_monitor_mode() function
call.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:19 -04:00
Johannes Berg 1ecf9fc131 iwlwifi: improve scan support
This modifies iwlwifi to
 * no longer build its own probe request, but use mac80211's
 * therefore, support arbitrary scan IEs (up to the max len)
 * support multiple scan SSIDs
 * support passive scanning

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:18 -04:00
Wey-Yi Guy a83b9141b5 iwlwifi: adding interrupt counter in debugfs for debugging
This patch adds interrupt statistics report to debugfs, this can help to
understand number of interrupts happened which including HW/SW error for
easier and better debugging.

in /sys/kernel/debug/ieee80211/phyN/iwlagn/data directory
use "cat interrupt" to view the current interrupt counter
use "echo 0 > interrupt" to clear interrupt counter

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:44 -04:00
Abhijeet Kolekar bd564261d7 iwl3945: use iwl_mac_reset_tsf from iwlwifi
3945 can now use iwl_mac_reset_tsf from iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:43 -04:00
Abhijeet Kolekar aa89f31e70 iwl3945: use iwl_mac_get_tx_stats from iwlwifi
3945 can now use iwl_mac_get_tx_stats from iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:43 -04:00
Abhijeet Kolekar 5ee5811e24 iwl3945: use iwl_mac_config_interface from iwlwifi
3945 can now use iwl_mac_config_interface from iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:43 -04:00
Abhijeet Kolekar 60690a6a38 iwlwifi: add config_ap lib op
add config_ap lib op to iwlwifi and iwl3945 in preparation
of future 3945 porting actions.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:43 -04:00
Abhijeet Kolekar 4808368dad iwl3945: use iwl_mac_config from iwlwifi
3945 can now use iwl_mac_config from iwlwifi

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:43 -04:00
Abhijeet Kolekar d8052319f2 iwl3945: use iwl_mac_remove_interface from iwlwifi
3945 can now use iwl_mac_remove_interface from iwlwifi

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:43 -04:00
Abhijeet Kolekar cbb6ab94b6 iwl3945: use iwl_mac_add_interface from iwlwifi
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:43 -04:00
Abhijeet Kolekar 727882d624 iwl3945: use iwl_set_mode in 3945
3945 can now use iwl_set_mode from iwlcore library.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:42 -04:00
Abhijeet Kolekar 4582353166 iwlwifi: add set_rxon_chain op
add set_rxon_chain op to iwlwifi cfg ops in preparation of
future 3945 porting work.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:42 -04:00
Abhijeet Kolekar 06fd3d86a4 iwl3945/iwlwifi: unify add_station function
Patch unifies the add_station function for 3945 and iwlwifi drivers.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:42 -04:00
Abhijeet Kolekar 79fa455a99 iwlwifi: add station management ops
This patch adds declarations for station management ops to iwlwifi drivers.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:42 -04:00
Abhijeet Kolekar e0158e6110 iwlwifi: add commit_rxon lib
Patch adds commit_rxon lib operation to iwlwifi and iwl3945 drivers.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:41 -04:00
Abhijeet Kolekar 9944b938f2 iwl3945: use iwl_mac_beacon_update
3945 can use iwl_mac_beacon_update.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:41 -04:00
Abhijeet Kolekar 5bbe233b9b iwl3945: use iwl_bss_info_changed
3945 can use iwl_bss_info_changed.
A new lib op is created for post_assoicate to distinguish between
3945 and iwlwifi's post_associate operations.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:41 -04:00
Abhijeet Kolekar 488829f1b1 iwl3945: use iwl_mac_conf_tx
3945 now uses iwl_mac_conf_tx.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:27 -04:00
Wey-Yi Guy 6da3a13e4f iwlwifi: merge and better support of suspend/resume for iwlagn and iwl3945
With mac80211's help to call stop() and start() in mac80211
suspend/resume function, both iwlagn and iwl3945 no longer calling
stop() and start(); remove un-necessary STATUS_IN_SUSPEND bit from both
header files and functions,

Move apm_ops.stop() function into pci_suspend() to ensure
DMA is stopped before go into suspend mode.

iwl3945 has the similar suspend/resume function as iwlagn, so move both
functions to iwlcore to be shared by both drivers.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:27 -04:00
Abhijeet Kolekar 3e5d238fa7 iwl3945: use iwl_cmd_queue_free
iwl_cmd_queue_free needs to be used to free up the cmd_queue,
as TFD slots for cmd_queue and tx_queue are different.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-27 20:12:59 -04:00
Abhijeet Kolekar 14d2aac580 iwl3945 : use iwl_activate_qos
3945 can use iwl_activate_qos instead of iwl3945_activate_qos.
Patch does two things
1) Patch adds iwl_activate_qos in core library.
2) 3945 makes use of iwl_activate_qos.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:36 -05:00