Commit Graph

154 Commits

Author SHA1 Message Date
Wey-Yi Guy
638514ff5d iwlagn: Offical name for 100/130 device
Change to offical name for 100 devices:
   "Intel(R) Centrino(R) Wireless-N 100"

Change to offical name for 130 devices:
   "Intel(R) Centrino(R) Wireless-N 130"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-24 16:59:19 -08:00
Wey-Yi Guy
d2eceef02e iwlagn: Offical name for 6000g2b device
Change to offical name for 6000g2b devices:
   "Intel(R) Centrino(R) Wireless-N 1030"
   "Intel(R) Centrino(R) Advanced-N 6230"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-24 16:59:13 -08:00
Wey-Yi Guy
55017ab878 iwlagn: Offical name for 6000g2a device
Change to offical name for 6000g2a devices:
   "Intel(R) Centrino(R) Advanced-N 6205"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-24 16:59:09 -08:00
Wey-Yi Guy
f9dc646722 iwlagn: Offical name for 6050g2 device
Change to offical name for 6050g2 devices:
   "Intel(R) Centrino(R) Wireless-N 6150"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-24 16:58:59 -08:00
Wey-Yi Guy
dbbf1755b0 iwlwifi: use antenna information in EEPROM
The valid tx/rx antenna information is part of EEPROM, so use it
to configure the device.

For few cases, the EEPROM did not reflect the correct antenna, but
it is too late to modify the EEPROM, so overwrite with .cfg parameters

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-24 16:57:55 -08:00
Wey-Yi Guy
35162ba759 iwlwifi: advance power management support
For 6000g2b and up, adding advance power management support
for better power consumption

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-24 16:19:37 -05:00
Wey-Yi Guy
e366176e5c iwlwifi: consider BT for power management
Check the BT PSPoll flag when fill PM command to uCode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-24 16:19:37 -05:00
Wey-Yi Guy
21a5b3c6b1 iwlagn: use SKU information in the EEPROM
EEPROM contain the SKU information for the device, use it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:47:10 -08:00
Wey-Yi Guy
564b344c10 iwlwifi: change default led mode for different devices
Set the default led mode for different devices.

For the newer devices such as 6000g2a, 6000g2b and newer,
the default led mode is On/Off instead of blinking.

The led_mode still can be control through module parameter
  0: system default
  1: On/Off
  2: blinking

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:44:24 -08:00
Wey-Yi Guy
66e863a527 iwlagn: support dynamic aggregation for BT coex
Use dynamic aggregation threshold if bt traffic load is high
to reduce the impact on aggregated frame.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:44:00 -08:00
Wey-Yi Guy
f81c1f4838 iwlagn: enable shadow register
For 6000 series devices and up, enable automatic update MAC's register
for better power usage in PSP mode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 13:26:59 -05:00
Wey-Yi Guy
e39fdee1d7 iwlwifi: put all the isr related function under ops
There were two type of isr supported by iwlwifi devices.
  legacy isr - only used by legacy devices (3945 & 4965)
  ict isr - used by all new generation of iwlwifi devices

Move all the isr related functions into ops, the ict type of isr
supports only needed for newer devices.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 13:26:45 -05:00
Wey-Yi Guy
34d59c07e9 iwlagn: use 6000g2b uCode for 130 series devices
For 130 series device, 6000g2b uCode will be used, no need to
have additional defines for 130 devices, so remove those.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 13:24:59 -05:00
Johannes Berg
2295c66b68 iwlagn: new RXON processing for modern devices
In order to simplify the flow, and make new
enhancements easier, separate out the RXON
processing for modern AGN (5000 and newer)
from RXON processing for the older 3945 and
4965 devices. Avoid changing these old ones
to avoid regressions and move their code to
a new file (iwl-legacy.c). 4965 gets the
commit_rxon that used to be common for all
AGN devices, but with removed PAN support.

The new RXON processing is more central and
does more work in committing, so that it is
easier to follow.

To make it more evident what is split out
for legacy, split the necessary operations
for that into a new struct iwl_legacy_ops.
Those parts that still exist in the new AGN
code don't need to be parametrized.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 13:24:53 -05:00
Johannes Berg
dc21b54532 iwlwifi: make mac80211 ops a device config
In the future, 4965 and modern AGN devices will
need to have different mac80211 callbacks since
they have different capabilities. Prepare for
that by making the mac80211 operations a device
config.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 13:24:50 -05:00
Wey-Yi Guy
34f5a70c08 iwlagn: 6050 ops should be used;
For 6050 series of devices, 6050 ops should be used;
One of the 6050 config still use 6000 ops, fix it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-14 09:46:59 -07:00
Wey-Yi Guy
de05ead8f8 iwlgn: need longer tx queue stuck timer for coex devices
For BT/WiFi combo devices, need longer tx stuck queue
timer, so those devices won't reload firmware too often.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-14 09:45:58 -07:00
Shanyu Zhao
bf53f939e0 iwlagn: add temperature offset calib for 6000g2
6000g2 devices need to have temperature offset calibration. The runtime
uCode needs to receive the calibration results just like BB and LO
calibration. To do this, driver reads the offset value from NVM and send
it to uCode after runtime uCode is alive.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-07 15:53:58 -07:00
Johannes Berg
14e8e4afeb iwlwifi: remove apm_ops.stop
Since all devices share the same operation here,
there's no need to call it indirectly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-07 15:52:34 -07:00
Johannes Berg
9597ebac91 iwlwifi: remove set_pwr_src operation
The set_pwr_src operation is only ever used from
within the same sub-driver that it is declared
in, so it can just be called directly instead of
being an operation. Also, it is never called to
set the power source to V_aux, so change the two
functions accordingly (but keep the V_aux code
for documentation purposes in a comment).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-07 15:52:25 -07:00
Johannes Berg
0453674c90 iwlwifi: remove set_ct_kill operation
This operation is only ever called from set_hw_params,
which is also already based on the config/ops, so that
there's no need to have a separate set_ct_kill op and
we can just call the right ct_threshold function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-07 15:52:15 -07:00
Johannes Berg
d3f5ba958d iwlwifi: remove verify_signature eeprom operation
All drivers share the same implementation, so
there's no need to call this via a function
pointer nor to export it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-07 15:50:18 -07:00
Wey-Yi Guy
cf9768d6a3 iwlagn: add define for MODULE_FIRMWARE
Adding MODULE_FIRMWARE define for 130 series of devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-06 16:50:25 -07:00
Wey-Yi Guy
d9d9a5194b iwlagn: fix module firmware name for 130 series device
130 series device should use firmware name with 130 in it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-06 16:50:13 -07:00
Wey-Yi Guy
58a39090a1 iwlagn: define 130 series of WiFi/BT combo devices
add new structures and defines need to identify 130 devices.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-06 08:14:21 -07:00
Wey-Yi Guy
7cb1b0887f iwlagn: reduce redundant parameter definitions
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: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-06 08:10:00 -07:00
Wey-Yi Guy
62cb3c6ac4 iwlagn: API v5 for 6050 series device
For 6050 series device, change the supported API version

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-09-28 17:43:10 -07:00
Shanyu Zhao
6d6a1afdc5 iwlwifi: send DC calib config to runtime ucode
Since uCode is responsible for doing DC calibration, there's no need
to let init uCode to do initial DC calibration then send results
back to driver, then driver sends the results to runtime uCode.
Driver can simply tell runtime uCode to do DC calibration.

Actually, this patch does not disable DC calib for init uCode. It just
prevent driver from saving and sending the DC calib results (from init
ucode) to runtime uCode. The driver still uses 0xffffffff in
CALIB_CFG_CMD for init ucode.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-09-28 16:57:06 -07:00
Shanyu Zhao
02796d77cb iwlagn: set CSR register for 6050g2 devices
For 6050g2 devices driver needs to set a special bit to CSR register
so that uCode can do things correctly in calibration routines.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-09-28 16:56:03 -07:00
Shanyu Zhao
6b5ce50142 iwlwifi: add iwl_nic_ops structure to iwl_ops
iwlwifi driver supports multiple devices. Since some device needs
special configuration we create a new iwl_nic_ops structure which is
configurable per device. Currently there is only one function pointer
inside this structure: additional_nic_config().

The iwl_nic_ops structure is added to the top level in struct iwl_ops,
making it easier to change per device. Duplication of the iwl_lib_ops
structure is no longer needed.

With this new ops the previous function pointer set_calib_version is
no longer needed since it is just a per device nic configuration.

As part of the code restructuring, a bug is addressed. Indication of
calib version to uCode is only needed for 6050 devices, however,
current implementation set calib version for all 6000 devices for
which DC calib is needed. To fix this, create iwl6050_ops for 6050
devices and only populate iwl_nic_ops in this structure.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-09-28 16:55:25 -07:00
Wey-Yi Guy
54a9aa65f7 iwlagn: keep track of failure tx status
Tx command response sent to host by uCode after completed
the transmission attempt. The status parameter indicates
whether the transmission was successful, or else why if failed.

Here we keep the counters to help understand the different failure
cases.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-09-17 13:17:36 -07:00
Johannes Berg
8bd413e611 iwlwifi: move virtual interface pointer into context
iwlwifi occasionally needs to find the virtual
interface pointer to give it to mac80211, but right
now it only keeps one. Move it into the context so
that we can keep one pointer each.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-27 09:15:20 -07:00
Johannes Berg
a194e3249b iwlwifi: contextify broadcast station
The broadcast station ID is per context, so
add a variable for the ID in the context and
use it everywhere we previously hardcoded it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-27 08:53:46 -07:00
Johannes Berg
246ed35522 iwlwifi: initial contextification
In order to support multiple interfaces, we must move
a lot of data into per-context structures so we can
use the contexts the device offers. To start with,
this makes a lot of code context-aware, more changes
will move more things into the context structure.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-27 08:26:47 -07:00
Wey-Yi Guy
b6e116e8bf iwlagn: generic bt coex functions
Move bt coex functions to iwl-agn-lib.c, so those functions
can be shared by multiple wifi/bt combo devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:53 -04:00
Wey-Yi Guy
da5dbb9715 iwlagn: set traffic load based on multiple factors
Current BT traffic load should based on the following conditions:

1. BT On/Off status
2. Channel announcement enable/disable
3. Curren traffic load report from uCode

Need to modify rate scale to down-grade from MIMO to SISO if detected
high BT traffic load. Also need to make sure not using chain "B" with high
BT traffic or if it is in "full concurrency" mode.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:53 -04:00
Wey-Yi Guy
f37837c962 iwlagn: add bt_ch_announce module parameter
Add bt_ch_announce module parameter to enable/disable BT channel
announcement mode; default is "enable"

Based on the bt channel announcement module parameter to configure the
bt_config host command.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:53 -04:00
Wey-Yi Guy
fbba94104f iwlagn: parsing uart message and take actions
1. Based on uart message from uCode, re-configure BT kill ack mask
messages from uCode
2. send REPLY_BT_COEX_SCO command to uCode based on the uart frame
received from uCode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:52 -04:00
Wey-Yi Guy
5d297d5065 iwlagn: add bt prio_boost to .cfg
Use .cfg to configure the default bt priority boost value;
the default bt priority boost is 0xf0

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:20 -04:00
Wey-Yi Guy
a4b96cc4e3 iwlwifi: add bt_init_traffic_load as configurable parameter
Adding configurable parameter in .cfg for the initial Bluetooth traffic
load; set it to IWL_BT_COEX_TRAFFIC_LOAD_NONE for now, but can be change
for debugging or other reason.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:20 -04:00
Wey-Yi Guy
aeb4a2eec2 iwlagn: wifi/bt coex configuration sequence
bt config command need to send before the init calibration command,
driver need to let uCode know that calibrations are being performed now
in order to assure antenna is not being taken to BT use during radio/dsp
reads/writes

Also, bt_coex_priorty_table command need to be send right after the
bt_config_command during init sequence. Followed by bt coex envelope
command to initialize and prepare uCode bt state machine

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:19 -04:00
Wey-Yi Guy
bee008b783 iwlwifi: add bt full concurrency support
Adding the bluetooth full concurrency support for WiFi/BT combo devices.

Driver should configure uCode to operate in "full concurrency" mode (via
LUT) if both conditions are met:
 - Antenna Coupling is more than 35dB
 - WiFi Channel Inhibition Request is hornored by BT Core

Currently, there is no antenna coupling information provided by uCode;
use module parameter to specified the antenna coupling in dB.

When in "full concurrency" mode, driver need to download different LUT
to uCode while sending bt configuration command; also, driver need to
configure the device operate in 1x1 while in full concurrency mode.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:19 -04:00
Wey-Yi Guy
74e5c41baf iwlwifi: Relax uCode timeout/error checking for 6000g2b
Disable plcp error checking for 6000g2b devices, with wifi/bt coex;
this got trigger too often, disable for now until finding better
trigger point.

Also extend the firmware reload timer much longer for BT coex to make sure
there are will be no mistake to reload firmware too fast and too often.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:22 -04:00
Johannes Berg
511b082d29 iwlagn: keep BT settings across restart
The BT SCO needs to be re-applied to the device,
while the traffic load just needs to be correct
in software.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:22 -04:00
Johannes Berg
59079949fa iwlagn: disable gen2b BT coexistence in IBSS
IBSS doesn't allow for coexistence, so it
should be disabled.

Additionally, disable reacting to the BT
profile notification when in IBSS mode,
it likely won't be sent by the device to
start with though.

Also, in IBSS mode, BT coexistence isn't as fully-featured
and we must use a single antenna only. So instead of
peppering the code with new checks, simply pretend
we are in high BT traffic load, which has the needed
effect of disabling antenna B use.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:22 -04:00
Johannes Berg
9e4afc2189 iwlwifi: add BT notification support for bt coex
When advanced bt coex enabled, uCode will send bt status
notification to driver, here add support for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:21 -04:00
Johannes Berg
670245ed45 iwlagn: implement advance BT config command
6000g2b hardware implements advance bluetooth coexist command,
implement base on the new API command strucutre.

Also increment the API 5 to support the advance BT/WIfi coex.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:21 -04:00
John W. Linville
268bae0b68 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-core.c
	drivers/net/wireless/iwlwifi/iwl-core.h
2010-08-24 16:35:40 -04:00
Shanyu Zhao
81e95430aa iwlwifi: do not call ieee80211_frequency_to_channel
A few cases in iwlwifi driver function ieee80211_frequency_to_channel()
is called to get channel number from center frequency. This is not needed
since the channel number is already saved in hw_value field of struct
ieee80211_channel in function iwlcore_init_geos(). So replace those function
calls with hw_value field of struct ieee80211_channel.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-24 16:32:01 -04:00
Wey-Yi Guy
0975cc8fbf iwlwifi: separate thermal throttling function
"Thermal Throttling" is an advance feature which only available for
newer _agn devices. Move from iwl-core to iwl-agn for better code
organization.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:28:07 -04:00