summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-commands.h
AgeCommit message (Collapse)AuthorFilesLines
2012-03-07iwlwifi: clean up iwl-commands.hJohannes Berg1-9/+1
Do some cleanups here: * remove an unused prototype * remove some unused constants * clean up includes Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-07iwlwifi: move packet to transportJohannes Berg1-84/+0
The base packet structure will (hopefully) be the same for all transports, but what is in it differs. Remove the union of all the possible contents and move the packet itself into the transport header file. This requires changing all users of the union to just use pkt->data. 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>
2012-03-07iwlwifi: split out firmware storeJohannes Berg1-12/+0
Through the driver, struct iwl_fw will store the firmware. Split this out into a separate file, iwl-fw.h, and make all other code use it. To do this, also move the log pointers into it, and remove the knowledge of "nic" from everything. Now the op_mode has a fw pointer, and (unfortunately) for now the shared data also needs to keep one for the transport to access dump the error log -- I think that will move later. Since I wanted to constify the firmware pointers, some more changes were needed. 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>
2012-02-15Merge branch 'master' of ↵John W. Linville1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: net/mac80211/debugfs_sta.c net/mac80211/sta_info.h
2012-02-01iwlwifi: don't mess up QoS counters with non-QoS framesEmmanuel Grumbach1-0/+1
In my AMPDU rework, I rely on the sequence numbers of frames. But I didn't check that the frame has a valid tid before updating the tracking counters. As a result, the Tx queues were stalled. People who hit this bug saw that we simply didn't let any data out. This bug was introduced in 3.3. This patch fixes that and checks that the frame is a QoS frame before looking at its tid and changing the counters. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-24iwlwifi: update CopyrightWey-Yi Guy1-2/+2
Update Copyright to 2012 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-08iwlagn: fix TID use bugJohannes Berg1-1/+1
The driver everywhere uses max TID count as 9, which is wrong, it should be 8. I think the reason it uses 9 here is off-by-one confusion by whoever wrote this. We do use the value IWL_MAX_TID_COUNT for "not QoS/no TID" but that is completely correct even if it is 8 and not 9 since 0-7 are only valid. As a side effect, this fixes the following bug: Open BA session requested for 00:23:cd:16:8a:7e tid 8 ------------[ cut here ]------------ kernel BUG at drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h:350! ... when you do echo "tx start 8" > /sys/kernel/debug/ieee80211/*/*/*/*/agg_status Cc: stable@vger.kernel.org Reported-by: Nikolay Martynov <mar.kolya@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-08iwlwifi: minor cleanupWey-Yi Guy1-45/+13
Remove the defines only used by legacy devices Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-08iwlwifi: Display more uCode debug infoWey-Yi Guy1-10/+14
When uCode encounter problem, it pass a lot of debug data to help debugging the issue. We only show partial data before, why not display all of those. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-11-08iwlagn: update wowlan APIJohannes Berg1-8/+19
The WoWLAN API changed due to netdetect and we now have a more generic "D3 configuration" command that enables the sysassert & rfkill wakeup triggers. 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-10-14iwlagn: add REPLY_ECHO host commandWey-Yi Guy1-0/+1
Add "echo" host command for testing and drebugging to make sure uCode still responding Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11iwlagn: separate init calib and rt calibWey-Yi Guy1-0/+10
My previous patch for init calib cfg disable a set of calibration for both init and runtime which cause performance issue, Fix it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: add support for v2 of temperature offset calibrationWey-Yi Guy1-0/+8
For 2000 series of NICs, version 2 of temperature offset calibration should be used. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14iwlagn: only perform necessary calibration at init timeWey-Yi Guy1-6/+1
During init time, only the necessary calibration should be performed. This not only save time, also avoid uCode crash because lack of necessary information. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: iwl_tid_data moves to iwl-sharedEmmanuel Grumbach1-0/+1
The rate scaling and the transport need to access the data in iwl_tid_data, hence the move. Note that the only component in the upper layer that needs this data is the rate scaling. Refactoring the rate scaling may help to move iwl_tid_data from the shared area to the transport area. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: iwl-dev.h doesn't include iwl-fh.h any moreEmmanuel Grumbach1-0/+1
Since iwl-fh.h contains transport related data, it shouldn't be included by the upper layer. Only the transport layer and iwl-agn-ucode.c includes it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: remove unused parameters from hw_paramsEmmanuel Grumbach1-1/+0
Some of them weren't used at all, the others always had the same value since the driver split. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: move isr_statistics to transport layerEmmanuel Grumbach1-0/+3
It is accessed by the transport layer only, hence the move. The debugfs handlers that accessed it moved to the transport layer too. The rx_handlers part of it stayed in the upper layer and a special debugfs has been added for it Also add missing includes to iwl-commands.h. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08iwlagn: support v2 of enhanced sensitivity tableWey-Yi Guy1-11/+23
Add support for v2 of enhanced sensitivity table for 2000 series products Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-25Merge branch 'for-linus' of ↵Linus Torvalds1-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) fs: Merge split strings treewide: fix potentially dangerous trailing ';' in #defined values/expressions uwb: Fix misspelling of neighbourhood in comment net, netfilter: Remove redundant goto in ebt_ulog_packet trivial: don't touch files that are removed in the staging tree lib/vsprintf: replace link to Draft by final RFC number doc: Kconfig: `to be' -> `be' doc: Kconfig: Typo: square -> squared doc: Konfig: Documentation/power/{pm => apm-acpi}.txt drivers/net: static should be at beginning of declaration drivers/media: static should be at beginning of declaration drivers/i2c: static should be at beginning of declaration XTENSA: static should be at beginning of declaration SH: static should be at beginning of declaration MIPS: static should be at beginning of declaration ARM: static should be at beginning of declaration rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check Update my e-mail address PCIe ASPM: forcedly -> forcibly gma500: push through device driver tree ... Fix up trivial conflicts: - arch/arm/mach-ep93xx/dma-m2p.c (deleted) - drivers/gpio/gpio-ep93xx.c (renamed and context nearby) - drivers/net/r8169.c (just context changes)
2011-07-21iwlagn: implement WoWLANJohannes Berg1-0/+128
Implement WoWLAN support in iwlagn. The device supports a number of wakeup triggers and can do GTK rekeying when asleep (if HW crypto is used). Unfortunately, we need to disconnect from the AP after resume since we can't yet get all the info out of the wowlan uCode to stay connected safely. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: rewrite HW cryptoJohannes Berg1-0/+2
As I just discovered while doing WoWLAN, HW crypto is done wrong for GTKs: they should be programmed for the AP station ID (in the managed mode case) and the HW can actually deal with multiple group keys per station as well (which is useful in IBSS RSN but that I've chosen not to use this). To fix all this, modify the way keys are sent to the device and key offsets are allocated. After these changes, key offsets are stored into the hw_key_idx which we can then track for the key lifetime, not relying on our sta_cmd array. WEP default keys get special treatment, of course. Additionally, since I had the API for it, we can now pre-fill TKIP phase 1 keys for RX now that we can obtain the P1K from mac80211, a capability I had added for WoWLAN initially. Finally, some keys simply don't need to be added into the device's key cache -- a key that won't be used for RX is only needed in the TX header, so "pretend" to have accepted any key without adding it into the device -- no need to use up key space there for it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: radio sensor offset in le16 formatWey-Yi Guy1-3/+3
For temperature offset calibration, send radio sensor offset in le16 format Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: define valid init calibration maskWey-Yi Guy1-3/+13
Use the valid calibration mask for init calibration Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: remove legacy calibration commandWey-Yi Guy1-10/+0
IWL_PHY_CALIBRATE_DIFF_GAIN_CMD is for legacy device, remove it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: set correct calibration flagWey-Yi Guy1-1/+2
Set calibration config flag for complete notification Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21treewide: fix potentially dangerous trailing ';' in #defined values/expressionsPhil Carmody1-2/+2
All these are instances of #define NAME value; or #define NAME(params_opt) value; These of course fail to build when used in contexts like if(foo $OP NAME) while(bar $OP NAME) and may silently generate the wrong code in contexts such as foo = NAME + 1; /* foo = value; + 1; */ bar = NAME - 1; /* bar = value; - 1; */ baz = NAME & quux; /* baz = value; & quux; */ Reported on comp.lang.c, Message-ID: <ab0d55fe-25e5-482b-811e-c475aa6065c3@c29g2000yqd.googlegroups.com> Initial analysis of the dangers provided by Keith Thompson in that thread. There are many more instances of more complicated macros having unnecessary trailing semicolons, but this pile seems to be all of the cases of simple values suffering from the problem. (Thus things that are likely to be found in one of the contexts above, more complicated ones aren't.) Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-07-16iwlagn: calibration bitmapWey-Yi Guy1-8/+11
Define bitmap for calibration Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-11iwlagn: Enable/disable PS poll based on RSSI and BT coex traffic stateMeenakshi Venkataraman1-0/+3
WiFi throughput drops drastically when BT is turned on, BT and WiFi are simultaneously transmitting/receiving traffic. This is particularly true when BT has higher priority over WiFi, and hence the device defers TX frames. The AP assumes that the channel is bad and reduces the data rate, implying longer airtime, which exacerbates the problem further, resulting ultimately in what is popularly called the "death-spiral" phenomenon. The use of PS-poll in such scenarios guarantees a low but consistent throughput. Since the death-spiral phenomenon is observed only when the RSSI is low, use PS-poll only when RSSI is low and disable when high, with a known hysterisis. This feature specifies the high and low thresholds and implements the callbacks registered with mac80211, which will be called when threshold events occur. iwlwifi: dynamic pspoll: optimize rssi monitor code Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-18iwlagn: Support flush queues for specified interfaceWey-Yi Guy1-2/+1
Flush command can target specified interface or all interfaces Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-18iwlagn: add PAN to tx flushWey-Yi Guy1-4/+16
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 Berg1-12/+0
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 Berg1-4/+1
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 Guy1-1/+1
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 Berg1-1/+12
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 Berg1-39/+51
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 Berg1-64/+0
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 Berg1-48/+0
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 Guy1-2/+2
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 Berg1-590/+1
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 Halperin1-1/+1
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 Halperin1-0/+2
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 Berg1-1/+7
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 Guy1-13/+9
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 Guy1-3/+6
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 Guy1-0/+78
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 Guy1-0/+23
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 Guy1-1/+1
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 Guy1-1/+0
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 Berg1-0/+7
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>