summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/coex.c
Commit message (Collapse)AuthorAgeFilesLines
* iwlwifi: move under intel vendor directoryKalle Valo2015-11-181-1005/+0
| | | | | | Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* iwlwifi: mvm: remove command/return value from RX handlersJohannes Berg2015-08-041-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>
* iwlwifi: prepare for higher API/CAPA bitsJohannes Berg2015-06-031-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>
* iwlwifi: mvm: BT Coex - fix shared antenna check with new APIEmmanuel Grumbach2015-05-281-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>
* iwlwifi: mvm: BT Coex - allocate a short command on the stackEmmanuel Grumbach2015-05-281-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>
* iwlwifi: mvm: BT Coex - remove useless codeEmmanuel Grumbach2015-05-281-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>
* Merge tag 'wireless-drivers-next-for-davem-2015-04-01' of ↵David S. Miller2015-04-011-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>
| * Merge branch 'iwlwifi-fixes' into iwlwifi-nextEmmanuel Grumbach2015-03-121-1/+2
| |\
| * | iwlwifi: mvm: BT Coex - update the new APIEmmanuel Grumbach2015-03-121-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>
* | | Merge tag 'mac80211-next-for-davem-2015-03-30' of ↵David S. Miller2015-03-311-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>
| * | | mac80211: convert rssi_callback() to event_callback()Emmanuel Grumbach2015-03-301-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>
* | | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2015-03-201-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>
| * | iwlwifi: mvm: BT Coex - fix a NULL pointer exceptionEmmanuel Grumbach2015-03-051-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>
* | iwlwifi: add new TLV capability flag for BT PLCREmmanuel Grumbach2015-03-021-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>
* iwlwifi: mvm: BT Coex - set all the co-running values to 0Emmanuel Grumbach2015-01-221-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>
* iwlwifi: mvm: use iwl_mvm_vif_from_mac80211() consistentlyJohannes Berg2014-12-281-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>
* iwlwifi: mvm: rs - don't use the shared antenna when BT load is highEmmanuel Grumbach2014-11-111-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>
* iwlwifi: mvm: BT Coex - make the multiprio lut a constantEmmanuel Grumbach2014-10-291-7/+2
| | | | | | This makes it easier to tune the values during the testing. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: BT Coex - move BT_ANTENNA_COUPLING_THRESHOLD to constantsEmmanuel Grumbach2014-10-291-3/+1
| | | | | | This is were it really needs to be. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: BT Coex - update the MPLUT Boost register valueEmmanuel Grumbach2014-10-231-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>
* iwlwifi: define the non shared antenna per hardwareEmmanuel Grumbach2014-09-141-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>
* Merge remote-tracking branch 'iwlwifi-fixes/master' into NEXTEmmanuel Grumbach2014-09-141-6/+3
|\
| * iwlwifi: mvm: BT Coex - always initialize smps_modeJohannes Berg2014-09-081-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>
| * iwlwifi: mvm: BT Coex - remove shadowing variableJohannes Berg2014-09-081-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>
* | iwlwifi: add Intel Mobile Communications copyrightJohannes Berg2014-09-031-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>
* iwlwifi: mvm: BT Coex - don't change AP SMPS modeEmmanuel Grumbach2014-07-221-13/+8
| | | | | | Leave it to default instead - regardless of the BT activity. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: BT Coex - fix the ACK / CTS kill maskEmmanuel Grumbach2014-07-221-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>
* iwlwifi: mvm: BT Coex - fix TLC with old APIEmmanuel Grumbach2014-07-081-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>
* iwlwifi: mvm: BT Coex - relax constraints when TTC / RRC is activeEmmanuel Grumbach2014-07-071-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>
* iwlwifi: mvm: BT Coex - add High Band retentionEmmanuel Grumbach2014-07-071-0/+2
| | | | | | | Tell the firmware if TTC should be enabled when switching to High Band. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: BT Coex - convert reduced Tx power to new APIEmmanuel Grumbach2014-07-071-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>
* iwlwifi: mvm: BT Coex - convert the co-running update to new APIEmmanuel Grumbach2014-07-071-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>
* iwlwifi: mvm: BT Coex - convert the sw boost update to new APIEmmanuel Grumbach2014-07-071-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>
* iwlwifi: mvm: BT Coex - new APIEmmanuel Grumbach2014-07-071-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>
* iwlwifi: mvm: BT Coex - prepare towards new APIEmmanuel Grumbach2014-07-071-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>
* iwlwifi: mvm: BT Coex - avoid the shared antenna for management framesEmmanuel Grumbach2014-06-241-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>
* iwlwifi: mvm: BT Coex - add reduced Tx power thresholds to constantsEmmanuel Grumbach2014-06-241-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>
* iwlwifi: mvm: BT Coex - don't limit rate control if TTC is onEmmanuel Grumbach2014-06-241-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>
* iwlwifi: mvm: BT Coex - allow MIMO in more casesEmmanuel Grumbach2014-06-241-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>
* iwlwifi: mvm: BT Coex - allow to force the antenna allocationEmmanuel Grumbach2014-06-241-0/+39
| | | | | | This can be used for testing. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: remove debugfs hook for reduced tx powerEmmanuel Grumbach2014-05-221-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>
* iwlwifi: mvm: disable reduced Tx power when not applicableEmmanuel Grumbach2014-05-221-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>
* iwlwifi: mvm: BT Coex - send channel inhibition before associationEmmanuel Grumbach2014-05-151-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>
* iwlwifi: mvm: BT Coex - fix boost register / LUT valuesEmmanuel Grumbach2014-05-131-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>
* iwlwifi: remove CMD_SYNCEmmanuel Grumbach2014-05-131-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>
* iwlwifi: add missing trailing newlines to debug messagesJohannes Berg2014-05-111-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>
* Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-nextEmmanuel Grumbach2014-05-061-10/+14
|\
| * iwlwifi: mvm: BT Coex - fix validity flags during initEmmanuel Grumbach2014-05-061-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>
| * iwlwifi: mvm: BT Coex - fix Look Up TableEmmanuel Grumbach2014-04-131-6/+6
| | | | | | | | | | | | | | | | 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>
| * iwlwifi: mvm: BT Coex - send the new LUT upon antenna coupling changeEmmanuel Grumbach2014-04-131-1/+5
| | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud