summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mac80211: add sta_state callbackJohannes Berg2012-02-068-28/+194
| | | | | | | | | | | | | | | | | | | | | | (based on Eliad's patch) Add a callback to notify the low-level driver whenever the state of a station changes. The driver is only notified when the station is actually in the mac80211 hash table, not for pre-insert state transitions. To allow the driver to replace sta_add/remove calls with this, call extra transitions with the NOTEXIST state. This callback can fail, so we need to be careful in handling it when a station is inserted, particularly in the IBSS case where we still keep the station entry around for mac80211 purposes. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: add NOTEXIST station stateJohannes Berg2012-02-062-0/+3
| | | | | | | | | | This will be used by drivers later if they need to have stations inserted all the time, in mac80211 has no purpose, is never used and sta_state starts out in NONE. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: dont program keys for stations not uploadedJohannes Berg2012-02-061-16/+14
| | | | | | | | | | If a station couldn't be uploaded to the driver but is still kept (only in IBSS mode) we still shouldn't try to program the keys for it into hardware; fix this bug by skipping the key upload in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: simplify AP_VLAN handlingJohannes Berg2012-02-065-33/+7
| | | | | | | | | | | | | | Setting keys and updating TKIP keys must use the BSS sdata (not AP_VLAN), so we translate. Move the translation into driver-ops wrappers instead of having it inline in the code to simplify the normal code flow. The same can be done for sta_add/remove which already does the translation in the wrapper. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: move managed mode station state modificationJohannes Berg2012-02-061-14/+14
| | | | | | | | | | | Move the station state modification right before insert, this just makes the current code more readable (you can tell that it's before insertion looking at a single screenful of code) right now, but some upcoming changes will require this. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'wireless-next' of ↵John W. Linville2012-02-0630-1776/+1837
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi
| * iwlwifi: range check to testmode direct reg accessAmit Beka2012-02-021-2/+16
| | | | | | | | | | | | | | | | | | Added a check on the direct register access. Checks that the address is in the lower ragnge (0x0-0x2000), which belongs to CSR, HBUS and FH registers. Signed-off-by: Amit Beka <amit.beka@intel.com> Signed-off-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: release IRQ in error pathJohannes Berg2012-02-021-1/+3
| | | | | | | | | | | | | | | | | | | | smatch correctly complains: iwl-trans-pcie.c +1528 iwl_trans_pcie_start_hw(50) warn: 'trans->irq' was not released on error Fix it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: move all ucode routines to iwl-ucode.cDon Fry2012-02-027-719/+791
| | | | | | | | | | | | | | | | | | The routines dealing with the ucode are spread through several files. Move them all to the same file and create a iwl-ucode.h file with the ucode file definitions. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: move bcast_sta_id init to common routineDon Fry2012-02-025-10/+1
| | | | | | | | | | | | | | | | There is nothing device specific in the initialization of the bcast_sta_id so move it to the common inititalization routine. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: clarify commentDon Fry2012-02-021-1/+1
| | | | | | | | | | | | | | change a comment to be a little more clear Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: debug print in tx_queue_set_status is more clearEmmanuel Grumbach2012-02-021-3/+6
| | | | | | | | | | | | | | | | The message was misleading when a queue is deactivated. The fifo number is irrelevant then, so don't print it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: stop_hw replace enable_rfkill_intEmmanuel Grumbach2012-02-024-11/+10
| | | | | | | | | | | | | | | | | | | | This trans_ops->stop_hw leaves the RFKILL interrupt enabled, we can call that one instead of enable_rfkill_int. By that, we reduce the numbers of acceesses to the NIC from the upper layers. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: move hw_rev to transport layerEmmanuel Grumbach2012-02-023-11/+4
| | | | | | | | | | | | | | The HW revision is now read by the transport layer in its allocation. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: kill bus_get_hw_idEmmanuel Grumbach2012-02-026-49/+10
| | | | | | | | | | | | | | Get this information from the transport layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: kill bus_get_hw_id_stringEmmanuel Grumbach2012-02-025-21/+6
| | | | | | | | | | | | | | Get this information from the transport layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: kill bus_is_pm_supportedEmmanuel Grumbach2012-02-025-28/+4
| | | | | | | | | | | | | | | | Get this information from the transport layer which is now in charge of the APM too. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: kill bus_apm_configEmmanuel Grumbach2012-02-023-40/+46
| | | | | | | | | | | | | | | | This handler was called from the transport layer only. Merge it to the transport's apm_init. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: consolidate the start_device flowEmmanuel Grumbach2012-02-024-120/+103
| | | | | | | | | | | | | | | | | | | | Now there is only one transport function that launch a specific fw: trans_ops->start_fw. This one replaces trans_ops->start_device and trans_ops->kick_nic. The code that actually loads the fw to the device has been moved to the transport specific code. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: move the RF kill logic from iwl_probe to transportEmmanuel Grumbach2012-02-022-23/+11
| | | | | | | | | | | | | | This is another clean up of the proble flow. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: introduce trans_ops->stop_hwEmmanuel Grumbach2012-02-025-44/+61
| | | | | | | | | | | | | | | | This handler stops the HW and puts it in low power state. It will allow to clean up the flows in the upper layers. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: move apm_init to start_hwEmmanuel Grumbach2012-02-024-89/+87
| | | | | | | | | | | | | | This is transport related Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: move prepare_card_hw to start_hwEmmanuel Grumbach2012-02-023-21/+15
| | | | | | | | | | | | | | Kill the trans_ops->prepare_card_hw which is now useless. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: rename trans_ops->request_irq to trans_ops->start_hwEmmanuel Grumbach2012-02-024-19/+29
| | | | | | | | | | | | | | This handler will become thicker, reflect its real role now. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: don't use the bus for ucode fw_desc any moreEmmanuel Grumbach2012-02-023-17/+19
| | | | | | | | | | | | | | This is transport related Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: remove the pointer to dev from the bus layerEmmanuel Grumbach2012-02-025-17/+16
| | | | | | | | | | Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: give trans to all the read / write functionsEmmanuel Grumbach2012-02-0224-406/+405
| | | | | | | | | | | | | | | | | | From now on, the transport layer in charge of providing access to the device. So change all the driver to give a pointer to the transport to all the low level functions that actually access the device. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: the read / write register ops move to transportEmmanuel Grumbach2012-02-025-64/+48
| | | | | | | | | | | | | | Most of the accesses to the registers are done from the transport layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: move the bus configuration to transportEmmanuel Grumbach2012-02-025-117/+158
| | | | | | | | | | | | | | | | All the bus configuration is now done in the transport allocation fucntion. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: allocate the transport from the bus layerEmmanuel Grumbach2012-02-024-30/+48
| | | | | | | | | | | | | | | | | | | | Change the way we alloc the transport on the way. Since the transport is allocated from a bus specific area, we can give the bus specific parameters (i.e. pci_dev for PCI) to the transport. This will be useful when the bus layer will be killed. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: move the shrd memory from privEmmanuel Grumbach2012-02-023-4/+11
| | | | | | | | | | | | | | | | Allocating the shrd area dynamically will allow more agility while revamping the flows. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: separate the APM from the EEPROMEmmanuel Grumbach2012-02-022-4/+4
| | | | | | | | | | | | | | | | There is no link between the two. Ensure that the NIC is on outside the code of the EEPROM handling. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: Connect IDI transport to driver.Gregory Greenman2012-02-024-2/+23
| | | | | | | | | | | | | | | | | | This patch connects IDI transport to driver. It does so by using a number of ifdefs at this stage. IDI is a new transport that is under development. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: add fw_alive to transport layer API, kill tx_startEmmanuel Grumbach2012-02-027-21/+19
| | | | | | | | | | | | | | | | | | Define a new handler in the transport layer API: fw_alive. Move iwl_reset_ict to this new handler, and move the content of tx_start to this handler. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * Merge branch 'master' of ↵Wey-Yi Guy2012-02-0249-344/+628
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into wireless-next
| * | iwlwifi: always restrict scan dwell in P2PJohannes Berg2012-01-281-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever the PAN (P2P) context is active, it has timers in the uCode that prevent sleep, so scanning can't be out of channel for more than the beacon interval programmed into the device. Before this patch, a full scan including any passive channels when P2P was active would stall forever because it wouldn't find time to execute the passive requests (for default beacon intervals of 100 TU.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlwifi: add option to disalbe LEDWey-Yi Guy2012-01-283-1/+7
| | | | | | | | | | | | | | | | | | | | | Led has no use for some platform. Add additional module parameter option to disable LED Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlwifi: fix uCode event tracingJohannes Berg2012-01-283-32/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix multiple bugs in event tracing: 1) If you enable uCode tracing with the device down, it will still attempt to access the device and continuously log "MAC is in deep sleep!" errors. Fix this by only starting logging when the device is actually alive. 2) Now you can set the flag when the device is down, but logging doesn't happen when you bring it up. To fix that, start logging when the device comes alive. This means we don't log before -- we could do that but I don't need it right now. 3) For some reason we read the error instead of the event log -- use the right pointer. 4) Optimise SRAM reading of event log header. 5) Fix reading write pointer == capacity, which can happen due to racy SRAM access 6) Most importantly: fix an error where we would try to read WAY too many events (like 2^32-300) when we read the wrap counter before it is updated by the uCode -- this does happen in practice and will cause the driver to hang the machine. 7) Finally, change the timer to 10ms instead of 100ms as 100ms is too slow to capture all data with a normal event log and with 100ms the log will wrap multiple times before we have a chance to read it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlwifi: fix typoWey-Yi Guy2012-01-281-4/+4
| | | | | | | | | | | | | | | | | | Fix few places of typo Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | Merge branch 'master' of ↵Wey-Yi Guy2012-01-286892-155198/+260788
| |\ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into wireless-next
| * | | iwlwifi: update CopyrightWey-Yi Guy2012-01-0653-75/+75
| | | | | | | | | | | | | | | | | | | | | | | | Update Copyright to 2012 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | | iwlwifi: add testmode cmd IWL_TM_CMD_APP2DEV_GET_FW_INFOKenny Hsu2012-01-062-3/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new testmode command IWL_TM_CMD_APP2DEV_GET_FW_INFO for reporting the following information of existing loaded uCode image. + uCode type + Instruction section size + Data section size Signed-off-by: Kenny Hsu <kenny.hsu@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | | iwlwifi: update error dump in testmode command sram_readKenny Hsu2012-01-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error message will be show up by using IWL_ERR insteads of IWl_DEBUG_INFO. Signed-off-by: Kenny Hsu <kenny.hsu@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | | iwlwifi: enhance testmode command sram_readKenny Hsu2012-01-062-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables SRAM read function to support entire target memory. Signed-off-by: Kenny Hsu <kenny.hsu@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | | iwlwifi: update testmode command of direct register accessKenny Hsu2012-01-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to make sure the testcommand function of direct register access can be performed even NIC is asleep, replace corresponding handler iwl_read32 and iwl_write32 by using iwl_direct_read32 and iwl_direct_write32. Signed-off-by: Kenny Hsu <kenny.hsu@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | | iwlwifi: Sanity check for sta_idWey-Yi Guy2012-01-061-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On my testing, I saw some strange behavior [ 421.739708] iwlwifi 0000:01:00.0: ACTIVATE a non DRIVER active station id 148 addr 00:00:00:00:00:00 [ 421.739719] iwlwifi 0000:01:00.0: iwl_sta_ucode_activate Added STA id 148 addr 00:00:00:00:00:00 to uCode not sure how it happen, but adding the sanity check to prevent memory corruption Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | | iwlwifi: don't process the info from uCode if does not has ownershipWey-Yi Guy2012-01-061-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When enable the testmode from user space and working with uCode, driver does not own the uCode and should not process the notifications or pkts from uCode Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | | | Merge branch 'for-linville' of git://github.com/kvalo/ath6klJohn W. Linville2012-02-0621-922/+2437
|\ \ \ \
| * | | | ath6kl: initialize the 'nominal_phy' field in the 'wmi_create_pstream_cmd' ↵Chilam Ng2012-02-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct for create_qos command The nominal_phy field is uninitialized. Initialize it to min_phy_rate for create_qos. kvalo: simplified the equation as checkpatch complained for a too long line Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * | | | ath6kl: fix compiler warning in ath6kl_init_hw_params()Kalle Valo2012-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both Luis and John reported that they see a compiler warning: drivers/net/wireless/ath/ath6kl/init.c: In function 'ath6kl_init_hw_params': drivers/net/wireless/ath/ath6kl/init.c:1377:26: warning: ‘hw’ may be used uninitialized in this function Oddly enough I have never seen it. But AFAICT the code is correct and hw is not used uninitalized so add uninitialized_var() to inform that to the compiler. Reported-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Reported-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>