aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-core.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-08-17iwlwifi: fix 3945 filter flagsJohannes Berg1-3/+0
Applying the filter flags directly as done since commit 3474ad635db371b0d8d0ee40086f15d223d5b6a4 Author: Johannes Berg <johannes.berg@intel.com> Date: Thu Apr 29 04:43:05 2010 -0700 iwlwifi: apply filter flags directly broke 3945 under some unknown circumstances, as reported by Alex. Since I want to keep the direct application of filter flags on iwlagn, duplicate the code into both 3945 and agn and remove committing the RXON that broke things from the 3945 version. Cc: stable@kernel.org [2.6.35] Reported-by: Alex Romosan <romosan@sycorax.lbl.gov> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-09iwlagn: fix rts cts protectionJohannes Berg1-6/+8
Currently the driver will try to protect all frames, which leads to a lot of odd things like sending an RTS with a zeroed RA before multicast frames, which is clearly bogus. In order to fix all of this, we need to take a step back and see what we need to achieve: * we need RTS/CTS protection if requested by the AP for the BSS, mac80211 tells us this * in that case, CTS-to-self should only be enabled when mac80211 tells us * additionally, as a hardware workaround, on some devices we have to protect aggregated frames with RTS To achieve the first two items, set up the RXON accordingly and set the protection required flag in the transmit command when mac80211 requests protection for the frame. To achieve the last item, set the rate-control RTS-requested flag for all stations that we have aggregation sessions with, and set the protection required flag when sending aggregated frames (on those devices where this is required). Since otherwise bugs can occur, do not allow the user to override the RTS-for-aggregation setting from sysfs any more. Finally, also clean up the way all these flags get set in the driver and move everything into the device-specific functions. Cc: stable@kernel.org [2.6.35] 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-07-23iwlwifi: make iwl_mac_beacon_update staticJohannes Berg1-1/+0
This function is only needed in the same file it is defined in, i.e. iwl-core.c Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-07-23iwlagn: add bluetooth stats to debugfsWey-Yi Guy1-0/+2
For WiFi/BT combo devices, add bluetooth statistics counter read function to debugfs. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-07-23iwlagn: add .cfg flag to idenfity the need for bt statisticsWey-Yi Guy1-0/+1
Only WiFi/BT combo devices need to use bluetooth version of statistics notification; adding the flag in .cfg file to indicate the need for using different data structure. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-07-02iwlwifi: add support for device tx flush requestWey-Yi Guy1-0/+1
"Flush" request can come from two different sources, it can either from mac80211, or from device when the operation is needed. Here adding the support for device issue "flush" request. When receive tx complete with status is TX_STATUS_FAIL_RFKILL_FLUSH, issue REPLY_TXFIFO_FLUSH command to uCode to flush out all the tx frames in queues. In this condition, since mac80211 has no knowledge of "flush" operation, driver need to stop all the tx queues and wait for the operation completed before wake up the queues for frames transmission. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-07-02iwlwifi: add mac80211 flush callback supportWey-Yi Guy1-0/+2
Adding flush callback support in the driver. Two type of flush can be issued by mac80211: 1. drop = true: frame drop is ok, issue REPLY_TXFIFO_FLUSH host command to uCode to drop all the frames in tx fifo queues; then return the control back to mac80211 2. drop = false: wait for either all the frames in tx fifo queues been transmitted, or timeout; then return the control back to mac80211 If the flush request coming from mac80211, mac80211 will make sure there are no additional frames push down to driver before flush operation is completed. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-07-02iwlwifi: fix fw_restart module parameterWey-Yi Guy1-1/+1
fw_restart module parameter was broken by the recent check for stuck queue patch, driver check the fx_restart module parameter before reload the firmware; but the stuck queue timer kick in after firmware error and reload the firmware even fw_restart=0. In this case, driver should not reload the firmware, it is important to help debugging uCode error. The only case we can ignore the module parameter is when user request firmware reload from debugfs, which can bypass the checking and perform firmware reload all the time. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-25iwlwifi: update LQ for bcast station on channel changeDaniel Halperin1-0/+1
The rate table in the bcast LQ is computed only when the station is allocated, and chooses the lowest rate for the band. Because of when this occurs, this is the 2.4 GHz band and uses the 0x420a (CCK, 1 Mbps) rate. In 5 GHz beaconing mode, this rate will prevent beacons from being sent and any other packets from being received. We can fix this by re-initializing the bcast station's LQ command when the channel is changed. Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-25iwlwifi: enable DC calibration based on config parameterWey-Yi Guy1-0/+1
Different devices have different calibration requirement, some need DC calibration and some don't; make it a cfg parameter for easy management. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-21iwlwifi: remove non-exist referenceWey-Yi Guy1-2/+0
Remove the reference to non-exist function in iwlcore Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-21iwlwifi: move agn specific rx related code to iwl-agn-rx.cWey-Yi Guy1-8/+0
To avoid having unnecessary functions in iwlcore.ko, those that are not shared by agn and 3945, move agn specific rx related code to iwl-agn-rx.c. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-07Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6John W. Linville1-0/+2
Conflicts: drivers/net/wireless/iwlwifi/iwl-core.h
2010-06-05iwlwifi: generic scan TX antenna forcingJohannes Berg1-2/+3
In "iwlwifi: make scan antenna forcing more generic" I introduced generic scan RX antenna forcing, which here I rename to make it more evident. Also add scan TX antenna forcing, since I will need that as well. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: support channel switch offload in driverWey-Yi Guy1-1/+7
Support channel switch in driver as a separated mac80211 callback function instead of part of mac_config callback; by moving to this approach, uCode can have more control of channel switch timing. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: beacon format related helper functionWey-Yi Guy1-0/+5
Move the ucode beacon formation related helper function from 3945 to iwlcore, so both _3945 and _agn devices can utilize those functions. When driver pass the beacon related timing information to uCode in both spectrum measurement and channel switch commands, the beacon timing parameter require in uCode beacon format; those helper functions will do the conversation from uSec to the correct uCode format Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: use virtual interface address for scanJohannes Berg1-1/+1
For probe request frames sent during scan, we should use the virtual interface's mac address that the scan was initiated on to avoid issues when the wrong address is used. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwl3945: fix internal scanAbhijeet Kolekar1-0/+2
Port of internal scan to iwl3945 missed introduction of iwl3945_get_single_channel_for_scan. Fix the following bug by introducing the iwl3945_get_single_channel_for_scan http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2208 Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-13iwlwifi: move ucode related function to iwl-agn-ucode.cWey-Yi Guy1-1/+0
Cleanup the code and move all the uCode related functions specific to _agn devices to iwl-agn-ucode.c Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-13iwlwifi: move iwl_free_tfds_in_queue to iwlagnJohannes Berg1-2/+0
This function is only used by the agn drivers, so doesn't have to be in core and exported. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-10iwlwifi: provide more comments for cfg structureWey-Yi Guy1-0/+12
Provide comments for newly added cfg parameters Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-10iwlwifi: rework broadcast station managementJohannes Berg1-1/+0
Currently, the broadcast station is managed along with the interface type, rather than always being present. That leads to a bug with injection -- it is currently not possible to inject frames when the only virtual interface is a monitor, because in that the required broadcast station is missing. Additionally, allocating and deallocating the broadcast station's LQ all the time is wasteful, and the code to support this is fairly complex. So this changes completely the way we manage the broadcast station. Rather than manage it along with any interface, we now allocate it when we bring the device up, and remove it again when we bring the device down. When we bring the device up, we don't immediately program the broadcast station into it, instead we just mark it active and rely on the next restore cycle to upload it to the device. This works because an unassociated RXON is always required at least once to set up device parameters, which implies a reprogramming of stations into the device. As we now manage all stations properly, there no longer is a need for forcing a clearing of them via iwl_clear_ucode_stations(), which can become a lot simpler. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-10iwlwifi: push virtual interface throughJohannes Berg1-11/+14
Rather than keeping every bit of information around in priv and the virtual interface, add a virtual interface to many functions and use the information directly from it. This removes beacon_int, assoc_capability and assoc_id from struct iwl_priv. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-10iwl3945: add plcp error checkingAbhijeet Kolekar1-0/+2
Add plcp error checking for 3945. After threshold of plcp is reached , it resets the radio Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-10iwlwifi: remove ucode virtual functionsJohannes Berg1-12/+0
AGN devices all use the same ucode operations, except for 4965, because 4965 uses only v1 file headers. Therefore, we can remove all the indirection we have here and just code the API distinction in place, with a small special case for 4965. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-10iwlwifi: manage IBSS station properlyJohannes Berg1-0/+2
Currently iwlwifi will eventually exhaust the station table when adding the BSSID station for IBSS mode, unless the interface is set down. The new mac80211 ibss joined/left notification allows us to fix that easily by moving the code to add the IBSS station to the notification, and also adding code to remove it again when we leave the IBSS. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-10iwlwifi: make bcast LQ command available for later restore actionsReinette Chatre1-1/+1
When adding the broadcast station the link quality command is generated on demand, sent to device, and disappears. It is thus not available for later cases when we need to restore stations and need to send the link quality command afterwards. Now, when first adding the broadcast station, also generate its link quality command to always be available for later restoring. Also fix an issue when adding local stations where the "in progress" state is never cleared. Reported-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-10iwlwifi: wimax co-exist code clean upWey-Yi Guy1-1/+0
wifi/wimax co-exist command is part of _agn device configuration sequence; move it to iwl-agn-ucode.c which is more appropriate place for the function. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-10iwlwifi: use cfg to configure calibration operationWey-Yi Guy1-0/+2
sensitivity calibration and chain noise calibration are not available for all the devices; use .cfg to configure the availability of those calibration functions Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-10iwlwifi: use .cfg to enable/disable continuous ucode traceWey-Yi Guy1-0/+1
Instead of checking device type for enable/disable continuous ucode trace function; put it in .cfg for better control and more flexibilities. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-10iwlwifi: remove device type checking for tx power in debugfsWey-Yi Guy1-0/+1
Instead of checking device type for enable/disable tx power control, move it to .cfg for better control and more flexibilities. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-10iwl3945: fix scan racesAbhijeet Kolekar1-0/+1
Port following patch to 3945. "commit 90c4162ff59a3281b6d2f7206740be6217bd6758 Author: Johannes Berg <johannes.berg@intel.com> Date: Wed Apr 7 00:21:36 2010 -0700 iwlwifi: fix scan races" Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-27mac80211: give virtual interface to hw_scanJohannes Berg1-1/+3
When scanning, it is somewhat important to scan on the correct virtual interface. All drivers that currently implement hw_scan only support a single virtual interface, but that may change and then we'd want to be ready. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-16iwlwifi: make scan antenna forcing more genericJohannes Berg1-1/+1
Some future hardware will also require some antenna overrides so make the current logic more generic; right now it is semantically based on a workaround for off-channel reception but the reasons for the new antenna overrides will be different. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-16iwlwifi: don't check monitor for scanningJohannes Berg1-1/+0
Monitor mode operation need not (and probably should not) affect scanning this way since real monitoring can not properly happen while scanning anyway. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-16iwlwifi: make BT coex config a virtual methodJohannes Berg1-1/+2
Some future hardware will require a different command to be sent for bluetooth coexist, so make this a virtual method that can be changed on a per-device basis. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-16iwlwifi: add debugfs ops to iwlwifiAbhijeet Kolekar1-0/+10
Seperate debugfs functions into iwlagn specific debugfs file and Add debugfs ops to iwlwifi. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-16iwlwifi: trigger scan synchronouslyJohannes Berg1-0/+2
Scan requesting doesn't need to be asynchronous since all code paths leading up to it can sleep. Make the scan request a new util operation that is hw-specific (to account for 3945 vs. agn) and call it right in place. This patch moves a lot of code into iwlagn as it need not be in iwlcore. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-16Merge branch 'wireless-2.6' into wireless-next-2.6Reinette Chatre1-1/+1
Conflicts: drivers/net/wireless/iwlwifi/iwl-6000.c
2010-04-16iwlwifi: fix scan racesJohannes Berg1-1/+1
When an internal scan is started, nothing protects the is_internal_short_scan variable which can cause crashes, cf. https://bugzilla.kernel.org/show_bug.cgi?id=15667. Fix this by making the short scan request use the mutex for locking, which requires making the request go to a work struct so that it can sleep. Reported-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09iwlwifi: default max event log sizeWey-Yi Guy1-0/+1
Size of event log is determined by uCode which is different per NICs. Set the maximum event log size per device to better match uCode configuration. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-08Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into mergeJohn W. Linville1-0/+2
Conflicts: Documentation/feature-removal-schedule.txt drivers/net/wireless/ath/ath5k/phy.c drivers/net/wireless/iwlwifi/iwl-4965.c drivers/net/wireless/iwlwifi/iwl-agn.c drivers/net/wireless/iwlwifi/iwl-core.c drivers/net/wireless/iwlwifi/iwl-core.h drivers/net/wireless/iwlwifi/iwl-tx.c
2010-04-02iwlwifi: avoid Tx queue memory allocation in interface downZhu Yi1-1/+4
We used to free all the Tx queues memory when interface is brought down and reallocate them again in interface up. This requires order-4 allocation for txq->cmd[]. In situations like s2ram, this usually leads to allocation failure in the memory subsystem. The patch fixed this problem by allocating the Tx queues memory only at the first time. Later iwl_down/iwl_up only initialize but don't free and reallocate them. The memory is freed at the device removal time. BTW, we have already done this for the Rx queue. This fixed bug https://bugzilla.kernel.org/show_bug.cgi?id=15551 Signed-off-by: Zhu Yi <yi.zhu@intel.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-31iwlwifi: manage QoS by mac stackStanislaw Gruszka1-2/+1
We activate/deactivate QoS and setup default queue parameters in iwlwifi driver. Mac stack do the same, so we do not need repeat that work here. Stack also will tell when disable QoS, this will fix driver when working with older APs, that do not have QoS implemented. Patch make "force = true" in iwl_active_qos() assuming we always want to do with QoS what mac stack wish. Patch also remove unused qos_cap bits, do not initialize qos_active = 0, as we have it initialized to zero by kzalloc. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-25iwlwifi: avoid device type checking in generic codeWey-Yi Guy1-0/+1
Avoid checking for specified device type to perform certain function, switch to .cfg approach as more generic and better implementation method. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25iwlwifi: Generic approach to measure temperatureWey-Yi Guy1-0/+1
In stead of checking for 4965 and do KELVIN_TO_CELSIUS conversation, add .cfg parameter for more generic approach. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25iwlwifi: more clean up to move agn only rx functions from iwlcore to iwlagnWey-Yi Guy1-7/+0
Move more functions only used by agn driver from iwlcore to iwlagn. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25iwlwifi: move agn only rx functions from iwlcore to iwlagnWey-Yi Guy1-5/+0
Identify the rx functions only used by agn driver and move those from iwlcore to iwlagn. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25iwlwifi: move agn only tx functions from iwlcore to iwlagnWey-Yi Guy1-12/+0
Identify the tx functions only used by agn driver and move those from iwlcore to iwlagn. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-19iwlwifi: code cleanup for connectivity recoveryWey-Yi Guy1-3/+8
Split the connectivity check and recovery routine into separated functions based on the types 1. iwl_good_ack_health() - check for ack count 2. iwl_good_plcp_health() - check for plcp error Based on the type of errors being detected, different recovery methods will be used to bring the system back to normal operational state. Because different NIC has different HW and uCode, the behavior is also different; these functions thus now form part of the ops infrastructure, so we can have more control on how to monitor and recover from error condition case per device. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>