summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-commands.h
AgeCommit message (Collapse)Author
2011-06-18iwlagn: add PAN to tx flushWey-Yi Guy
When issue tx flush, also consider PAN Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11iwlagn: don't check ucode subtypeJohannes Berg
The ucode subtypes keep changing, and there's no particular reason to be checking them (other than a paranoid sanity check). Since the numbers are also in conflict between different ucode images now, simply don't check them any more and rely on the images being built correctly. Also, to indicate that, rename the constants and the enum, moving it to a different file. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-05-13iwlagn: support multiple TBs per commandJohannes Berg
The current "huge" command handling is a bit confusing, and very limited since only one command may be huge at a time. Additionally, we often copy data around quite pointlessly since we could instead map the existing scan buffer for example and use it directly. This patch makes that possible. The first change is that multiple buffers may be given to each command (this change was prepared earlier so callsites don't need to change). Each of those can be mapped attached to a TB in the TFD, and the command header can use a TB (the first one) in the TFD as well. Doing this allows getting rid of huge commands in favour of mapping existing buffers. The beacon transmission is also optimised to not copy the SKB at all but use multiple TBs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-30iwlagn: remove 5000 from rxon_assoc structureWey-Yi Guy
The data structure is shared by all _agn devices, remove the reference to 5000 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-22iwlagn: implement synchronous firmware loadJohannes Berg
The current firmware loading mechanism in iwlwifi is very hard to follow, and thus hard to maintain. To make it easier, make the firmware loading synchronous. For now, as a side effect, this removes a number of retry possibilities we had. It isn't typical for this to fail, but if it does happen we restart from scratch which this also makes easier to do should it be necessary. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-22iwlagn: simplify error table readingJohannes Berg
The current code to read the error table header just hardcodes all the offsets, which is a bit hard to understand. We can read in the entire header (as much as we need) into a structure, and then take the data from there, which makes it easier to understand. To read a bigger blob we also don't need to grab NIC access for each word read, making the code more efficient. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08iwlagn: clean up & autodetect statisticsJohannes Berg
There's no need to keep both normal and BT statistics versions around all the time in memory when we only use a subset of both. So keep only the subsets that we need in memory, depending on the debug config). Also, in doing so, we can remove all the calls to iwl_bt_statistics() in the driver as we'll just access the copied statistics now. Finally, also remove this call from the one place where it might still be needed and automatically detect what kind of statistics the device is sending based on their size. This way, we don't need to keep track of which devices do what any more, which is good since this is subject to change based on the ucode version (as some ucode even for non-BT devices will in fact use BT statistics). Warn upon encountering a statistics command from the ucode that isn't known, so we will find such issues earlier in the future. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-07iwlagn: clean up alive handlingJohannes Berg
Devices newer than 4965 don't actually send two different versions of the ALIVE command, so we always had a bug here since before this patch we copy more data than we got. Remove the iwl_init_alive_resp struct and don't use it. Since we also really don't need to track all the data received in ALIVE as we only use the error and log event tables later, we can also save space by just keeping those and not more data around in memory. 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>
2011-04-07iwlagn: change Copyright to 2011Wey-Yi Guy
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07iwlagn: clean up some 3945/4965 remnantsJohannes Berg
When the driver was split, a bunch of definitions for the 3945 and 4965 devices stayed around, but they're now useless so remove (some of) them. 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>
2011-03-25iwlwifi: set default aggregation frame limit to 63Daniel Halperin
This gives much better performance at fast 3x3 rates (up to ~160 Mbps). The scheduler will still make most decisions about batch size based on available packets and RX parameters. Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-03-25iwlwifi: add RATE_MCS_RATE_MSKDaniel Halperin
Throughout the code we use rate_n_flags & 0xff to extract the lower byte of the rate_n_flags u32 that contains the information about the rate. Add a #define and remove the use of the magic number. Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-03-11iwlagn: support off-channel TXJohannes Berg
Add support to iwlagn for off-channel TX. The microcode API for this is a bit strange in that it uses a hacked-up scan command, so the scan code needs to change quite a bit to accomodate that and be able to send it out. 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>
2011-02-26iwlagn: enable BT session 2 type UART for 2000 seriesWey-Yi Guy
For 2000 series device, use session 2 type of BT UART message Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-26iwlagn: split BT page and inquiry UART msgWey-Yi Guy
Both inquiry and page was combine in frame7 of UART message, separate it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-26iwlagn: add BT Session Activity 2 UART message (BT -> WiFi)Wey-Yi Guy
additional UART message defines Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-26iwlagn: add bt config structure support for 2000 seriesWey-Yi Guy
2000 series has different bt config command structure, add support for it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-26iwlagn: name change for BT config commandWey-Yi Guy
No functional changes, name changes to reflect the structure used by 6000 series. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlagn: remove unsupported BT SCO commandWey-Yi Guy
During the period of BT coex changes, REPLY_BT_COEX_SCO host command is no longer needed to support SCO/eSCO type of traffic. delete it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlwifi: fix beacon notification parsingJohannes Berg
The beacon notification changed between 4965 and agn because the embedded TX response changed, but iwlwifi was never updated to know about this. Update it now so the IBSS manager status will be tracked correctly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-21iwlwifi: replace minimum slot time constantJohannes Berg
There are a number of places where the minimum slot time is hardcoded to 20 TU, add a new constant for that and use it everywhere. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-21iwlagn: properly wait for PAN disableJohannes Berg
Previously I hacked this with an msleep(300) which was fine since we never had longer PAN time slots, but now that we will have them I need to fix that. Use the new notification wait support to properly wait for the WIPAN deactivation complete signal from the ucode. 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-24iwlagn: use different kill mask when SCO activeWey-Yi Guy
use different kill_ack_mask and kill_cts_mask when detect SCO is active. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-24iwlwifi: advance power management supportWey-Yi Guy
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-24iwlwifi: add more power management flagsWey-Yi Guy
Adding additional power management option available for the device. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-24iwlagn: name change for BT config flagWey-Yi Guy
Bit 7 of BT config flag is used to enable/disable PSPoll sync. Make the name to match it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16iwlagn: change default ACK/CTS MASK setting for WiFi/BT coexWey-Yi Guy
Change the default BT_KILL_ACK_MASK and BT_KILL_CTS_MASK for BT coex Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16iwlagn: set dynamic aggregation threshold for BTWey-Yi Guy
Setting the max/min/def value for BT dynamic aggregation threshold. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16iwlagn: used frame count info in compressed ba packetWey-Yi Guy
For newer devices, uCode provide both "number of frames sent" and "number of frames acked" information inside the compressed_ba packet. So instead of figure the success/failure information through the bitmap, use those information which is much betrer approach. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-07iwlagn: add temperature offset calib for 6000g2Shanyu Zhao
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-07iwlagn: fix default calibration table sizeShanyu Zhao
iwlagn driver uses the IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE as the chain noise reset calibration index and IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE+1 as the chain noise gain calibration index, if not specified by the TLV value in the new firmware format. However, this is broken if we need to add more calibrations like the temperature offset calibration because we increased IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE by 1. To fix this issue, define IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE and use it as the calibration index instead. We still keep the IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE as a sanity check for the TLV value given by ucode. 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-10-06iwlagn: rename iwl5000_tx_respWey-Yi Guy
iwl5000_tx_resp really should be iwlagn_tx_resp, rename it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-06iwlwifi: remove uncorrect commentsWey-Yi Guy
some structure belong to _agn devices, not just 5000. Fix it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-10-06iwlagn: rename iwl5000_tx_power_dbm_cmdWey-Yi Guy
iwl5000_tx_power_dbm_cmd really should be iwlagn_tx_power_dbm_cmd, so rename it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-09-28iwlwifi: send DC calib config to runtime ucodeShanyu Zhao
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-17iwlagn: minor coex API changesWey-Yi Guy
Adding two new parameters in config bt API. these two parameters use the 3 reserved bytes, so there is no structure size changes. Make sure set both parameters to "zero" in order to preserve previous behavior. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-09-17iwlagn: correct naming for failure reply tx statusWey-Yi Guy
For failure tx status 0x90 and 0x91, give the correct name to reflect the errors. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-09-17iwlagn: log aggregation tx command statusWey-Yi Guy
For aggregated frames with block ack, different status flag will be used as part of tx command response. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-27iwlwifi: add PAN APIJohannes Berg
Define the new host commands and notifications REPLY_WIPAN_PARAMS REPLY_WIPAN_RXON REPLY_WIPAN_RXON_TIMING REPLY_WIPAN_RXON_ASSOC REPLY_WIPAN_QOS_PARAM REPLY_WIPAN_WEPKEY REPLY_WIPAN_P2P_CHANNEL_SWITCH REPLY_WIPAN_NOA_NOTIFICATION and their corresponding structures along with the PAN station flag, the PAN AP sta ID and new dev types for the second context. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-27iwlwifi: make hw crypto context awareJohannes Berg
HW crypto needs to be aware of the context, and there are different command IDs for the WEP keys per context, so move the key tracking variables and command IDs 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-25iwlagn: update bt status upon scan completeWey-Yi Guy
Update bt status upon receive scan complete notification Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25iwlagn: generic bt coex functionsWey-Yi Guy
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-25iwlagn: add additional bt related parametersWey-Yi Guy
Add additional bt coex related parameters and initialize at init time. Thoese parameters will be used in later implementations. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25iwlagn: parsing uart message and take actionsWey-Yi Guy
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-25iwlagn: add bt prio_boost to .cfgWey-Yi Guy
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-25iwlagn: wifi/bt coex configuration sequenceWey-Yi Guy
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-25iwlwifi: add BT notification support for bt coexJohannes Berg
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-25iwlagn: implement advance BT config commandJohannes Berg
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-25iwlwifi: add 6000g2b BT coexist APIJohannes Berg
The new 6000g2b hardware requires a different bluetooth coexist implementation on the host, this adds the command/notification definitions 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-25iwlwifi: comments cleanupWey-Yi Guy
No code or function changes, just some cleanup work for out-of-date comments Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>