summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi
AgeCommit message (Collapse)Author
2011-07-11iwlagn: remove the indirection for iwl_apm_initFry, 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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: remove the indirection for update_chain_flagsFry, 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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: provide heplers to access the transport opsEmmanuel Grumbach
This removes the for priv->trans.ops->... 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-07-11iwlagn: remove the indirection for the dma channel numWey-Yi Guy
Not needed since the driver split. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11iwlagn: consolidate the API that sends host commands and move to transportEmmanuel Grumbach
Now, there are only two functions to send a host command: * send_cmd that receives a iwl_host_cmd * send_cmd_pdu that builds the iwl_host_cmd itself and received flags The flags CMD_ASYNC / CMD_SYNC / CMD_WANT_SKB are not changed by the API functions. Kill the unused flags CMD_SIZE_NORMAL / CMD_NO_SKB on the way. 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-07-11iwlagn: remove code duplicationEmmanuel Grumbach
Code duplication was needed during the move, not needed any more. 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-07-11iwlagn: add an API for TX stopEmmanuel Grumbach
Tx stop moves to transport layer. 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-07-11iwlagn: add an API for RX stopEmmanuel Grumbach
Rx stop moves to transport layer. 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-07-11iwlagn: add an API to free the TX contextEmmanuel Grumbach
Tx free functions move to the transport layer. Unify the functions that deal with tx queues and cmd queue. Since the CMD queue is not fully allocated, but uses the q->n_bd / q->window trick, the release flow of TX queue and CMD queue was different. iwlagn_txq_free_tfd receives now the index of the TFD to be freed, which allows to unify the release flow for all the queues. 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-07-11iwlagn: remove the CMD_MAPPED flagEmmanuel Grumbach
It is uneeded since Johannes removed the HUGE flag. The DMA mapping is always held in the same index as the command. 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-07-08mac80211: fix TKIP races, make API easier to useJohannes Berg
Our current TKIP code races against itself on TX since we can process multiple packets at the same time on different ACs, but they all share the TX context for TKIP. This can lead to bad IVs etc. Also, the crypto offload helper code just obtains the P1K/P2K from the cache, and can update it as well, but there's no guarantee that packets are really processed in order. To fix these issues, first introduce a spinlock that will protect the IV16/IV32 values in the TX context. This first step makes sure that we don't assign the same IV multiple times or get confused in other ways. Secondly, change the way the P1K cache works. I add a field "p1k_iv32" that stores the value of the IV32 when the P1K was last recomputed, and if different from the last time, then a new P1K is recomputed. This can cause the P1K computation to flip back and forth if packets are processed out of order. All this also happens under the new spinlock. Finally, because there are argument differences, split up the ieee80211_get_tkip_key() API into ieee80211_get_tkip_p1k() and ieee80211_get_tkip_p2k() and give them the correct arguments. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-06iwlwifi: remove unnecessary read of PCI_CAP_ID_EXPJon Mason
The PCIE capability offset is saved during PCI bus walking. It will remove an unnecessary search in the PCI configuration space if this value is referenced instead of reacquiring it. Signed-off-by: Jon Mason <jdmason@kudzu.us> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-01iwlagn: remove the indirection for the rx write pointerEmmanuel Grumbach
Not needed 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>
2011-07-01iwlagn: remove hcmd opsWey-Yi Guy
All "agn" devices use the same hcmd functions, no need to call indirectly. remove hcmd_ops Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01iwlagn: call bt_coex directllyWey-Yi Guy
Call the 2-wire and advanced bt-coex function directly to avoid mistake Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01iwlagn: scd memory boundaryWey-Yi Guy
Assign memory boundary for SCD context, tx status and translation table Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01iwlagn: move the tx allocation funcs to the transport layerEmmanuel Grumbach
These functions allocate all the Tx context. Only the simple tx_init is exported as API. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01iwlagn: add rx_free to transport layerEmmanuel Grumbach
The transport layer ness to release all rx ressources. This function is an API for it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01iwlagn: introduce transport layer and implement rx_initEmmanuel Grumbach
The transport layer is responsible for all the queues, DMA rings etc... This is the beginning of the separation of all the code that is tighly related to HW design to the aforementioned 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-01iwlagn: add module parameter to disable stuck queue watchdog timerWey-Yi Guy
Add the parameter to disable stuck queue watchdog timer, different platforms might have different timing. Provide the option to disable the timer to prevent un-necessary firmware reload. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01iwlagn: add correct firmware name for 135 seriesWey-Yi Guy
135 series are WiFi/BT combo and require different uCode from 105 series. [A Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01iwlagn: re-define the testmode cmd and attr enumWey-Yi Guy
To make sure not having issues when adding new testmode commands or attributes in the future, re-define the enum. no functional changes Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01iwlagn: verify mutex held for sync commandsJohannes Berg
Emmanuel noticed that there's no explicit checking that prevents the driver from attempting to issue multiple synchronous commands at the same time and wrote a patch to check. However, his patch warns only if a collision actually happened, an unlikely thing since the driver mutex should be held for synchronous command submissions. So instead of checking that a collision happened add a check that the mutex is held which ensures that collisions can't happen. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-28Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-tx.c
2011-06-28iwlagn: use PCI_DMA_* for pci_* operationsJohn W. Linville
"iwlagn: map command buffers BIDI" uses the DMA_* enumerations for DMA directions, even though the pci_* DMA API is still in use. That patch was undoubtedly developed on top of "iwlagn: don't use the PCI wrappers for DMA operation", which is due in the next release. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27iwlwifi: use pci_dev->revision, againSergei Shtylyov
Commit ff938e43d39e926de74b32a3656c190f979ab642 (net: use pci_dev->revision, again) already converted this driver to using the 'revision' field of 'struct pci_dev' but commit 084dd79172cb3aad11d2b7ee5628d57badca7c6e (iwlagn: move PCI related operations from probe and remove to PCI layer) has again added the code to read the PCI revision ID register... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27iwlagn: fix rmmod crashStanislaw Gruszka
priv->bus.bus_specific pointer is used after priv structures was freed, in iwl_pci_remove(), what make ugly rmmod crash. This bug was introduced by current pci changes. On the way remove fake check, if prober error code is returned from .probe() function, .remove() will never be called be null drvdata. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27iwlagn: fix *_UCODE_API_MAX output in the firmware fieldEvgeni Golov
Currently (3.0-rc2), modinfo iwlagn shows: firmware: iwlwifi-5150-IWL5150_UCODE_API_MAX.ucode firmware: iwlwifi-5000-IWL5000_UCODE_API_MAX.ucode firmware: iwlwifi-6000g2b-IWL6000G2_UCODE_API_MAX.ucode firmware: iwlwifi-6000g2a-IWL6000G2_UCODE_API_MAX.ucode firmware: iwlwifi-6050-IWL6050_UCODE_API_MAX.ucode firmware: iwlwifi-6000-IWL6000_UCODE_API_MAX.ucode firmware: iwlwifi-100-IWL100_UCODE_API_MAX.ucode firmware: iwlwifi-1000-IWL1000_UCODE_API_MAX.ucode firmware: iwlwifi-105-IWL105_UCODE_API_MAX.ucode firmware: iwlwifi-2030-IWL2030_UCODE_API_MAX.ucode firmware: iwlwifi-2000-IWL2000_UCODE_API_MAX.ucode which is obviously wrong, the user should not see the *_UCODE_API_MAX macros but the actual ucode API versions here. The problem are the #define *_MODULE_FIRMWARE(api) *_FW_PRE #api ".ucode" which do not expand api correctly (because this is a macro itself). Fixed by using __stringify() from linux/stringify.h. Further information about macro stringification can be found here: http://gcc.gnu.org/onlinedocs/cpp/Stringification.html Signed-off-by: Evgeni Golov <sargentd@die-welt.net> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27iwlagn: map command buffers BIDIJohannes Berg
Evidently, the device sometimes wants to write back to command buffers, even if I see no reason why it should. Allow it to do that. Tested-by: Andy Lutomirski <luto@mit.edu> Tested-by: Kyle McMartin <kyle@redhat.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-27iwlagn: fix cmd queue unmapJohannes Berg
When we stop the device while a command is in flight that uses multiple TBs, we can leak the DMA buffers for the second and higher TBs. Fix this by using iwlagn_unmap_tfd() as we do when we normally recover the entry. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24iwlagn: don't use CCK rates for P2P interfacesJohannes Berg
P2P interfaces must not use CCK rates, only OFDM rates are allowed. To set this up, we need to set up the broadcast station to start with 6M instead of starting with 1M. Since the interface type can change, also reset the broadcast station when RXON changes. This will affect beacons as well. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24iwlagn: fill beacon TX rate properlyJohannes Berg
Use the rate that mac80211 requested to fill the uCode TX command for the beacon. Unfortunately, the uCode is (currently?) ignoring it, but now at least fill it properly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24iwlagn: extend host command timeoutJohannes Berg
We've infrequently seen timeouts, make the wait time match the windows driver; hopefully our driver is just too impatient. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24iwlagn: fix cmd queue unmapJohannes Berg
When we stop the device while a command is in flight that uses multiple TBs, we can leak the DMA buffers for the second and higher TBs. Fix this by using iwlagn_unmap_tfd() as we do when we normally recover the entry. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24iwlagn: use PM ops macroJohannes Berg
Simplify the code and use SIMPLE_DEV_PM_OPS to define iwl_dev_pm_ops instead of doing the same thing manually. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24iwlagn: fix change_interface for P2P typesJohannes Berg
When an interface changes type to a P2P type, iwlagn will erroneously set vif->type to the P2P type and not the reduced/split type. Fix this by keeping "newtype" in another variable for the assignment to vif->type. Cc: stable@kernel.org [2.6.38+] Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24iwlagn: Fix a bug introduced by the HUGE command removalEmmanuel Grumbach
Since we don't have HUGE command any more, there is no point in adding 1 to the num of slots in the command queue. Doing so is buggy and might corrupt memory. Bug introduced by 4ce7cc2b09553a91d4aea014c39674685715173a iwlagn: support multiple TBs per command Cc: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-20Merge branch 'wireless-next-2.6' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
2011-06-20iwlwifi: fix stop/wake queue hacksKalle Valo
The hacks break once mac80211-compat.h is taken into use. Fix it by adding an ifdef check. Signed-off-by: Kalle Valo <kvalo@adurom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-18iwlagn: remove incorrect defineWey-Yi Guy
Remove unused and incorrect EEPROM define Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-18iwlagn: merge duplicate code into single functionWey-Yi Guy
Same operation needed by multiple devices, move to single function. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-18iwlagn: code alignmentWey-Yi Guy
Code alignment, no functional changes. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-18iwlagn: add offset define for subsystem idWey-Yi Guy
Add offset define for subsystem id in EEPROM Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-18iwlagn: Add power_level module parameterWey-Yi Guy
Add power_level module parameter to set the default power save level. Power save level has range from 1 - 5, default power save level is 1. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-18iwlagn: add power_save module parameterWey-Yi Guy
Add power_save module parameter to enable power management if needed Default power management is disabled. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-18iwlagn: store the irq number to iwl_bus just like devEmmanuel Grumbach
Since the irq number is just an unsigned int, store it inside iwl_bus instead of calling the get_irq ops every time it is needed. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-18iwlagn: warn about nested SYNC commandsEmmanuel Grumbach
Since there is no protection around SYNC host command mechanism, at least WARN when collision happens between two SYNC host comamnds. I am not sure there is a real issue (beyond the HCMD_ACTIVE flag maintenance) with having two SYNC host commands at the same time, but at least now, we will know about it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-18iwlagn: fix misplaced bracketEmmanuel Grumbach
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-18iwlagn: waterfall the bus level if prepare card failedEmmanuel Grumbach
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-18iwlagn: finally kill the pointer to pci_dev from iwl-dev.hEmmanuel Grumbach
All pci related stuff is in iwl-pci.c. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>