summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi
AgeCommit message (Collapse)Author
2011-07-21iwlagn: implement WoWLANJohannes Berg
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 Berg
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: remove forgotten debugfs functionJohannes Berg
It seems that due to merge issues between different trees or so this function prototype wasn't removed when it should have been, do it now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: remove un-necessary "_agn"Wey-Yi Guy
After driver split, extra _agn in priv structure is no needed, remove it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: remove keyinfo cacheJohannes Berg
iwlagn keeps a copy of key stuff internally but never actually uses it, so remove 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: testmode fixed rate available for testmode onlyWey-Yi Guy
Move tm_fixed_rate inside CONFIG_IWLWIFI_DEVICE_SVTOOL and only available when the option is enable. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: add comment to warn about WoWLAN in resume / suspend flowsEmmanuel Grumbach
WoWLAN may need the NIC even after suspend. One should not do anything to the NIC in the bus level, since one cannot check whether WoWLAN is enabled or not. Same for resume. Add a simple comment to the code to warn about this. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: iwl_bus holds drv_data as void * instead of iwl_privEmmanuel Grumbach
The price to pay is the access to the log system. Therefore logs from bus layer are sent by dev_printk instead of IWL_XXXX. Rename bus->priv to bus->drv_data to make the separation even clearer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: simplify the bus architectureEmmanuel Grumbach
Call iwl_probe with a ready iwl_bus struct. This means that the bus layer assigns the irq, dev and iwl_bus_ops pointers to iwl_bus before giving it to iwl_probe. The device specific struct is allocated together with the common iwl_bus struct by the bus specific layer. The pointer to the aggregate struct is passed to the upper layer that holds a pointer to iwl_bus instead of an embedded iw_bus. The private data given to the PCI subsystem is now iwl_bus and not iwl_priv. Provide bus_* inliners on the way in order to simplify the syntax. Rename iwl-pci.h -> iwl-bus.h since it is bus agnostic and represent the external of the bus layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: transport layer receives struct iwl_trans*Emmanuel Grumbach
It still holds a pointer to iwl_priv. But hopefully this will disappear at some point. Also add the multiple inclusion protection to iwl-trans.h that was forgotten. Move iwl-trans structures to iwl-trans.h Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: move iwl_prepare_card_hw to the transport layerEmmanuel Grumbach
This function is really related to the transport layer - move it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: move more functions from the start flow to the transport layerEmmanuel Grumbach
Basically all the nic_init flow should be in the transport layer. iwl_prepare_card_hw will move to the transport too in a separate patch. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: SCD configuration for AMPDU moves to transport layerEmmanuel Grumbach
All the configurations of the HW for AMPDU are now in the transport layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: radio sensor offset in le16 formatWey-Yi Guy
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 Guy
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 Guy
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 Guy
Set calibration config flag for complete notification Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: kill iwlagn_setup_deferred_workEmmanuel Grumbach
Since iwlagn_setup_deferred_work is always called, fold it into iwl_setup_deferred_work. BT related works are setup by the new bt_setup_deferred_work lib_ops. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-21iwlagn: kill iwlagn_rx_handler_setupEmmanuel Grumbach
Since iwlagn_rx_handler_setup is always called, fold it into iwl_rx_handler_setup. BT related handlers are setup by the new bt_rx_handler_setup lib_ops. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-21iwlagn: add kick_nic API to transport layerEmmanuel Grumbach
kick_nic means to remove the RESET bit from the embedded CPU Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-16iwlagn: add tx start API to transport layerEmmanuel Grumbach
tx start will start the tx queues: basically configure the SCD Remove the IWLAGN prefix to SCD defines on the way. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-16iwlagn: move all the ICT related functions to iwl-trans-rx-pcie.cEmmanuel Grumbach
Since the ICT is transport related, move all its functions to the transport layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: move iwlagn_stop_device to transport layerEmmanuel Grumbach
Since iwlagn_stop_device was the only caller to the rx_stop / tx_stop, these two don't need to be API any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-16iwlagn: move tx transport functions to iwl-trans-tx-pcie.cEmmanuel Grumbach
There are still a few functions here and there that should be put in the transport layer. Mainly the functions that are related to the reclaim flow. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: move rx transport functions to iwl-trans-rx-pcie.cEmmanuel Grumbach
Also create a new file: iwl-trans-int-pcie.h which will include the non static functions that are shared among the current pcie transport layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: remove indirection for iwlagn_hw_valid_rtc_data_addrFry, Donald H
Not needed since the driver split. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: calibration bitmapWey-Yi Guy
Define bitmap for calibration Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: set default of uCode ownership to driverHsu, Kenny
The driver should take the ownership of the uCode as default setting for later operations after interface up. Signed-off-by: Kenny Hsu <kenny.hsu@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: simplify TX flags assignmentsJohannes Berg
The first assignment of TX_CMD_FLG_SEQ_CTL_MSK for ack-expected mgmt frames is overwritten later in the function, so it's useless. Also, probe response frames, BACK request and others there are mutually exclusive so can be moved into an else branch. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: add comment to tx and get_tx_cmd in iwl_trans_opsEmmanuel Grumbach
Those comments were missed in a previous commit. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: comments for iwl_cfgWey-Yi Guy
Modify the comments for iwl_cfg, no functional changes Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: another double indirect removedWey-Yi Guy
Another clean up work after driver split Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: remove dual-indirect call to simply the codeWey-Yi Guy
After driver split, no need to make the code so complex Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: remove un-necessary fileWey-Yi Guy
Most of the functions in iwl-agn-hcmd are move to other files, no point to keep the file anymore. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: move the Rx dispatching to the upper layerEmmanuel Grumbach
The upper layer receives a pointer to an iwl_rx_mem_buffer. I would prefer the upper layer to receive a pointer to an iwl_rx_packet, but this is impossible since the Rx path needs to add the address of the page to the skb. I may find a solution later. All the pre_rx_handler and notification code has been moved to the upper layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: move sync_irq to transport layerEmmanuel Grumbach
Since all the irq / tasklet is now handled in the transport layer, it should give an API to ensure that all the irq / tasklet have finished running. This will allow the upper layer to release all its resources. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: move the tasklet / irq to the transport layerEmmanuel Grumbach
PCIe doesn't provide any ISR registration API, whereas other buses do. Hence, we need to move the tasklet and irq to the transport layer to allow this flexibility. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: move Tx datapath to transport layerEmmanuel Grumbach
Split the Tx datapath in two parts: * the first deals with the Tx cmd composition * the second attaches the skb + Tx cmd to the queues Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-13iwlagn: Add missing comma between constant string arrayJoe Perches
Multiple quoted strings are concatenated without comma separators. Make the array const while there. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: fix warning in testmode attribute tableWey-Yi Guy
Fix the compile warning cause by [IWL_TM_ATTR_MAX - 1] Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: remove iwlagn_hcmd_utils structure and call directlyDon Fry
Not needed since the driver split. Move single use routines to calling location and keep static where possible. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: separate and enhance the fixed rate fromWey-Yi Guy
For testing purpose, we need better control of msc from user application. Separate the fixed_rate between debugfs and testmode and enforce it. Signed-off-by: Kenny Hsu <kenny.hsu@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: block regular host commands if driver don't own uCodeWey-Yi Guy
The only host command allow to send to uCode is the one initiated from testmode if testmode is the owner of uCode Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: allow application own the uCode operationWey-Yi Guy
Since we open the door to allow application control the device behavior through testmode, add command to allow application request the ownership of the uCode Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: add CMD_ON_DEMAND flag for host command from testmodeWey-Yi Guy
For all the hist command request from testmode, set the CMD_ON_DEMAND flag. this flag will be used later to control the uCode behavior Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: declare staticWey-Yi Guy
Declare iwl_mac_rssi_callback as "static" Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: Enable/disable PS poll based on RSSI and BT coex traffic stateMeenakshi Venkataraman
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-07-11iwlagn: use bt handler for 2030 and 135 series devicesWey-Yi Guy
For bt combo devices, need to use bt enabled handlers and functions Reported-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: remove double level temperature indirect callWey-Yi Guy
No need to do double level indirect call after driver split no functional changes Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: remove indirection for eeprom_query_addrFry, Donald H
Not needed since the driver split. Eliminate redundant routine. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>