summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-nextEmmanuel Grumbach2014-07-061-3/+2
|\
| * iwlwifi: mvm: disable CTS to SelfEmmanuel Grumbach2014-07-031-3/+2
| | | | | | | | | | | | | | | | | | | | Firmware folks seem say that this flag can make trouble. Drop it. The advantage of CTS to self is that it slightly reduces the cost of the protection, but make the protection less reliable. Cc: <stable@vger.kernel.org> [3.13+] Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* | iwlwivi: mvm: BT Coex - properly set the priority of beaconsEmmanuel Grumbach2014-06-241-6/+7
| | | | | | | | | | | | | | | | | | Since the new API allows multiple priorities, we need to properly set the beacon's prorities in the TX cmd associated to it. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* | iwlwifi: mvm: support extended beacon notificationDavid Spinadel2014-06-241-10/+22
|/ | | | | | | | | | | Use extended beacon notification when supported by FW. Set last beacon system time to AP or GO interface. System time of last beacon can be used to avoid TBTT overlapping between two interfaces, CSA and other uses. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: pass force_assoc_off all the way down to avoid hacksLuciano Coelho2014-05-211-5/+8
| | | | | | | | | | | | | | | In some cases, we need to force the association to be off in the MAC_CONTEXT_CMD command we send to the firmware. Instead of having to hack the vif->bss_conf.assoc value, pass it all the way down the call chain. Additionally, for the iwl_mvm_mac_ctxt_add() case, we *always* set forced_assoc_off to true, so we can remove the hack in the d3 code that was forcing it to off by hacking the bss_conf.assoc value. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: set the MAC_FILTER_IN_BEACON flag also for P2PLuciano Coelho2014-05-191-2/+1
| | | | | | | | | | | | There doesn't seem to be a good reason for not enabling the MAC_FILTER_IN_BEACON flag for P2P client, as we do for station. This can prevent potential, hard-to-reproduce problems during association. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: enable MAC_FILTER_IN_BEACON when forced_assoc_off is setLuciano Coelho2014-05-191-8/+6
| | | | | | | | | | Set the MAC_FILTER_IN_BEACON flag in iwl_mvm_mac_ctxt_cmd_sata() also when forced_assoc_off is set, so it's aligned with when we are not associated. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: combine p2p and station mac context functionsLuciano Coelho2014-05-151-58/+32
| | | | | | | | | | Instead of having two nearly identical functions to send the mac context commands, use a single way that can handle both the p2p and !p2p cases. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: remove CMD_SYNCEmmanuel Grumbach2014-05-131-2/+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:mvm: Add AP/GO channel switch supportAndrei Otcheretianski2014-05-061-0/+12
| | | | | | | | | | | | | | | Publish WIPHY_FLAG_HAS_CHANNEL_SWITCH if the fw supports newly introduced IWL_UCODE_TLV_API_CSA_FLOW. When CSA starts, save the switching vif inside mvm and during the CSA period configure fw with a new beacon after each beacon transmission in order to update the csa counters. Also, handle correctly the CSA unbind-bind flow which is triggered by mac80211 when the actual channel switch happens. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: deprecate -7 firmwareEmmanuel Grumbach2014-04-131-4/+1
| | | | | | | | | | This firmware is not supported any more. A few code paths specific to old firmware can be removed. We can now assume that a few TLV flags are always set since we won't load firmware that didn't support the corresponding features. This will be done in a separate patch. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: remove iwl_fw_valid_(tx|rx)_ant inlinesJohannes Berg2014-02-131-1/+1
| | | | | | | | | These inlines are pretty pointless now as they just return a fixed struct value, remove them - the code even gets shorter. 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>
* iwlwifi: mvm: modify the tsf_id master/slave logicIlan Peer2014-02-061-30/+46
| | | | | | | | | | | | For TSF master/slave synchronization, the FW does not require exact match in the beacon interval between the master interface and the slave one, but instead requires that the beacon interval of one interface is the module of the other. Modify the tsf_id selection to align with the above. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: Update Copyright to 2014Emmanuel Grumbach2013-12-311-2/+2
| | | | | | Happy new year! Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: dynamically update tsf_idIlan Peer2013-12-311-30/+74
| | | | | | | | | | | | | | | | Currently, the MAC context tsf_id assignment and the master/slave relations are determined only when a new vif is added, as part of the MAC context resource allocation. However, at this stage, the beacon interval is not known, and thus could not be taken into account in the master-slave algorithm. To fix this, recalculate the MAC context tsf_id assignment, just before the MAC context is activated, i.e., just before a station VMAC is configured to associated and before an AP VMAC is started. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: change the parameters for calculating an AP TBTTIlan Peer2013-12-311-1/+1
| | | | | | | | | Change the parameters for calculating an AP TBTT to 64/36 instead of 80/20, to increase the interval between a station vif and an AP vif TBTT events. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: Add a missed beacons thresholdIlan Peer2013-12-311-5/+20
| | | | | | | | | | Instead of always calling ieee80211_beacon_loss() on every missed beacons notification, call this function only if the number of consecutive missed beacons from last rx is higher than a predefined threshold. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: fix AC / FIFO mappingEmmanuel Grumbach2013-12-311-10/+15
| | | | | | | | | | | | | The AC / fifo mapping was wrong - BE packets landed in VO FIFO. The iwl_mvm_tx_fifo enumeration isn't in the same order as ieee80211_ac_numbers enumeration. Since the firmware relies on fifo / ac mapping - this led to wrong behavior. E.g. the firmware sends beacon with the same QoS parameters as VO, and it actually took the parameters of BK. There are probably more severe issues. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: fix ht protection flagsAvri Altman2013-12-091-9/+42
| | | | | | | | | | | | | | | | | The HT protection flags have been a mess for a long time, this patch fixes all this. The proper source of information for this is the protection in the HT operation mode IE which is propagated to bss_conf by mac80211. 1) No need to set the HT protection flags when the link doesn't support HT. 2) We need to set the TGG protection when ERP is active. Signed-off-by: Avri Altman <avri.altman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: capture the FCS in monitor modeJohannes Berg2013-10-291-1/+7
| | | | | | | This can be useful when using the device as a sniffer. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: add IBSS supportJohannes Berg2013-10-111-8/+46
| | | | | | | | | | | | | | | At the firmware level, IBSS support has similar programming requirements as AP/GO support, so use the same functions with just small differences. With IBSS only a single virtual interface can be used, so no changes in the advertised interface combinations are needed. For now, don't use hardware crypto for the GTKs in IBSS mode, the firmware should support it though. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: keep connection to AP after WoWLANJohannes Berg2013-10-111-0/+3
| | | | | | | | | | | | | Until now, after WoWLAN, we weren't able to keep the connection to the AP because the firmware didn't give us the right information. Since the firmware API has been changed to include all the information we need, change the driver to work with the new API (if it is available) and program all the relevant information in mac80211 to keep the connection. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: add support for NICs which have only 16 Tx queues.Eytan Lifshitz2013-10-111-6/+6
| | | | | | | | | | Some NICs embedded in platforms that have only 16 Tx queues, this affect the mapping of the Tx queues. Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: use CTS to Self if firmware allows itEmmanuel Grumbach2013-10-021-1/+5
| | | | | | | | | Newer firmware fixed a bug that prevented to use CTS to self. Firmwares with API greater than 8 have this bug fixed. Enable the feature for these firmwares only. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: Return on inconsistency in add interfaceIlan Peer2013-07-311-1/+2
| | | | | | | | | Return in case that HW restart is in progress but the added interface is not found during the iteration over all the interfaces. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: Change the settings of AP beacon timeIlan Peer2013-06-251-5/+51
| | | | | | | | | | | | | | | | In case that an AP/GO interface is started while there is a station/P2P client associated, need to make sure that the AP/GO beacon time is far enough from the station's one in oder to allow the station to receive the DTIM beacons and the following traffic etc. To resolve this, when the AP is started, check if there is an active station interface, and guarantee that the AP/GO TBTT is far enough from the station one. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: don't set the MCAST queue in STA's queue listEmmanuel Grumbach2013-06-111-4/+1
| | | | | | | | | | The MCAST queue should be enabled after DTIM only. According to fw API, the MCAST must not be attached to any station, but should appear in the mcast_qid of the AP's mac context only. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: correctly configure MCAST in AP modeEmmanuel Grumbach2013-06-041-1/+5
| | | | | | | | | | | | | | | | The AP mode needs to use the MCAST fifo for the MCAST frames sent after the DTIM. This fifo needs to be configured with the same parameters as the VOICE FIFO. A separate SCD queue is mapped to this fifo - the cab_queue (cab stands for Content After Beacon). This queue isn't connected to any station, but rather to the MAC context. This queue should (and is already) be set as the MCAST queue - this is part of the of MAC context command. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: Add support for connection monitor offloadHila Gonen2013-05-291-0/+25
| | | | | | | | | | | | The firmware supports periodic keep alive and beacon monitoring, so advertise connection monitor offload capability by setting IEEE80211_HW_CONNECTION_MONITOR flag. Implement missed beacons notification handler. Call ieee80211_beacon_loss in case of missed beacons, so AP probing by mac80211 can be triggered. Signed-off-by: Hila Gonen <hila.gonen@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: add thermal throttling and CT killEytan Lifshitz2013-05-291-1/+4
| | | | | | | | | | | | In order to avoid NIC destruction due to high temperature, CT kill will power down the NIC. To avoid this, thermal throttling will decrease throughput to prevent the NIC from reaching the temperature at which CT kill is performed. Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: Prevent setting assoc flag in MAC_CONTEXT_CMDAlexander Bondar2013-05-161-4/+8
| | | | | | | | | | | | | | In the normal flow first MAC_CONTEXT_CMD for particular interface is never sent while associated. The exception is fw restart flow when resuming from suspend when WoWLAN is enabled. In this case successive "add" and "modify" MAC_CONTEXT_CMD commands may be sent with assoc flag set what cause FW mal functioning. To prevent this never set assoc flag in MAC_CONTEXT_CMD with action "add". Cc: stable@vger.kernel.org Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* Merge branch 'for-john' of ↵John W. Linville2013-04-101-3/+9
|\ | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/ath/carl9170/debug.c drivers/net/wireless/ath/carl9170/main.c net/mac80211/ieee80211_i.h
| * mac80211: add P2P NoA settingsJanusz Dziedzic2013-03-221-3/+9
| | | | | | | | | | | | | | | | Add P2P NoA settings for STA mode. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> [fix docs] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: mvm: take the valid_{rx,tx}_ant from the TLVEmmanuel Grumbach2013-03-201-1/+1
| | | | | | | | | | | | | | | | This is the right source of information for the valid Tx antennas, not the NVM. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: mvm: specify filter flags in monitor modeJohannes Berg2013-03-201-1/+6
| | | | | | | | | | | | | | | | | | | | In firmware "listener" (monitor) mode, we still need to open up the filters with the filter flags to receive all frames. Reviewed-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: mvm: Remove obsolete queue definitionsIlan Peer2013-03-201-1/+1
| | | | | | | | | | | | Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: mvm: Add beacon notification handlerIlan Peer2013-03-201-0/+19
| | | | | | | | | | | | | | | | Mostly for debugging purposes Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: mvm: don't read system time when modifying AP/GO MACJohannes Berg2013-03-061-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | When modifying a MAC, we update its beacon system time which is taken as a base to calculate TBTT. The firmware doesn't use the new timestamp because the time is never used after the MAC and broadcast station were added, but it is safer to not rely on this and avoids the overhead of reading the register every time the MAC is updated. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: mvm: Update MAC context filter flagsIlan Peer2013-03-061-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | 1. For P2P Device filter in only probe requests. 2. For station mode filter in all group cast frames, and in addition beacons as long as we are not associated. 3. For AP/GO filter in all group cast and in addition probe requests. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: mvm: don't use cts to selfDor Shaish2013-03-061-2/+2
| | | | | | | | | | | | | | | | | | The current fw doesn't currently support cts to self. There is a bug in the fw that prevents us from using cts to self. Use full protection (including RTS) for now. Signed-off-by: Dor Shaish <dor.shaish@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: a few fixes in licenseEmmanuel Grumbach2013-03-061-1/+1
|/ | | | | | | | | | 7000.c was released as GPL only by mistake: it should be dual licensed - GPL / BSD. The file that contains the license in the kernel is COPYING and not LICENSE.GPL. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: Reserve MAC id 0 for managed interfacesIlan Peer2013-02-181-0/+4
| | | | | Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: Fix resource allocation for P2P DeviceIlan Peer2013-02-181-3/+3
| | | | | | | | | The time event data structures are required also for P2P Device interface. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: program DTIM timings properlyJohannes Berg2013-02-181-2/+35
| | | | | | | | | | For the firmware to know when DTIM beacons arrive we have to program the DTIM time in TSF and system time in the MAC context. Since mac80211 now tracks the different times (on demand), this becomes easy. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: don't delay the association until after beaconJohannes Berg2013-02-121-1/+5
| | | | | | | | | | | | | If we haven't heard a beacon before we associate we can still start the association process and set the MAC in the firmware to associated only after having received a beacon with DTIM period by reacting to the new change flag (BSS_CHANGED_DTIM_PERIOD) from mac80211. This reduces the association time in these cases. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: add the MVM driverJohannes Berg2013-02-011-0/+951
Newer firmware revisions have a completely new firmware API. This is the new driver for this new API. I've listed the people who directly contributed code, but many others from various teams have contributed in other ways. Cc: Alexander Bondar <alexander.bondar@intel.com> Cc: Amit Beka <amit.beka@intel.com> Cc: Amnon Paz <amnonx.paz@intel.com> Cc: Assaf Krauss <assaf.krauss@intel.com> Cc: David Spinadel <david.spinadel@intel.com> Cc: Dor Shaish <dor.shaish@intel.com> Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Cc: Eytan Lifshitz <eytan.lifshitz@intel.com> Cc: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
OpenPOWER on IntegriCloud