summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
AgeCommit message (Collapse)Author
2014-05-13iwlwifi: mvm: prevent sched scan while not idleDavid Spinadel
Prevent sched scan while not idle (including during association or in AP mode) instead of while associated only. This fixes my previous commit which was incomplete: commit bd5e4744a6ca64299b57a2682c720d00a475a734 Author: David Spinadel <david.spinadel@intel.com> Date: Thu Apr 24 13:15:29 2014 +0300 iwlwifi: mvm: do no sched scan while associated Currently the FW doesn't support sched scan while associated, Prevent it. Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-13iwlwifi: mvm: fix off-by-one in scan channels configurationEliad Peller
tail should be equal to the last valid index, so decrease it by one. This error causes in "a gap" in some cases (as well as some possible out-of-bound write), finally resulting in ucode assertion. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-11iwlwifi: mvm: fix setting channel in monitor modeEmmanuel Grumbach
There was a deadlock in monitor mode when we were setting the channel if the channel was not 1. ====================================================== [ INFO: possible circular locking dependency detected ] 3.14.3 #4 Not tainted ------------------------------------------------------- iw/3323 is trying to acquire lock: (&local->chanctx_mtx){+.+.+.}, at: [<ffffffffa062e2f2>] ieee80211_vif_release_channel+0x42/0xb0 [mac80211] but task is already holding lock: (&local->iflist_mtx){+.+...}, at: [<ffffffffa0609e0a>] ieee80211_set_monitor_channel+0x5a/0x1b0 [mac80211] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&local->iflist_mtx){+.+...}: [<ffffffff810d95bb>] __lock_acquire+0xb3b/0x13b0 [<ffffffff810d9ee0>] lock_acquire+0xb0/0x1f0 [<ffffffff817eb9c8>] mutex_lock_nested+0x78/0x4f0 [<ffffffffa06225cf>] ieee80211_iterate_active_interfaces+0x2f/0x60 [mac80211] [<ffffffffa0518189>] iwl_mvm_recalc_multicast+0x49/0xa0 [iwlmvm] [<ffffffffa051822e>] iwl_mvm_configure_filter+0x4e/0x70 [iwlmvm] [<ffffffffa05e6d43>] ieee80211_configure_filter+0x153/0x5f0 [mac80211] [<ffffffffa05e71f5>] ieee80211_reconfig_filter+0x15/0x20 [mac80211] [snip] -> #1 (&mvm->mutex){+.+.+.}: [<ffffffff810d95bb>] __lock_acquire+0xb3b/0x13b0 [<ffffffff810d9ee0>] lock_acquire+0xb0/0x1f0 [<ffffffff817eb9c8>] mutex_lock_nested+0x78/0x4f0 [<ffffffffa0517246>] iwl_mvm_add_chanctx+0x56/0xe0 [iwlmvm] [<ffffffffa062ca1e>] ieee80211_new_chanctx+0x13e/0x410 [mac80211] [<ffffffffa062d953>] ieee80211_vif_use_channel+0x1c3/0x5a0 [mac80211] [<ffffffffa06035ab>] ieee80211_add_virtual_monitor+0x1ab/0x6b0 [mac80211] [<ffffffffa06052ea>] ieee80211_do_open+0xe6a/0x15a0 [mac80211] [<ffffffffa0605a79>] ieee80211_open+0x59/0x60 [mac80211] [snip] -> #0 (&local->chanctx_mtx){+.+.+.}: [<ffffffff810d6cb7>] check_prevs_add+0x977/0x980 [<ffffffff810d95bb>] __lock_acquire+0xb3b/0x13b0 [<ffffffff810d9ee0>] lock_acquire+0xb0/0x1f0 [<ffffffff817eb9c8>] mutex_lock_nested+0x78/0x4f0 [<ffffffffa062e2f2>] ieee80211_vif_release_channel+0x42/0xb0 [mac80211] [<ffffffffa0609ec3>] ieee80211_set_monitor_channel+0x113/0x1b0 [mac80211] [<ffffffffa058fb37>] cfg80211_set_monitor_channel+0x77/0x2b0 [cfg80211] [<ffffffffa056e0b2>] __nl80211_set_channel+0x122/0x140 [cfg80211] [<ffffffffa0581374>] nl80211_set_wiphy+0x284/0xaf0 [cfg80211] [snip] other info that might help us debug this: Chain exists of: &local->chanctx_mtx --> &mvm->mutex --> &local->iflist_mtx Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&local->iflist_mtx); lock(&mvm->mutex); lock(&local->iflist_mtx); lock(&local->chanctx_mtx); *** DEADLOCK *** This deadlock actually occurs: INFO: task iw:3323 blocked for more than 120 seconds. Not tainted 3.14.3 #4 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. iw D ffff8800c8afcd80 4192 3323 3322 0x00000000 ffff880078fdb7e0 0000000000000046 ffff8800c8afcd80 ffff880078fdbfd8 00000000001d5540 00000000001d5540 ffff8801141b0000 ffff8800c8afcd80 ffff880078ff9e38 ffff880078ff9e38 ffff880078ff9e40 0000000000000246 Call Trace: [<ffffffff817ea841>] schedule_preempt_disabled+0x31/0x80 [<ffffffff817ebaed>] mutex_lock_nested+0x19d/0x4f0 [<ffffffffa06225cf>] ? ieee80211_iterate_active_interfaces+0x2f/0x60 [mac80211] [<ffffffffa06225cf>] ? ieee80211_iterate_active_interfaces+0x2f/0x60 [mac80211] [<ffffffffa052a680>] ? iwl_mvm_power_mac_update_mode+0xc0/0xc0 [iwlmvm] [<ffffffffa06225cf>] ieee80211_iterate_active_interfaces+0x2f/0x60 [mac80211] [<ffffffffa0529357>] _iwl_mvm_power_update_binding+0x27/0x80 [iwlmvm] [<ffffffffa0516eb1>] iwl_mvm_unassign_vif_chanctx+0x81/0xc0 [iwlmvm] [<ffffffffa062d3ff>] __ieee80211_vif_release_channel+0xdf/0x470 [mac80211] [<ffffffffa062e2fa>] ieee80211_vif_release_channel+0x4a/0xb0 [mac80211] [<ffffffffa0609ec3>] ieee80211_set_monitor_channel+0x113/0x1b0 [mac80211] [<ffffffffa058fb37>] cfg80211_set_monitor_channel+0x77/0x2b0 [cfg80211] [<ffffffffa056e0b2>] __nl80211_set_channel+0x122/0x140 [cfg80211] [<ffffffffa0581374>] nl80211_set_wiphy+0x284/0xaf0 [cfg80211] This fixes https://bugzilla.kernel.org/show_bug.cgi?id=75541 Cc: <stable@vger.kernel.org> [3.13+] Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-07iwlwifi: pcie: disable interrupts upon PCIe allocEmmanuel Grumbach
In case RFKILL is in KILL position, the NIC will issue an interrupt straight away. This interrupt won't be sent because it is masked in the hardware. But if our interrupt service routine is called for another reason (SHARED_IRQ), then we'll look at the interrupt cause and service it. This can cause bad things if we are not ready yet. Explicitly clean the interrupt cause register to make sure we won't service anything before we are ready to. Cc: <stable@vger.kernel.org> [3.14] Reported-and-tested-by: Alexander Monakov <amonakov@gmail.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-06iwlwifi: mvm: do no sched scan while associatedDavid Spinadel
Currently the FW doesn't support sched scan while associated, Prevent it. Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-06iwlwifi: mvm: rs - s/CPTCFG/CONFIGEmmanuel Grumbach
My bad - I forgot to update this when sending the patch upstream. Fixes: 87d5e4155c00 ("iwlwifi: mvm: rs: reinit rs if no tx for a long time") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-06iwlwifi: mvm: BT Coex - fix validity flags during initEmmanuel Grumbach
The commit below introduced a bug in the validity bits in init. Due to that, all the Coex mechanism stopped sending kills to the BT side. Fix that. Fixes: b9fae2d54c9f ("iwlwifi: mvm: BT Coex add support for Co-running block") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: several fixes in scanAlexander Bondar
The firmware doesn't handle properly the fragmented scan. Stop using it. While at it change max_out_time and suspend_time units from usec to TUs as expected by firmware API. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: BT Coex - fix Look Up TableEmmanuel Grumbach
A few entries were wrong and this caused throughput issues. Cc: <stable@vger.kernel.org> [3.13+] Fixes: dac94da8dba3 ("iwlwifi: mvm: new BT Coex API") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: rs: clear per rate stats when aggregation changesEyal Shapira
The per rate stats should be cleared when aggregation state changes to avoid making rate scale decisions based on throughput figures which were collected prior to the aggregation state change and are now stale. While at it make sure any clearing of the per rate stats will get logged. Cc: <stable@vger.kernel.org> [3.14] Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: avoid searching unnecessary columnsEyal Shapira
Don't search columns which are unlikely to succeed as previous columns searched with less aggressive modulation failed. Cc: <stable@vger.kernel.org> [3.14] Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: rs: fallback to legacy Tx columnsEyal Shapira
Allow switching back to legacy Tx columns so we'll stop doing HT/VHT in case we're far from the AP. Stop active aggregation when making a deciding to stay in a legacy column. Despite having low legacy rates in the LQ table lower entries it doesn't help much in case we're doing aggregations as the aggregation was being transmitted in the initial rate of the table. This should help traffic stalls when far from the AP. Cc: <stable@vger.kernel.org> [3.14] Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: rs: reinit rs if no tx for a long timeEyal Shapira
After being idle for a long time (>5sec) the rs statistics will be stale so we prefer to reset rs and start from legacy rates again. This gives better results when the attenuation increased signficantly (e.g. we got further from the AP) and after a while we start Tx Note that the first Tx after the idle period will still go out in the old modulation and rate but this seemed a simpler approach compared to adding a timer or modifying mac80211 for this. The negative impact is negligble as we'll recover quickly. Cc: <stable@vger.kernel.org> [3.14] Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: rs: fix and cleanup rs_get_rate_actionEyal Shapira
Change the down/upscale decision logic a bit to be based on different success ratio thresholds. This fixes the implementation compared to the rate scale algorithm which was planned to yield optimal results. Also fix a case where a lower rate wasn't explored despite being a potential for better throughput. While at it rewrite rs_get_rate_action to be more clear and clean. Cc: <stable@vger.kernel.org> [3.14] Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: rs: use correct max expected throughput figuresEyal Shapira
The selection of the max expected throughput for a column didn't take into account the maximal allowed rate for the current peer. This can cause unnecessary switches during the search cycle to columns which have no chance of beating the current throughput. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: add MODULE_FIRMWARE for 7265Emmanuel Grumbach
It was missing. Cc: <stable@vger.kernel.org> [3.13+] Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: 7000: bump API to 9Emmanuel Grumbach
This will allow to load the new firmware. Cc: <stable@vger.kernel.org> [3.14] Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: add new 7265 HW IDsOren Givon
Add 2 new HW IDs for the 7265 series. Cc: <stable@vger.kernel.org> [3.13+] Signed-off-by: Oren Givon <oren.givon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: BT Coex - send the new LUT upon antenna coupling changeEmmanuel Grumbach
I forgot to send the new Look Up Table to the firmware and I also forgot to free the command which is kzalloc'ed. This code is relevant for 7265 device only. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: rs: fix mimo delimiter in LQ cmdEyal Shapira
mimo_delim was always set to 0 instead of pointing to the first SISO entry after MIMO rates. This can cause keep transmitting in MIMO even when we shouldn't. For example when the peer is requesting static SMPS. Cc: <stable@vger.kernel.org> [3.14] Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: delay enabling smart FIFO until after beacon RXJohannes Berg
If we have no beacon data before association, delay smart FIFO enablement until after we have this data. Not doing so can cause association failures in extremely silent environments (usually only a shielded box/room) as beacon RX is not sent to the host immediately, and then the association time event ends without the host receiving any beacon even though it was on the air - it's just stuck on the FIFO. Cc: <stable@vger.kernel.org> [3.14] Fixes: 1f3b0ff8ecce ("iwlwifi: mvm: Add Smart FIFO support") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-19Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
2014-03-19iwlwifi: mvm: add missing includeEmmanuel Grumbach
This fixes the build for powerpc: After merging the final tree, today's linux-next build (powerpc allyesconfig) failed like this: drivers/net/wireless/iwlwifi/mvm/debugfs.c: In function 'iwl_dbgfs_fw_error_dump_release': drivers/net/wireless/iwlwifi/mvm/debugfs.c:161:2: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration] vfree(file->private_data); ^ Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-18Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
2014-03-18iwlwifi: mvm: disable uAPSD due to bugs in the firmwareEmmanuel Grumbach
The current firmware advertises support for uAPSD, but critical bugs force us to disable the feature. When a fixed firmware will be available, we will be able to re-enable uAPSD. Cc: <stable@vger.kernel.org> [3.13+] Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-18iwlwifi: mvm: ignore unchanged low-latency flagJohannes Berg
If the low-latency update is called but there's no change then ignore the update instead of triggering all the required work. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-18iwlwifi: mvm: remove spurious blank lineJohannes Berg
Remove a spurious blank line in the quota code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-18iwlwifi: mvm: fix theoretical NULL ptr dereferenceEmmanuel Grumbach
mvmsta could have been NULL / ERR. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-18iwlwifi: mvm: configure low latency dependent scan parametersAlexander Bondar
In case of system low latency configure passive scan to be fragmented. Set the following scan parameters for both immediate and scheduled scan: - passive scan fragment duration = 20ms - out-of-channel time = 70ms - suspend time = 105ms Restructure channel's active/passive dwell time configuration to better suit the above change. The idea is that under low latency traffic passive scan is fragmented, i.e. that dwell on a particular channel will be fragmented. Each fragment dwell time is 20ms and fragments period is 105ms. Skipping to next channel will be delayed by the same period (105ms). So suspend_time parameter describing both fragments and channels skipping periods is set to 105ms. This value is chosen so that overall passive scan duration will not be too long. Max_out_time in this case is set to 70ms, so for active scanning operating channel will be left for 70ms while for passive still for 20ms (fragment dwell). Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-18iwlwifi: mvm: restructure scan parameters calculationAlexander Bondar
Some scan parameters should be dependent on traffic conditions. Centralize conditions verification in one function and obtain scan max out-of-channel and suspend time in that new function. Rely on bound interfaces indication instead of association state to calculate scan parameters. If no bound interfaces use default values for out-of-channel and suspend time parameters. Additionally, get rid of NL80211_SCAN_FLAG_LOW_PRIORITY checks since no use case for this exists so far. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> [reword commit log a bit] Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-18iwlwifi: mvm: remove using max_duration in firmware APIJohannes Berg
The firmware decided to not implement this API in this way, so for now remove setting the field completely. This will allow the firmware to change how to use this field later. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-18iwlwifi: mvm: BT Coex - add debugfs hook to set BT Tx priorityEmmanuel Grumbach
In order to debug the firmware, we need to be able to set the BT priority of WiFi packets. This priority is set based on the type of the packet (control frames, EAPOL etc...). For debugging purposes, allow to override this priority by a debugfs controlled value. Enable this feature that needs this priority to be able to test it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-18iwlwifi: mvm: send udev event upon firmware error to dump logsEmmanuel Grumbach
When the firmware asserts, the driver will dump the firmware state to an internal buffer. This buffer is kept aside until it is dumped through debugfs. Once an external application fetched the data, the buffer is freed and a new buffer can be allocated in case another assert occurs. A udev event is sent to trigger an external application. A simple rule like: DRIVER=="iwlwifi", ACTION=="change", RUN+="/sbin/dump_sram.sh" can fetch the data from debugfs. Here is my dump_sram.sh: phyname=$(basename ${DEVPATH}) date=$(date +%F_%H_%M) filename=/var/log/iwl-sram-${phyname}-${date}.bin cat /sys/kernel/debug/ieee80211/${phyname}/iwlwifi/iwlmvm/fw_error_dump > ${filename} The current SRAM size is 80KB so, currently: $ ls -lh iwl-sram-phy0-2014-03-16_13_14.bin -rw-r--r-- 1 emmanuel emmanuel 81K Mar 16 13:15 iwl-sram-phy0-2014-03-16_13_14.bin and after compression: $ ls -lh iwl-sram-phy0-2014-03-16_13_14.bin.xz -rw-r--r-- 1 emmanuel emmanuel 13K Mar 16 13:15 iwl-sram-phy0-2014-03-16_13_14.bin.xz Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-16iwlwifi: mvm: configure protocol offloading on D0i3Eliad Peller
Enable protocol offloading (arp and NS) on D0i3. The offloading allows the fw answer NS and arp requests without waking up the host. Since protocol offloading is saved between D0i3 entries, we have to explicitly disable it in case we don't want it. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-16iwlwifi: mvm: reconfigure qos seq on D0i3 exitArik Nemtsov
In order to restore the qos seq number on d0i3 exit, we need to read it from the wowlan status. However, in order to make sure we use correct seq num for tx frames, we need to defer any outgoing frames, and re-enqueue them only after the seq num is configured correctly. Sync new Tx aggregations with D0i3 so that the correct seq num is used for them. Wait synchronously for D0i3 exit before starting a new Tx agg. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-16iwlwifi: mvm: configure seq_num to D0i3Eliad Peller
Configure the QoS counters when entering D0i3. The fw might use them later when performing protocol offloading (we'll update the the counters back on d0i3 exit in a following patch). Non-QoS counter is handled internally in the fw, so no need to configure it. Also, add support for a new version of WOWLAN_CONFIG_CMD Signed-off-by: Eliad Peller <eliad@wizery.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-16iwlwifi: mvm: Change beacon filter enablement conditionAlexander Bondar
Enable beacon filter only if at least one beacon from candidate AP is received before or after association. Check this condition before enabling BF upon secured association completion. Add BF enablement to mac80211 event that indicates beacon is received after association. Too early beacon filtering enablement can lead to disconnection due to missing AP's beacon after association. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-16iwlwifi: mvm: don't fail completely if led mode is not supportedEmmanuel Grumbach
Blink led mode is not supported by iwlmvm. This doesn't mean that we should prevent any operation if it is selected by the user. Instead of failing without any notice to the user, fallback to the default mode (RF mode) if the blink mode is selected and print an error to inform the user. Reported-by: Steven Haigh <netwiz@crc.id.au> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-16iwlwifi: add rs_rate_scale_clear_tbl_windows helper functionEliad Peller
instead of duplicating the same loop multiple times, use a new function for it. this will be later used also for clearing other windows in the table. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-16iwlwifi: rs: split rs_collect_tx_dataEliad Peller
Make _rs_collect_tx_data get window as param, in order to be able to set various windows. This will be used later for saving tpc statistics as well. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-16iwlwifi: mvm: don't enable protection for all AMPDUsEyal Shapira
Currently RTS protection was done whenever trasnmitting an AMPDU. This limits throughput in cases where there's no need for protection. Disable this too inclusive protection for now. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-16iwlwifi: mvm: rs: fix search cycle rulesEyal Shapira
We should explore all possible columns when searching to be as resilient as possible to changing conditions. This fixes for example a scenario where even after a sudden creation of rssi difference between the 2 antennas we would keep doing MIMO at a low rate instead of switching to SISO at a higher rate using the better antenna which was the optimal configuration. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-16iwlwifi: mvm: fix merge damageEmmanuel Grumbach
Scheduled scan was disabled because it was broken. Now it is fixed and got disabled by mistake by a merge. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-14Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
2014-03-11iwlwifi: mvm: BT Coex - enable per-AC BT priorityEmmanuel Grumbach
We can now define the priority against BT per AC. This is possible with a newer firmware that allows to define the priority with 2 bits. Note that this change is compatible with older firmware since older firmware will simply ignore the new bit (11), and we still set the old bit (12) in the same cases as before. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-11iwlwifi: mvm: BT Coex - classify packet priority in BT codeEmmanuel Grumbach
This code is really related to BT Coex - move it to the coex file. Also - prepare for a FW API change that will happen soon: Bits 11 and 12 will be allocated for BT priority. Today, we only have bit 12. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-11iwlwifi: mvm: make bt-coex.c genericEmmanuel Grumbach
Make bt-coex generic to allow other coex mechanisms. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-11iwlwifi: mvm: BT Coex add support for Co-running blockEmmanuel Grumbach
7265 features a new calibration which is called antenna coupling. The purpose of this calibration (which isn't really a calibration), is to measure the isolation between the antennas and that can give us useful information for the Coex modules. With this information, we can tune the LookUpTables (LUTs) that define the BT / WiFi contention policy. The LUTs currently contain dummy values - but they will be updated soon. While at it, change the current code to stop duplicate the host command while sending. This was needed back then, when the command was short enough to be allocated on the stack. Since then, the command grew a lot and is now allocated on the heap - hence we can use the NOCOPY option instead. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-11iwlwifi: dvm: take mutex when sending SYNC BT config commandEmmanuel Grumbach
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: mvm: abort scan on sched_scan requestArik Nemtsov
A scheduled scan is a more persistent setting and should take priority over temporary regular scans. Abort the regular when a sched_scan request arrives and then request the sched_scan. The kernel API allows sending a sched_scan without canceling a regular scan in progress, so this is our way to abstract the FW's limitations. Make the scan-cancel Rx handler async and flush after invocation to ensure new scans can't creep in before it. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>