Commit Graph

1386 Commits

Author SHA1 Message Date
Wey-Yi Guy
d5f4cf71f7 iwlwifi: control led while update tx/rx bytes counts
LED blinking rate is based on tx/rx traffic, the most reasonable place
to do it is after update the traffic byte counts

This fixes the recent LED blinking breakage on 3945 introduced by "iwlwifi:
separate led function from statistic notification"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-23 17:05:30 -05:00
Ben Cahill
74ba67edfc iwlagn: Use iwl_write8() for CSR_INT_COALESCING register
CSR_INT_COALESCING previously had only one, but now has two single-byte fields.
With only one single-byte field (lowest order byte) it was okay to write via
iwl_write32(), but now with two, an iwl_write32() to the lower order field
clobbers the other field (odd-address CSR_INT_PERIODIC_REG, offset 0x5), and an
iwl_write32() to CSR_INT_PERIODIC_REG could clobber the lowest byte of the
next-higher register (CSR_INT, offset 0x8).

Fortunately, no bad side effects have been produced by the iwl_write32()
usage, due to order of execution (low order byte was always written before
higher order byte), and the fact that writing "0" to the low byte of the
next higher register has no effect (only action is when writing "1"s).

Nonetheless, this cleans up the accesses so no bad side effects might occur
in the future, if execution order changes, or more bit fields get added to
CSR_INT_COALESCING.

Add some comments regarding periodic interrupt usage.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-23 17:05:30 -05:00
Ben Cahill
4e03185fb8 iwlwifi: Add iwl_write8()
To support byte writes to CSR_INT_COALESCING and CSR_INT_PERIODIC registers,
add iwl_write8(), including debug/trace support.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-23 17:05:30 -05:00
Johannes Berg
5be83de54c cfg80211: convert bools into flags
We've accumulated a number of options for wiphys
which make more sense as flags as we keep adding
more. Convert the existing ones.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-19 11:08:50 -05:00
Johannes Berg
c951ad3550 mac80211: convert aggregation to operate on vifs/stas
The entire aggregation code currently operates on the
hw pointer and station addresses, but that needs to
change to make stations purely per-vif; As one step
preparing for that make the aggregation code callable
with the station, or by the combination of virtual
interface and station address.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-18 17:09:15 -05:00
Ben Cahill
9e595d24b1 iwlwifi: Add comments about CSR registers
Also regroup CSR_EEPROM and CSR_OTP bit field definitions.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-18 17:09:08 -05:00
Johannes Berg
6ab10ff873 iwlwifi: handle unicast PS buffering
Using the new mac80211 functionality, this makes
iwlwifi handle unicast PS buffering correctly.
The device works like this:

 * when a station goes to sleep, the microcode notices
   this and marks the station as asleep
 * when the station is marked asleep, the microcode
   refuses to transmit to the station and rejects all
   frames queued to it with the failure status code
   TX_STATUS_FAIL_DEST_PS (a previous patch handled
   this correctly)
 * when we need to send frames to the station _although_
   it is asleep, we need to tell the ucode how many,
   and this is asynchronous with sending so we cannot
   just send the frames, we need to wait for all other
   frames to be flushed, and then update the counter
   before sending out the poll response frames. This
   is handled partially in the driver and partially in
   mac80211.

In order to do all this correctly, we need to
 * keep track of how many frames are pending for each
   associated client station (avoid doing it for other
   stations to avoid the atomic ops)
 * tell mac80211 that we driver-block the PS status
   while there are still frames pending on the queues,
   and once they are all rejected (due to the dest sta
   being in PS) unblock mac80211

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-11-18 17:09:08 -05:00
Johannes Berg
9bb487b406 iwlwifi: add sleep_tx_count ucode station API
This field was marked as reserved before since we didn't
use it, but is present in all released firmwares afaict.
We're going to need it soon, so add it now.

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-11-18 17:09:07 -05:00
Johannes Berg
c397bf15a6 iwlwifi: report PS filtered status
When a frame is sent to a sleeping station, the
microcode reports TX_STATUS_FAIL_DEST_PS as its
status -- we need to translate that to the flag
that mac80211 expects.

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-11-18 17:09:07 -05:00
Daniel C Halperin
f513dfff96 iwlwifi: make iwlwifi send beacons
Handle BSS_CHANGED_BEACON_ENABLED to enable the sending
of beacons. Also set the correct HT RXON and QoS config.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
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-11-18 17:09:06 -05:00
Daniel C Halperin
47ff65c487 iwlwifi: fix bugs in beacon configuration
When sending beacon commands to the uCode, we must
inform it of the offset in the beacon frame of the
TIM Element so it can transmit packets from the
correct queue. This functionality is implemented
in iwl_set_beacon_tim().

Fix a bug setting the rate_n_flags for the beacon
packet. First, it should not use the station table's
rate (it's a management frame), and second it needs
to properly configure the TX antennas.

Finally, also, clean up and comment relevant functions.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
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-11-18 17:09:06 -05:00
Reinette Chatre
e43ab94d2e iwlagn: power up device before initializing EEPROM
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: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-18 17:09:06 -05:00
Wey-Yi Guy
98a7b43be1 iwlwifi: align tx/rx statistics debugfs format
Align the format for tx_statistics and rx_statistics debugfs output for
better readability

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-11-18 17:09:05 -05:00
Wey-Yi Guy
ae16fc3c31 iwlwifi: eliminate the possible 1/2 dBm tx power loss in 6x00 & 6x50 series
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: 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-11-18 17:09:05 -05:00
Ben Cahill
4d6ccbf57f iwl3945: Reset saved POWER_TABLE_CMD in "up"
Power-saving logic will not re-issue a POWER_TABLE_CMD if a new command
matches the prior one.  This can be bad if we re-start the device due to
e.g. uCode error; the new POWER_TABLE_CMD (required to invoke power-saving)
may match the prior POWER_TABLE_CMD issued before the uCode error.

Ensure the POWER_TABLE_CMD is sent to device when uCode is up.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-18 17:09:05 -05:00
Wey-Yi Guy
ef8d5529b0 iwlwifi: update reply_statistics_cmd with 'clear' parameter
When issue REPLY_STATISTICS_CMD to uCode, two possible flag
can be set in the configuration flags

bit 0: Clear statistics
       0: Do not clear Statistics counters
       1: Clear to zero Statistics counters

Allow "clear" parameter to be set from the caller.

Add debugfs file to clear the statistics counters to help monitor and
debug the uCode behavior.

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-11-18 17:09:04 -05:00
Wey-Yi Guy
7d2ed110a8 iwlwifi: remove external reference for non-exist data structure
Number of data structure for 6000 series no longer in production, the
data structure already being removed; also need to remove the external
reference define in iwl-dev.h

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-11-18 17:09:04 -05:00
Wey-Yi Guy
a8a9a159bf iwlwifi: drop non-production PCI-IDs for 6x50 series
drop the non-production PCI-IDs for 6x50 series

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-11-18 17:09:03 -05:00
Wey-Yi Guy
d7d144012a iwlwifi: remove unused parameter from iwl_channel_info
Number of HT40 power parameters are not used; remove those from
iwl_channel_info data structure

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-11-18 17:09:03 -05:00
Wey-Yi Guy
85bb174a38 iwlwifi: disable coex until implementation ready for 6x50
Temporary disable the coex function for wifi/wimax for 6x50
series until the full implementation ready.

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-11-18 17:09:02 -05:00
Wey-Yi Guy
85f0d9e877 iwlwifi: validate enhanced tx power entry
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: 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-11-18 17:09:02 -05:00
David S. Miller
dfef948ed2 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-11-18 10:55:32 -08:00
Julia Lawall
d20a80f0e6 drivers/net/wireless/iwlwifi: remove exceptional & on function name
In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-18 10:48:54 -08:00
John W. Linville
ddd21046e7 iwlwifi: fix iwl1000 "RTS/CTS for HT" merge damage
I may have botched my merge conflict resolution instructions for Dave...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-11 13:04:42 -08:00
Ben Cahill
309e731a61 iwlwifi: MAC_ACCESS_REQ cleanup
Add txq_id info to "Tx queue requesting wakeup" debug message

Add "Rx queue requesting wakeup" debug message

Move clear of CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ to be after nearby
iwl_write_prph(), since iwl_write_prph() sets it and clears it.  Almost
removed it entirely, but just making sure in case someone removes the
iwl_write_prph()!  Also remove unneeded priv->lock usage; this is now
handled by priv->reg_lock within iwl_clear_bit().

Join a couple of lines that had unneeded line returns.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-11 15:23:48 -05:00
Wey-Yi Guy
f060face81 iwlwifi: Fix issue on file transfer stalled in HT mode
Turn on RTS/CTS for HT to prevent uCode TX fifo underrun

This is fix for
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2103

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-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-11-11 15:23:48 -05:00
Ben Cahill
8756990f99 iwlagn: update write pointers in iwl_irq_tasklet()
Follow-up to "update write pointers for all tx queues after wakeup"; that
patch changed iwl_irq_tasklet_legacy(), but not iwl_irq_tasklet(), so
newer devices were not covered.

Comments from original patch:

Wakeup interrupt has been updating write pointers (indexes, actually) only
for tx queues 0-5.  This is adequate just for 3945, but inadequate for other
devices, all of which have more tx queues.  Now updating all tx/command queues,
so device can be aware of all new tx and host commands enqueued while
device was asleep.

This can potentially improve data traffic bandwidth and/or latency.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-11 15:23:47 -05:00
Ben Cahill
a7e6611034 iwlwifi: Add comments about MAC_ACCESS_REQ
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-11 15:23:47 -05:00
Ben Cahill
2a3b793d6a iwlwifi: Update comments for struct iwl_ssid_ie
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-11 15:23:47 -05:00
Ben Cahill
e585447189 iwlwifi: speed up event log dumps
Take advantage of device's auto-increment for SRAM reads to eliminate extra
write address accesses.

Grab/release NIC access before/after entire read sequence, rather than for
each read individually.

After a quick check of dmesg logs, this seems to double Event Log dump speed,
reducing from about 20 milliseconds to about 10 milliseconds for 512 entries
using 3945.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-11 15:23:46 -05:00
Ben Cahill
84c4069232 iwlwifi: Limit size of Event Log dump
If device provides bad values for Event Log parameters (due to being asleep
or SRAM corruption, etc.), the size can be very, very large (e.g. 0xa5a5a5a5),
which can flood system log.

Sanity-check capacity and next_entry values and limit to reasonable size dump.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-11 15:23:45 -05:00
Wey-Yi Guy
6762f07fd5 iwlwifi: do not base station's sm_ps setting on AP
Do not use AP's SM_PS setting for our own SM_PS setting.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
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-11-11 15:23:45 -05:00
Wey-Yi Guy
740e7f51c2 iwlwifi: drop non-production PCI-IDs
Remove the support for all the PCI_IDs never make into production

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-11-11 15:23:45 -05:00
Wey-Yi Guy
0924e519a3 iwlwifi: fix for channel switch
Different channel has different configuration, need to pass correct
configuration to uCode when send "channel switch" command to uCode.
Invalid configuration will cause sysassert in uCode and produce
un-expected result.

Even it is a very small windows, but we also need to consider and handle
the case if commit_rxon occurred before the "channel switch
announcement" notification received from uCode.

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-11-11 15:23:44 -05:00
Johannes Berg
681988653e iwlwifi: add FIFO usage for 5000
This is part of the code, but the comment doesn't have it,
add pointers to the code and the FIFO usage for 5000 and
up.

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-11-11 15:23:43 -05:00
Wey-Yi Guy
bed0a68f98 iwlwifi: remove un-used parameter
Remove un-used parameter "recovery_rxon" from "priv" data structure

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-11-11 15:23:43 -05:00
Johannes Berg
1a716557a5 iwlwifi: fix FIFO vs. queue confusion
When I added that code setting the swq_id, I evidently
did not understand the distinction between FIFO and TX
queue yet and added code to compare a queue ID and a
FIFO number, which is bogus.

However, the code there need not be this specific, it
can just set all queues to the identity mapping which
will be overwritten by the aggregation queue code. As
a bit of defensive coding, don't assign an swq_id to
the command queue so that if we ever use it for frames
we notice quickly.

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-11-11 15:23:43 -05:00
Johannes Berg
a221e6f7b4 iwlwifi: don't double-activate queue 4
The fourth queue (command queue) is already activated in
the loop above that also maps it to the command FIFO and
therefore doesn't need to be marked as activated again.
Also change the TODO comment to be accurate -- we need
to initialise the _queues_, not FIFOs, and map them to
device FIFOs.

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-11-11 15:23:42 -05:00
Wey-Yi Guy
0748dc1fcd iwlwifi: no periodic Tx/IQ calibration for 6x00/6x50 series
For both 6x00 and 6x50 series devices, periodic Tx IQ calibration is
disabled in uCode, driver do not need to set the periodic Tx/IQ calibration
bit in calibration command.

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-11-11 15:23:42 -05:00
Shanyu Zhao
b23aa88367 iwlwifi: use configured valid rx chain for scan
Use configured valid rx chains in scan command instead of ANT_ABC, correcting
valid rx chain configuration of 4965, should be ANT_ABC instead of ANT_AB.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
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-11-11 15:23:42 -05:00
Shanyu Zhao
f1e3d7d428 iwlwifi: use only one chain for scan in PS
When doing scan in power saving mode, choose only 1 valid RX chain instead of
turning all chains on.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
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-11-11 15:23:41 -05:00
Wey-Yi Guy
a643565efc iwlwifi: print rx_on config to help debug
To help debug rx related issues, if IWL_DEBUG_RADIO flag is set, print
the rxon configuration when rxon host command send to uCode.

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-11-11 15:23:41 -05:00
Zhu Yi
a3b6bd5bf2 iwlwifi: allocate 128 bytes linear buffer for rx skb
Allocate 128 bytes linear buffer for rx skb. The first 64 bytes is
reserved for mac80211 usage (for radiotap header expansion, etc).
The frame header starts from the second 64 bytes.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-11 15:23:41 -05:00
Reinette Chatre
cf7ff8dfe6 iwlwifi: change debug message to error in failure case
Since these messages indicate failure we would be interested in seeing them
always.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-11 15:23:40 -05:00
Johannes Berg
5ed176e1c4 mac80211: make ieee80211_find_sta per virtual interface
Since we have a TODO item to make all station
management dependent on virtual interfaces, I
figured I'd start with pushing such a change
to drivers before more drivers start using the
ieee80211_find_sta() API with a hw pointer and
cause us grief later on.

For now continue exporting the old API in form
of ieee80211_find_sta_by_hw(), but discourage
its use strongly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-04 18:44:48 -05:00
Wey-Yi Guy
1933ac4d93 iwlwifi: add wimax/wifi coexist support for 6x50 series
For 6x50 series, it is wimax/wifi combo device, so driver need to enable
the wimax/wifi co-exist function and send the coexist event priority
table to uCode for operation.

The priority table will be used by uCode to determine what is the proper
action it should take when co-exist with WiMAX.
For example, when WiFi runs a scan, it must own radio exclusively, therefore
will disconnect WiMAX if WiMAX is connected.

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-11-02 15:39:48 -05:00
Wey-Yi Guy
3f3e0376bb iwlwifi: add SM PS support for 6x50 series
Spatial Multiplexing Power Save was disabled to achieve better
throughput while in power save mode by activating all the rx chains all the time.
By doing so, the device power consumption is high.

Enable static/dynamic spatial multiplexing power save if device support
it, which can lower the power consumption without impact throughput.

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-11-02 15:39:48 -05:00
Wey-Yi Guy
fe1bcbfda7 iwlwifi: coex API data structure
Add data structure define for COEX_MEDIUM_NOTIFICATION and
COEX_EVENT_CMD host commands.

COEX_MEDIUM_NOTIFICATION is notification from uCode to host to indicate
medium changes. COEX_EVENT_CMD is from host to uCode for coex event
request.

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-11-02 15:39:48 -05:00
Reinette Chatre
f2f21b4928 iwlwifi: print warning when sending host command fails
More information than the "-EIO" return code will be useful here.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-02 15:39:47 -05:00
Reinette Chatre
5ad13f8ce7 iwlagn: move rate scale initialization to init function
This fits better in how the callbacks operate (alloc does allocation and
init does initialization). This also helps if we later want to do our own
initialization without relying on the mac80211 allocation.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-02 15:39:47 -05:00