summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/mvm/coex.c
AgeCommit message (Collapse)AuthorFilesLines
2015-11-18iwlwifi: move under intel vendor directoryKalle Valo1-1005/+0
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-08-04iwlwifi: mvm: remove command/return value from RX handlersJohannes Berg1-22/+22
In the mvm driver, neither the old command nor the return value are used, so remove them. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: prepare for higher API/CAPA bitsJohannes Berg1-10/+12
Currently, loading the firmware fails when it has higher API or CAPA bits than the driver supports. That's an issue with integration. At the same time, actually using api[0] and capa[0] will become confusing when we also have api[1] and capa[1], and it's almost certain that we'll mix up the bits and use the bits for api[1] with api[0] by accident. Avoid all this by translating the API/CAPA bits to the regular kernel test_bit() format, and also providing wrapper functions. Also use the __bitwise__ facility of sparse to check that we're testing the right one. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: BT Coex - fix shared antenna check with new APIEmmanuel Grumbach1-1/+1
The commit below fixed this for the old firmware API only. Since the new firmware API hasn't been released yet, this doesn't fix anything on currently existing firmwares. This completes: commit afcee962b09842d0f4191beb4a2d08251b4c7705 Author: Eyal Shapira <eyal@wizery.com> Date: Mon Feb 9 15:18:17 2015 +0200 iwlwifi: mvm: fix BT coex shared antenna activity check type=bugfix bug=not-tracked fixes=unknown Reviewed-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: BT Coex - allocate a short command on the stackEmmanuel Grumbach1-25/+11
The BT_CONFIG command used to be very long, hence it was allocated on the heap in the previous API. In the new API, this command is much smaller, and can now safely be allocated on the stack. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: BT Coex - remove useless codeEmmanuel Grumbach1-43/+0
Since we don't need to configure the Ack / CTS kill mask anymore in the new API, we don't need to iterate all the interfaces upon rssi event on one of the interfaces. Remove that code. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-01Merge tag 'wireless-drivers-next-for-davem-2015-04-01' of ↵David S. Miller1-220/+0
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== Major changes: ath9k: * add Active Interference Cancellation, a method implemented in the HW to counter WLAN RX > sensitivity degradation when BT is transmitting at the same time. This feature is supported by cards like WB222 based on AR9462. iwlwifi: * Location Aware Regulatory was added by Arik * 8000 device family work * update to the BT Coex firmware API brmcfmac: * add new BCM43455 and BCM43457 SDIO device support * add new BCM43430 SDIO device support wil6210: * take care of AP bridging * fix NAPI behavior * found approach to achieve 4*n+2 alignment of Rx frames rt2x00: * add new rt2800usb device DWA 130 rtlwifi: * add USB ID for D-Link DWA-131 * add USB ID ASUS N10 WiFi dongle mwifiex: * throughput enhancements ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31Merge tag 'mac80211-next-for-davem-2015-03-30' of ↵David S. Miller1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Lots of updates for net-next; along with the usual flurry of small fixes, cleanups and internal features we have: * VHT support for TDLS and IBSS (conditional on drivers though) * first TX performance improvements (the biggest will come later) * many suspend/resume (race) fixes * name_assign_type support from Tom Gundersen ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-30mac80211: convert rssi_callback() to event_callback()Emmanuel Grumbach1-1/+1
We will be able to add more events, such as MLME events and others. The low level driver may be interested in knowing about these events to dump firmware data upon failures, or to change parameters in case connection attempts fail etc... Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+2
Conflicts: drivers/net/ethernet/emulex/benet/be_main.c net/core/sysctl_net_core.c net/ipv4/inet_diag.c The be_main.c conflict resolution was really tricky. The conflict hunks generated by GIT were very unhelpful, to say the least. It split functions in half and moved them around, when the real actual conflict only existed solely inside of one function, that being be_map_pci_bars(). So instead, to resolve this, I checked out be_main.c from the top of net-next, then I applied the be_main.c changes from 'net' since the last time I merged. And this worked beautifully. The inet_diag.c and sysctl_net_core.c conflicts were simple overlapping changes, and were easily to resolve. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-12Merge branch 'iwlwifi-fixes' into iwlwifi-nextEmmanuel Grumbach1-1/+2
2015-03-12iwlwifi: mvm: BT Coex - update the new APIEmmanuel Grumbach1-220/+0
The firmware was not using the new API, so we don't need to differentiate between the different stages of this new API. The main difference here is that most of the hard coded values are not sent through the command anymore. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-05iwlwifi: mvm: BT Coex - fix a NULL pointer exceptionEmmanuel Grumbach1-1/+2
The commit below introduced an unsafe dereference of mvmvif->phy_ctxt. It can be NULL even if we hold the mutex. We can be handling a BT Coex notification while the vif has already been unassigned. This can happen since the BT Coex notification is hanled asynchronuously: we can have started to handle the BT Coex notification trying to acquire the mutex while the unassign flow already got it. The BT Coex notification handling will wait for the mutext. I'll get it later, but then mvmvif->phy_ctxt will be NULL. Panic log: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<f985180d>] iwl_mvm_bt_notif_iterator+0x9d/0x340 [iwlmvm] *pdpt = 0000000000000000 *pde = f000eef300000007 Oops: 0000 [#1] SMP Workqueue: events iwl_mvm_async_handlers_wk [iwlmvm] task: ed719b20 ti: ec03e000 task.ti: ec03e000 EIP: 0060:[<f985180d>] EFLAGS: 00010202 CPU: 2 EIP is at iwl_mvm_bt_notif_iterator+0x9d/0x340 [iwlmvm] EAX: 00000000 EBX: f6d3cb70 ECX: f6d3cb70 EDX: 00000000 ESI: ec03fe40 EDI: efeb8810 EBP: ec03fdf0 ESP: ec03fdac DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 CR0: 80050033 CR2: 00000000 CR3: 01a1a000 CR4: 001407f0 Stack: f743ca80 f744a404 ec03fdcc c10e3952 00003aba f743ca80 00000246 f743ca80 00000246 00000000 00000001 00000000 ebd45ff6 ebd458a4 f6d3c500 ebd45578 ebd44b01 ec03fe18 f99e1bc2 00000002 ebd44bc0 f9851770 00000000 f6d3c500 Call Trace: [<c10e3952>] ? ring_buffer_unlock_commit+0xa2/0xd0 [<f99e1bc2>] __iterate_interfaces+0x82/0x110 [mac80211] [<f9851770>] ? iwl_mvm_bt_coex_reduced_txp+0x140/0x140 [iwlmvm] [<f99e1c6a>] ieee80211_iterate_active_interfaces_atomic+0x1a/0x20 [mac80211] [<f9851427>] iwl_mvm_bt_coex_notif_handle+0x77/0x280 [iwlmvm] [<f9852161>] iwl_mvm_rx_bt_coex_notif_old+0x211/0x220 [iwlmvm] [<f9850b8b>] iwl_mvm_rx_bt_coex_notif+0x19b/0x1b0 [iwlmvm] [<f983944f>] iwl_mvm_async_handlers_wk+0x7f/0xe0 [iwlmvm] CC: <stable@vger.kernel.org> [3.19+] Fixes: 123f515635b1 ("iwlwifi: mvm: BT Coex - add support for TTC / RRC") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-02iwlwifi: add new TLV capability flag for BT PLCREmmanuel Grumbach1-2/+2
Packet Level Co-Running is a BT Coex feature which is supported on certain devices only, hence the need for a TLV flag for it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-01-22iwlwifi: mvm: BT Coex - set all the co-running values to 0Emmanuel Grumbach1-8/+8
With this value, we de-facto disable the feature. Since it is not working yet, disable it completely. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-28iwlwifi: mvm: use iwl_mvm_vif_from_mac80211() consistentlyJohannes Berg1-2/+2
There are a few places not using it, use it at those places. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-11iwlwifi: mvm: rs - don't use the shared antenna when BT load is highEmmanuel Grumbach1-0/+16
When we need only one antenna, we should refrain from using the antenna that is shared with BT if BT load is high. Fix this. Reviewed-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-10-29iwlwifi: mvm: BT Coex - make the multiprio lut a constantEmmanuel Grumbach1-7/+2
This makes it easier to tune the values during the testing. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-10-29iwlwifi: mvm: BT Coex - move BT_ANTENNA_COUPLING_THRESHOLD to constantsEmmanuel Grumbach1-3/+1
This is were it really needs to be. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-10-23iwlwifi: mvm: BT Coex - update the MPLUT Boost register valueEmmanuel Grumbach1-2/+2
Cc: <stable@vger.kernel.org> [3.16+] Fixes: 2adc8949efab ("iwlwifi: mvm: BT Coex - fix boost register / LUT values") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14iwlwifi: define the non shared antenna per hardwareEmmanuel Grumbach1-0/+4
The sharing model will differ in new hardware. Define the non shared antenna based on the device so that different devices can have different names for the non shared antenna. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14Merge remote-tracking branch 'iwlwifi-fixes/master' into NEXTEmmanuel Grumbach1-6/+3
2014-09-08iwlwifi: mvm: BT Coex - always initialize smps_modeJohannes Berg1-4/+3
smps_mode is used uninitialized in a debug statement in AP mode, so always initialize it. While at it, fix a typo. Signed-off-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-09-08iwlwifi: mvm: BT Coex - remove shadowing variableJohannes Berg1-2/+0
The variable 'u32 mode' exists twice, the latter shadowing the former - remove the latter since there's no need for two variables. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03iwlwifi: add Intel Mobile Communications copyrightJohannes Berg1-0/+2
Our legal structure changed at some point (see wikipedia), but we forgot to immediately switch over to the new copyright notice. For files that we have modified in the time since the change, add the proper copyright notice now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-22iwlwifi: mvm: BT Coex - don't change AP SMPS modeEmmanuel Grumbach1-13/+8
Leave it to default instead - regardless of the BT activity. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-22iwlwifi: mvm: BT Coex - fix the ACK / CTS kill maskEmmanuel Grumbach1-95/+75
According to new requirements, the ACK / CTS kill mask is not related to reduced TX power anymore. This allows to remove the code that tracked reduced TX power enablement across different interfaces. The ACK / CTS kill mask is now fetch from a table. It depends on the Activity grading (activity from BT) and on the Look Up Table (LUT) type. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-08iwlwifi: mvm: BT Coex - fix TLC with old APIEmmanuel Grumbach1-1/+1
A copy paste issue broke the rate control when a firmware with the old API is used. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: mvm: BT Coex - relax constraints when TTC / RRC is activeEmmanuel Grumbach1-9/+12
When TxTxCo-Running is active, we can relax the constraints on the rate control. When RxRxCo-Running is active, we can relax the constrains on SMPS. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: mvm: BT Coex - add High Band retentionEmmanuel Grumbach1-0/+2
Tell the firmware if TTC should be enabled when switching to High Band. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: mvm: BT Coex - convert reduced Tx power to new APIEmmanuel Grumbach1-22/+7
No need to send the big BT_COEX_CMD command, we have now a much thiner command that updates only what is needed. Adapt the code to that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: mvm: BT Coex - convert the co-running update to new APIEmmanuel Grumbach1-29/+7
No need to send the big BT_COEX_CMD command, we have now a much thiner command that updates only what is needed. Adapt the code to that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: mvm: BT Coex - convert the sw boost update to new APIEmmanuel Grumbach1-42/+16
No need to send the big BT_COEX_CMD command, we have now a much thiner command that updates only what is needed. Adapt the code to that, and open the patch to the updates. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: mvm: BT Coex - new APIEmmanuel Grumbach1-129/+52
Start the new BT Coex implementation. Don't react to notifications for now - only the initial configuration is implemented. The rest will happen in next patches. Since coex.c now uses the new the new structures in all functions, we need to adapt the code to compile, even if it doesn't run yet. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: mvm: BT Coex - prepare towards new APIEmmanuel Grumbach1-15/+69
A new API is coming. This new API is not backward compatible. So we need to keep the old commands to be able to work with the former API. Move all the current code into a new file: coex_legacy. If a firmware with the new API is detected, we currently just bail out since the implementation of the new API will come in future patches. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-06-24iwlwifi: mvm: BT Coex - avoid the shared antenna for management framesEmmanuel Grumbach1-0/+5
If BT is active, we need to refrain from using the shared antenna. This logic is done in the firmware when we use the link quality tables. But for management frames, the rate is written in the Tx command by the driver. Hence the driver needs to make sure not use the shared antenna when BT is active for any frames that don't use the rate scale table such as management frames or multicast. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-06-24iwlwifi: mvm: BT Coex - add reduced Tx power thresholds to constantsEmmanuel Grumbach1-6/+4
This really belongs to the constants file. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-06-24iwlwifi: mvm: BT Coex - don't limit rate control if TTC is onEmmanuel Grumbach1-0/+6
When the firmware enables TxTxCorunning, we can lift the constaints on the rate control. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-06-24iwlwifi: mvm: BT Coex - allow MIMO in more casesEmmanuel Grumbach1-7/+10
We can Tx in MIMO rates when we are in TxTx Disallow mode just like we can when we are in Tight mode. Same if we are in 5Ghz regardless of the mode we are. Change the code to allow MIMO in these cases. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-06-24iwlwifi: mvm: BT Coex - allow to force the antenna allocationEmmanuel Grumbach1-0/+39
This can be used for testing. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-22iwlwifi: mvm: remove debugfs hook for reduced tx powerEmmanuel Grumbach1-3/+3
This was not used is unlikely to be used, just kill it. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-22iwlwifi: mvm: disable reduced Tx power when not applicableEmmanuel Grumbach1-1/+5
I forgot to disable the reduced Tx power in a few paths. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-15iwlwifi: mvm: BT Coex - send channel inhibition before associationEmmanuel Grumbach1-30/+17
The firmware needs to know on what channel we run before we set the association bit in the MAC context. Change a bit the flow to achieve this. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-13iwlwifi: mvm: BT Coex - fix boost register / LUT valuesEmmanuel Grumbach1-6/+6
These values are used to give preference to WiFi according to a certain pattern. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-13iwlwifi: remove CMD_SYNCEmmanuel Grumbach1-5/+2
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: add missing trailing newlines to debug messagesJohannes Berg1-1/+1
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-06Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-nextEmmanuel Grumbach1-10/+14
2014-05-06iwlwifi: mvm: BT Coex - fix validity flags during initEmmanuel Grumbach1-3/+3
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: BT Coex - send priority tables from iwl_send_bt_init_confEmmanuel Grumbach1-1/+5
Calling iwl_send_bt_init_conf for INIT firmware is not a problem, and calling iwl_send_bt_prio_tbl from iwl_send_bt_init_conf allows us to prepare for new API. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: BT Coex - minor API changeEmmanuel Grumbach1-0/+2
The BT Coex API underwent a minor backward compatible API change. We now need to set an invalid value in the override fields. While at it, add kerneldoc comments on the fields in the command. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>