aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi
AgeCommit message (Collapse)Author
2012-01-05Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/b43legacy/dma.c
2012-01-04drivers/iwlwifi: use dma_zalloc_coherent() for DMA allocationDjalal Harouni
Replace dma_alloc_coherent()+memset() with the new dma_zalloc_coherent() Signed-off-by: Djalal Harouni <tixxdz@opendz.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-03Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/b43/dma.c drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
2011-12-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: net/bluetooth/l2cap_core.c Just two overlapping changes, one added an initialization of a local variable, and another change added a new local variable. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-21iwlagn: fix (remove) use of PAGE_SIZEJohannes Berg
The ICT code erroneously uses PAGE_SIZE. The bug is that PAGE_SIZE isn't necessarily 4096, so on such platforms this code will not work correctly as we'll try to attempt to read an index in the table that the device never wrote, it always has 4096-byte pages. Additionally, the manual alignment code here is unnecessary -- Documentation/DMA-API-HOWTO.txt states: The cpu return address and the DMA bus master address are both guaranteed to be aligned to the smallest PAGE_SIZE order which is greater than or equal to the requested size. This invariant exists (for example) to guarantee that if you allocate a chunk which is smaller than or equal to 64 kilobytes, the extent of the buffer you receive will not cross a 64K boundary. Just use appropriate new constants and get rid of the alignment code. Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Cc: stable@vger.kernel.org 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-12-21Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
2011-12-19iwlwifi: Execute runtime calibration alwaysVenkataraman, Meenakshi
Runtime DC calibration was previously conditional. Remove this behaviour, as new devices support runtime DC calibration, while older devices ignore the runtime DC calibration request. This patch addresses low TX throughput issues seen with the 6205. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-19iwlwifi: use bus_get_hw_id for IWL_TM_CMD_APP2DEV_GET_DEVICE_IDWey-Yi Guy
instead of doing all the work in IWL_TM_CMD_APP2DEV_GET_DEVICE_ID, just use the information from bus_get_hw_id() Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-19iwlwifi: set hw_version in wiphyWey-Yi Guy
Set the hw_version in wiphy structure Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-19iwlwifi: deliver hw version in both string and u32 formatWey-Yi Guy
Add function to get hw version in both strind and u32 format Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-19iwlagn: finer-grained HT disableJohannes Berg
At least while debugging, a lot of people use 11n_disable=1 to disable HT completely. To be able to figure out what parts of HT cause the problems we see, make the parameter a bitmap, allowing to disable all of HT and aggregation (TX/RX) separately. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-19iwlagn: add IRQ tracingJohannes Berg
The legacy IRQs could be read from a trace by their IO accesses, but reading the ICT doesn't leave any trace (pun intended ;-) ) so in order to see what input they get we need to add specific tracepoints. While at it, fix whitespace in two related places. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-19iwlwifi: update SCD BC table for all SCD queuesEmmanuel Grumbach
Since we configure all the queues as CHAINABLE, we need to update the byte count for all the queues, not only the AGGREGATABLE ones. Not doing so can confuse the SCD and make the fw assert. Cc: stable@vger.kernel.org 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-12-16iwlagn: remove iwlagn_build_addsta_hcmdJohannes Berg
This function is not needed: * we already have the "cmd" input to it in the same type (and on the stack elsewhere) * the "legacy_reserved" parameter is never set, so will always be zero Remove the function and the stack copy of the input command. This is still left from when iwlegacy was part of the driver -- then we needed a translation for the command for 3945. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: add IO function for continuous write of target memoryHsu, Kenny
Add new IO function _iwl_write_targ_mem_words() to support target memory write for a continuous area. It will return error code -EBUSY if iwl_grab_nic_access() fails to indicate the memory write does not be performed. Meanwhile the existing function iwl_write_targ_mem() also been updated by using _iwl_write_targ_mem_words() in a single word case. Signed-off-by: Kenny Hsu <kenny.hsu@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: remove unused AMPDU factor/density configurationJohannes Berg
These are unused, so can be removed safely. They also don't make a lot of sense in Bluetooth configuration. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: remove most of the iwl_priv references from iwl-ucode.cDon Fry
Remove all but the last few references to iwl_priv from the lower level iwl-ucode.c, with resulting code changes. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: create iwl_mac80211 unregister routineDon Fry
The mac80211 setup_register operations are collected in one routine, but the cleanup routines are not. Create a routine for this. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: add missing documentation for iwl_sharedEmmanuel Grumbach
A few descriptions were missing Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: don't accept Tx packets when draining HW queuesEmmanuel Grumbach
If the agg SM is in IWL_EMPTYING_HW_QUEUE_ADDBA or in IWL_EMPTYING_HW_QUEUE_DELBA, we are not supposed to get Tx packets from mac80211. mac80211 is supposed to buffer these packets for us. A few issues have been identified in this mechanism, not all of them were fixed. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: kill iwl_{start,stop}_tx_ba_trans_readyEmmanuel Grumbach
Since my latest patches, the upper layer reports to mac80211 that the driver is ready to continue the start / stop BA flow as opposed to the transport layer. Hence, iwl_{start,stop}_tx_ba_trans_ready are 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>
2011-12-16iwlwifi: add debug in Tx path in AGG flowEmmanuel Grumbach
This will allow us to catch bad cases in which the packets aren't in the right place on the ring. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: reset the tid_data when a station is removedEmmanuel Grumbach
Since the station is removed, we need to reset the information that was accounted for this station. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: tid_data moves to iwl_privEmmanuel Grumbach
The transport doesn't need to access it any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2011-12-16iwlwifi: transport layer shouldn't access the AGG SMEmmanuel Grumbach
This is another step towards the move of tid_data from the shared area. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: tid_data logic move to upper layer - seq_numberEmmanuel Grumbach
The tid_data is not related to the transport layer, so move the logic that depends on it to the upper layer. This patch deals with the seq_number. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: tid_data logic move to upper layer - txqidEmmanuel Grumbach
The tid_data is not related to the transport layer, so move the logic that depends on it to the upper layer. This patch deals with the mapping of RA / TID to HW queues in AGG. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: tid_data logic move to upper layer - check_emptyEmmanuel Grumbach
The tid_data is not related to the transport layer, so move the logic that depends on it to the upper layer. This patch deals with the code that checks if there are still pending packets for an RA / TID. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: tid_data logic move to upper layer - tx AGG setupEmmanuel Grumbach
The tid_data is not related to the transport layer, so move the logic that depends on it to the upper layer. This patch deals with tx AGG setup. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: tid_data logic move to upper layer - tx AGG allocEmmanuel Grumbach
The tid_data is not related to the transport layer, so move the logic that depends on it to the upper layer. This patch deals with tx AGG alloc. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: tid_data logic move to upper layer - tx AGG stopEmmanuel Grumbach
The tid_data is not related to the transport layer, so move the logic that depends on it to the upper layer. This patch deals with tx AGG stop. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: don't rely on the wr / rd pointers in DELBA flowEmmanuel Grumbach
In the same spirit as the previous patch. Eventually this will allow us to remove the tid_data knowledge 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>
2011-12-16iwlwifi: we can wake SW queues even when draining HW queuesEmmanuel Grumbach
In the very first implementation of HT, the driver was responsible for the queueing: stopping and waking the queues while the HW queues where being drained. In this implementation, we had to deal with the case where we were draining the AGG queue because we wanted to tear down the BA agreement. In the normal flow (when we don't drain any HW queue), when packets are reclaimed, we wake the SW queue in case the SW queue was stopped which can happen when the HW queues are too full. While draining a HW queue, we must make sure that we don't wake the SW queue, since the whole point of the draining is to empty totally the HW queue and not only get below a certain threshold. This is why there is condition in the reclaim function: if (NOT EMPTYING DELBA) wake the SW queue is applicable Since then, a lot has changed and mac80211 is now able to buffer packets that are being sent to a packet list that will be spliced after the driver has reported it has drained its HW queues. Hence, there is no need for the for aforementioned if, and we can safely wake up the queue even if we are draining HW queues. Removing this if, also allows us to remove the wake_queue in check_empty that was there in order to deal with a corner case created by the if. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: don't count the tfds in HW queue any moreEmmanuel Grumbach
Since packets sent to an RA / TID in AGG are sent from a separate HW Tx queue, we may get into a race: the regular queue isn't empty while we already begin to send packets from the AGG queue. This would result in sending packets out of order. In order to cope with this, mac80211 waits until the driver reports that the legacy queue is drained before it can send packets to the AGG queue. During that time, mac80211 buffers packets for the driver. These packets will be sent in order after the driver reports it is ready. The way this was implemented in the driver is as follows: We held a counter that monitors the number of packets for an RA / TID in the HW queues. When this counter reached 0, we knew that the HW queues were drained and we reported to mac80211 that were ready to proceed. This patch changes the implementation described above. We now remember what is the wifi sequence number of the first packet that will be sent in the AGG queue (lets' call it ssn). When we reclaim the packet before ssn, we know that the queue is drained, and we are ready to proceed. This will allow us to move this logic in the upper layer and eventually remove the tid_data from the shared area. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: fix endianity issue in debug printsEmmanuel Grumbach
ba_resp->seq_ctl is __le16, need to translate to cpu endianity. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: Add official names for new devicesDon Fry
Replace the engineering names with the marketing names for the new devices. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: move iwl_cfg from iwl_priv to iwl_sharedDon Fry
Move the configuration pointer from the upper level iwl_priv to the lower level iwl_shared structure, with associated code fixes. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-15Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
2011-12-14Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/iwlwifi/iwl-agn.c
2011-12-14iwlwifi: allow to switch to HT40 if not associatedWey-Yi Guy
My previous patch 34a5b4b6af104cf18eb50748509528b9bdbc4036 iwlwifi: do not re-configure HT40 after associated Fix the case of HT40 after association on specified AP, but it break the association for some APs and cause not able to establish connection. We need to address HT40 before and after addociation. CC: stable@vger.kernel.org #3.0+ Reported-by: Andrej Gelenberg <andrej.gelenberg@udo.edu> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Tested-by: Andrej Gelenberg <andrej.gelenberg@udo.edu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-14iwlwifi: tx_sync only on PAN contextJohannes Berg
Ted reported that he couldn't connect to some APs and bisected it to the tx_sync implementation. Disable it for the BSS context to fix this issue. Reported-by: Ted Ts'o <tytso@mit.edu> 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-12-12iwlwifi: do not set the sequence control bit is not neededWey-Yi Guy
Check the IEEE80211_TX_CTL_ASSIGN_SEQ flag from mac80211, then decide how to set the TX_CMD_FLG_SEQ_CTL_MSK bit. Setting the wrong bit in BAR frame whill make the firmware to increment the sequence number which is incorrect and cause unknown behavior. CC: stable@vger.kernel.org #3.0+ Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-08iwlagn: use IWL_MAX_TID_COUNT instead of TID_MAX_LOAD_COUNTJohannes Berg
We track the load only on 8 TIDs, previously this was TID_MAX_LOAD_COUNT. Since IWL_MAX_TID_COUNT is now 8 as well, use that to make the code more easily understandable. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-08iwlagn: use IWL_MAX_TID_COUNT for WoWLANJohannes Berg
Now that I corrected IWL_MAX_TID_COUNT to be 8 instead of 9, we can use it in WoWLAN suspend. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-08iwlagn: fix TID use bugJohannes Berg
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: move calib_results list from iwl_priv to iwl_transDon Fry
Move the calib_results list from the upper layer iwl_priv structure to the lower layer iwl_trans structure. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-08iwlwifi: move device_pointers from iwl_priv to iwl_sharedDon Fry
Move the low level ucode device_pointers structure to iwl_shared. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-08iwlwifi: move eeprom pointer from iwl_priv to iwl_sharedDon Fry
The eeprom image is a device level component, move from iwl_priv to iwl_shared, with associated code changes. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-08iwlwifi: set TX_CMD_FLG_STA_RATE_MSK for BAR frameWey-Yi Guy
It is needed by firmware to use the correct rate for BAR frame transmission Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-08iwlwifi: P2P is not enabled by defaultWey-Yi Guy
P2P still under development. it will not enabled by default, but user always can enable it manually for testing. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>