summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/dvm
AgeCommit message (Collapse)AuthorFilesLines
2015-02-01iwlwifi: allow to define the stuck queue timer per queueEmmanuel Grumbach3-3/+4
Different queue can have different behavior. While it can be unacceptable for a certain queue to be stuck for 2 seconds (e.g. the command queue), it can happen that another queue will stay stuck for even longer (a queue servicing a power saving client in GO). The op_mode can even make the timeout be a function of the listen interval. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-02-01iwlwifi: mvm: enable watchdog on Tx queues for mvmEmmanuel Grumbach1-5/+1
This watchdog allows to monitor the transmit queues. When a queue doesn't progress for a too long time, a timer fires and then, debug data can be collected. This watchdog has never been enabled on dvm controlled devices, so don't enable it there. In order to have it running on mvm controlled devices, we need to fix a small issue in the transport layer: mvm controlled devices use the shadow registers optimization. In this case, the watchdog wasn't running at all, even if enabled by the module parameter. Fix that on the way. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-28iwlwifi: dvm: main: Use setup_timerJulia Lawall1-6/+4
Convert a call to init_timer and accompanying intializations of the timer's data and function fields to a call to setup_timer. A simplified version of the semantic match that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression t,f,d; @@ -init_timer(&t); +setup_timer(&t,f,d); -t.data = d; -t.function = f; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-28iwlwifi: dvm: tt: Use setup_timerJulia Lawall1-9/+4
Convert a call to init_timer and accompanying intializations of the timer's data and function fields to a call to setup_timer. A simplified version of the semantic match that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression t,f,d; @@ -init_timer(&t); +setup_timer(&t,f,d); -t.data = d; -t.function = f; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-28iwlwifi: remove MODULE_VERSIONJohannes Berg1-14/+0
The module version "in-tree:" or "in-tree:d" is useless; there should be better (functional) ways to detect whether debugging is enabled and other than that the version says nothing. Therefore remove the driver version completely. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-02iwlwifi: dvm: fix flush support for old firmwareEmmanuel Grumbach2-36/+42
Since the commit below, iwldvm sends the FLUSH command to the firmware. All the devices that use iwldvm have a firmware that expects the _v3 version of this command, besides 5150. 5150's latest available firmware still expects a _v2 version of the FLUSH command. This means that since the commit below, we had a mismatch for this specific device only. This mismatch led to the NMI below: Loaded firmware version: 8.24.2.2 Start IWL Error Log Dump: Status: 0x0000004C, count: 5 0x00000004 | NMI_INTERRUPT_WDG 0x000006F4 | uPc 0x000005BA | branchlink1 0x000006F8 | branchlink2 0x000008C2 | interruptlink1 0x00005B02 | interruptlink2 0x00000002 | data1 0x07030000 | data2 0x00000068 | line 0x3E80510C | beacon time 0x728A0EF4 | tsf low 0x0000002A | tsf hi 0x00000000 | time gp1 0x01BDC977 | time gp2 0x00000000 | time gp3 0x00010818 | uCode version 0x00000000 | hw version 0x00484704 | board version 0x00000002 | hcmd 0x2FF23080 | isr0 0x0103E000 | isr1 0x0000001A | isr2 0x1443FCC3 | isr3 0x11800112 | isr4 0x00000068 | isr_pref 0x000000D4 | wait_event 0x00000000 | l2p_control 0x00000007 | l2p_duration 0x00103040 | l2p_mhvalid 0x00000007 | l2p_addr_match 0x00000000 | lmpm_pmg_sel 0x00000000 | timestamp 0x00000200 | flow_handler This was reported here: https://bugzilla.kernel.org/show_bug.cgi?id=88961 Cc: <stable@vger.kernel.org> Fixes: a0855054e59b ("iwlwifi: dvm: drop non VO frames when flushing") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-05Merge tag 'mac80211-next-for-john-2014-11-04' of ↵John W. Linville1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg <johannes@sipsolutions.net> says: "This relatively large batch of changes is comprised of the following: * large mac80211-hwsim changes from Ben, Jukka and a bit myself * OCB/WAVE/11p support from Rostislav on behalf of the Czech Technical University in Prague and Volkswagen Group Research * minstrel VHT work from Karl * more CSA work from Luca * WMM admission control support in mac80211 (myself) * various smaller fixes, spelling corrections, and minor API additions" Conflicts: drivers/net/wireless/ath/wil6210/cfg80211.c Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-10-29iwlwifi: dvm: Fix probable mask then right shift defectJoe Perches1-2/+2
Precedence of & and >> is not the same and is not left to right. shift has higher precedence and should be done after the mask. Add parentheses around the mask. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-10-23iwlwifi: dvm: drop non VO frames when flushingEmmanuel Grumbach1-11/+13
When mac80211 wants to ensure that a frame is sent, it calls the flush() callback. Until now, iwldvm implemented this by waiting that all the frames are sent (ACKed or timeout). In case of weak signal, this can take a significant amount of time, delaying the next connection (in case of roaming). Many users have reported that the flush would take too long leading to the following error messages to be printed: iwlwifi 0000:03:00.0: fail to flush all tx fifo queues Q 2 iwlwifi 0000:03:00.0: Current SW read_ptr 161 write_ptr 201 iwl data: 00000000: 00 00 00 00 00 00 00 00 fe ff 01 00 00 00 00 00 [snip] iwlwifi 0000:03:00.0: FH TRBs(0) = 0x00000000 [snip] iwlwifi 0000:03:00.0: Q 0 is active and mapped to fifo 3 ra_tid 0x0000 [9,9] [snip] Instead of waiting for these packets, simply drop them. This significantly improves the responsiveness of the network. Note that all the queues are flushed, but the VO one. This is not typically used by the applications and it likely contains management frames that are useful for connection or roaming. This bug is tracked here: https://bugzilla.kernel.org/show_bug.cgi?id=56581 But it is duplicated in distributions' trackers. A simple search in Ubuntu's database led to these bugs: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/1270808 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1305406 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1356236 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1360597 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1361809 Cc: <stable@vger.kernel.org> Depends-on: 77be2c54c5bd ("mac80211: add vif to flush call") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-10-09mac80211: allow channel switch with multiple channel contextsLuciano Coelho1-0/+1
Channel switch with multiple channel contexts should now work fine. Remove check that disallows switches when multiple contexts are in use. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-09-15Merge tag 'mac80211-next-for-john-2014-09-12' of ↵John W. Linville1-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg <johannes@sipsolutions.net> says: "This time, I have some rate minstrel improvements, support for a very small feature from CCX that Steinar reverse-engineered, dynamic ACK timeout support, a number of changes for TDLS, early support for radio resource measurement and many fixes. Also, I'm changing a number of places to clear key memory when it's freed and Intel claims copyright for code they developed." Conflicts: net/mac80211/iface.c Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-14Merge remote-tracking branch 'iwlwifi-fixes/master' into NEXTEmmanuel Grumbach2-1/+13
2014-09-11mac80211: replace SMPS hw flags with wiphy feature bitsEliad Peller1-2/+2
Use the new static_smps / dynamic_smps feature bits instead of mac80211-internal hw flags. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-09-08iwlwifi: dvm: disable power save by defaultEmmanuel Grumbach1-1/+1
In https://bugzilla.kernel.org/show_bug.cgi?id=84031, the submitter said that disabling power saving helped, do just that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03iwlwifi: trans: allow skipping scheduler hardware configJohannes Berg1-3/+3
In a later patch, the hardware configuration will be moved to firmware. Prepare for this by allowing hardware configuration in the transport to be skipped by not passing a configuration on enable and passing configure_scd=false on disable. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-08-31Revert "iwlwifi: dvm: don't enable CTS to self"Emmanuel Grumbach1-0/+12
This reverts commit 43d826ca5979927131685cc2092c7ce862cb91cd. This commit caused packet loss. Cc: <stable@vger.kernel.org> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-06Merge remote-tracking branch 'wireless-next/master' into iwlwifi-nextEmmanuel Grumbach1-1/+2
2014-07-06Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-nextEmmanuel Grumbach1-12/+0
2014-07-03iwlwifi: dvm: don't enable CTS to selfEmmanuel Grumbach1-12/+0
We should always prefer to use full RTS protection. Using CTS to self gives a meaningless improvement, but this flow is much harder for the firmware which is likely to have issues with it. CC: <stable@vger.kernel.org> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-06-25Merge branch 'master' of ↵John W. Linville1-0/+9
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
2014-06-25mac80211: support more than one band in scan requestDavid Spinadel1-1/+2
Some drivers (such as iwlmvm) can handle multiple bands in a single HW scan request. Add a HW flag to indicate that the driver support this. To hold the required data, create a separate structure for HW scan request that holds cfg scan request and data about different parts of the scan IEs. As this changes the mac80211 API, update all drivers using it to use the correct new function type/argument. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-06-24iwlwifi: dvm: add a force_cam module parameter to fully disable power savingAndy Lutomirski1-0/+9
iwldvm stalls are often blamed on power management. Add an option to force it all the way off. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-13iwlwifi: remove CMD_SYNCEmmanuel Grumbach12-56/+41
CMD_SYNC is really 0 which is confusing: if (cmd.flags & CMD_SYNC) is always false. Fix this by simply removing its definition. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-11iwlwifi: dvm: don't use _ni mac80211's callbacksEmmanuel Grumbach2-3/+3
This is not needed since the PCIe layer disables the bottom halves before it calls the op_mode. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-11iwlwifi: add missing trailing newlines to debug messagesJohannes Berg6-25/+24
All messages should have a trailing newline, add all the missing ones. Also make all messages constants, replacing the single one that pointlessly used a variable. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-06iwlwifi: make LED support optionalJohannes Berg3-1/+16
If there's no LED on the system, it doesn't make a lot of sense to include close to 4k of LED-related code (mostly in mac80211), so instead of forcing LED support into the kernel, don't build iwlwifi/mac80211 LED support if there's no LED class support. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: EliadX Peller <eliad@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-30Merge branch 'for-john' of ↵John W. Linville1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: net/mac80211/chan.c
2014-04-13iwlwifi: allow to wait for a subset of the queuesEmmanuel Grumbach2-2/+2
This will be used later to flush / wait for queues that are related to a specific vif. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: pcie: implement GRO without NAPIJohannes Berg1-0/+12
Use the new NAPI infrastructure added to mac80211 to get GRO. We don't really implement NAPI since we don't have a real poll function and we never schedule a NAPI poll. Instead of this, we collect all the packets we got from a single interrupt and then call napi_gro_flush(). This allows us to benefit from GRO. In half duplex medium like WiFi, its main advantage is that it reduces the number of TCP Acks, hence improving the TCP Rx performance. Since we call the Rx path with a spinlock held, remove the might_sleep mention from the op_mode's API. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Ido Yariv <ido@wizery.com> [Squash different patches and rewrite the commit message] Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-09mac80211: add vif to flush callEmmanuel Grumbach1-1/+2
This will allow the low level driver to make decision based on the vif such as queues etc... Since the vif might be NULL, we can't add it to the tracing functions. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> [fix staging rtl8821ae driver] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-03-19Merge branch 'for-john' of ↵John W. Linville1-1/+3
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
2014-03-14Merge branch 'for-john' of ↵John W. Linville1-2/+6
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
2014-03-11iwlwifi: dvm: take mutex when sending SYNC BT config commandEmmanuel Grumbach1-2/+6
There is a flow in which we send the host command in SYNC mode, but we don't take priv->mutex. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1046495 Cc: <stable@vger.kernel.org> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-09iwlwifi: return whether to stop from rfkill methodJohannes Berg1-1/+3
When indicating RF-kill toggle to the higher layer, that may in turn call back to the transport (for MVM at least) to turn off the device quickly. Instead of that, allow it to return whether or not the device should be turned off, this gets rid of the call indirection and will help make the API more consistent when we go back to non-threaded interrupts again for PCIe. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-04Merge branch 'master' of ↵John W. Linville3-7/+30
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/ath/ath9k/recv.c drivers/net/wireless/mwifiex/pcie.c
2014-02-27iwlwifi: fix TX status for aggregated packetsJohannes Berg1-5/+9
Only the first packet is currently handled correctly, but then all others are assumed to have failed which is problematic. Fix this, marking them all successful instead (since if they're not then the firmware will have transmitted them as single frames.) This fixes the lost packet reporting. Also do a tiny variable scoping cleanup. Cc: <stable@vger.kernel.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> [Add the dvm part] Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-20iwlwifi: dvm: clear IWL_STA_UCODE_INPROGRESS when assoc failsEmmanuel Grumbach1-0/+1
We set IWL_STA_UCODE_INPROGRESS flag when we add a station and clear it when we send the LQ command for it. But the LQ command is sent only when the association succeeds. If the association doesn't succeed, we would leave this flag set and that wouldn't indicate the station entry as vacant. This probably fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1065663 Cc: <stable@vger.kernel.org> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-13iwlwifi: disable TX AMPDU by default for iwldvmEmmanuel Grumbach1-2/+20
NICs supported by iwldvm don't handle well TX AMPDU. Disable it by default, still leave the possibility to the user to force enable it with a debug parameter. NICs supported by iwlmvm don't suffer from the same issue, leave TX AMPDU enabled by default for these. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-13iwlwifi: make various things constJohannes Berg4-5/+5
There are a number of things in the .data section that should really be in .rodata, for example all ops structs and strings. Mark everything const that can be, leaving the .data section pretty much empty. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-13Merge branch 'for-john' of ↵John W. Linville1-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2014-02-05mac80211: remove module handling from rate control opsJohannes Berg1-1/+0
There's not a single rate control algorithm actually in a separate module where the module refcount would be required. Similarly, there's no specific rate control module. Therefore, all the module handling code in rate control is really just dead code, so remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-02-05mac80211: make rate control ops constJohannes Berg1-1/+2
Change the code to allow making all the rate control ops const, nothing ever needs to change them. Also change all drivers to make use of this and mark the ops const. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-02-04iwlwifi: rs: use const u16 for throughput tablesJohannes Berg2-11/+10
This makes the code a little bit longer as zero-extension has to be done (mov vs. movzwl), but that's miniscule and the space saving is significant, about 600 bytes in DVM and 700 bytes in MVM, so the cache effect should be worth the few bytes more code. While at it, remove two spurious blank lines in variable declaration blocks. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-01-16Merge branch 'for-john' of ↵John W. Linville3-13/+4
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
2014-01-14iwlwifi: add inline helper for packet lengthsJohannes Berg3-13/+4
Add an inline helper function for getting an RX packet's length or payload length and use it throughout the code (most of which I did using an spatch.) While at it, adjust some code, and remove a bogus comment from the dvm calibration code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-01-04wireless: delete non-required instances of include <linux/init.h>Paul Gortmaker8-8/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-31iwlwifi: Update Copyright to 2014Emmanuel Grumbach24-28/+28
Happy new year! Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-17iwlwifi: trans: divide stop_hw into stop_device/op_mode_leaveArik Nemtsov2-8/+2
The stop_hw trans callback is not well defined. It is missing in many cleanup flows and the division of labor between stop_device/stop_hw is cumbersome. Remove stop_hw and use stop_device to perform both. Implement this for all current transports. PCIE needs some extra configuration the op-mode is leaving to configure RF kill. Expose this explicitly as a new op_mode_leave trans callback. Take the call to stop_device outside iwl_run_mvm_init_ucode, this makes more sense and WARN when we want to run the INIT firmware while it has run already. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-10iwlwifi: fix check for a single rx antennaEyal Shapira1-7/+0
valid_rx_ant is a bitmask of available antennas and not the number of Rx antennas. Use num_of_ant and remove duplicate definitions in both dvm and mvm. Signed-off-by: Eyal Shapira <eyal@wizery.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-10iwlwifi: remove TX_CMD id from transport layerEmmanuel Grumbach1-0/+1
The transport layer doesn't need to know the TX_CMD id. It can be set by the op_mode. The transport layer still needs to know the layout of the Tx command because of alignment issues and because of the scratch pointer. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>