summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-09-21iwlwifi: mvm: remove IWL_UCODE_TLV_API_SINGLE_SCAN_EBS TLV flagEmmanuel Grumbach2-4/+0
All the supported firmwares have this flag set. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-09-21iwlwifi: mvm: remove IWL_UCODE_TLV_API_TX_POWER_DEV TLV flagEmmanuel Grumbach2-19/+0
All the supported firmwares use the new API. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-09-21iwlwifi: mvm: remove IWL_UCODE_TLV_API_HDC_PHASE_0 TLV flagEmmanuel Grumbach3-18/+1
All the supported firwmares support the new API. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-08-28iwlwifi: mvm: remove SCD_QUEUE_CONFIG TLV flagLiad Kaufman5-21/+2
We don't support firmwares that don't use the new API. This also allows to use all the SCD queues, so increase the reported number of queues to 31. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-08-28iwlwifi: mvm: don't load -12.ucode anymoreEmmanuel Grumbach2-4/+4
-13.ucode has been published long ago. Deprecate old versions of the firmware. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-08-28iwlwifi: mvm: don't NUL-terminate low-latency debugfs fileJohannes Berg1-2/+1
There's obviously no reason to write a NUL-terminating byte into the debugfs file. Apparently nobody tried to use this from a tool that doesn't strip NUL bytes though, so we never noticed. Fix it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-08-28iwlwifi: mvm: make sure d0i3 exit work runs before suspendingLuciano Coelho1-0/+3
If we are in d0i3 when entering suspend, we leave d0i3 so that mac80211 can call us to remove connections or whatever before going to suspend. We do this by calling pm_runtime_resume() early in the slave transport flow and reactivating it later, when the wiphy suspend flow runs. The problem is that we queue a work in order to leave d0i3. If this work hasn't run yet when the wiphy suspend flow is called, we have a race and entering d0i3 fails (because we're still holding the IWL_MVM_REF_EXIT_WORK reference). To solve this, simply flush the d0i3_exit_work at the beginning of the iwl_mvm_suspend() function. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-08-28iwlwifi: mvm: don't ask for beacons when AP vif and no assoc staGregory Greenman4-6/+35
When in AP mode, we need beacons from other APs for HT protection. However, when there's no any associated station we will not do any Tx and thus don't really need beacons. On the other hand, these beacons will cause a lot of unnecessary wakeups which increase our power consumption. Handle this by asking FW to pass beacons only when there's at least one associated station. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-08-28iwlwifi: Deinline iwl_{read,write}(8,32}Emmanuel Grumbach2-18/+25
With CONFIG_IWLWIFI_DEVICE_TRACING=y, these functions are rather large, too big for inlining. With this .config: http://busybox.net/~vda/kernel_config, after uninlining these functions have sizes and callsite counts as follows: iwl_read32 475 bytes, 51 callsites iwl_write32 477 bytes, 90 callsites iwl_write8 493 bytes, 3 callsites Reduction in size is about 74,000 bytes: text data bss dec hex filename 90758147 17226024 36659200 144643371 89f152b vmlinux0 90687995 17221928 36659200 144569123 89df323 vmlinux.after Reported-by: Denys Vlasenko <dvlasenk@redhat.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-08-28iwlwifi: mvm: add debugfs hook to send ECHO_CMD to the firmwareEmmanuel Grumbach3-0/+17
ECHO_CMD is a simple command that can be sent to the firmware just to check that it is alive. This command is useful for debug purpose, provide a debugfs hook to send it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-08-28iwlwifi: mvm: fix statistics variables typeSara Sharon3-14/+14
When receiving statistics notification there is a field of average energy. This is defines as signed 8 bit, while FW refers to it as unsigned. when the energy is higher than 127 this causes in iwl_mvm_stat_iterator a wrong computation of the signal int sig = -stats->general.beacon_filter_average_energy; resulting in incorrect CQM event (change from low to high). While at it - update the rest of the fields to the correct type. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-08-28iwlwifi: mvm: remove netdetect debugfs entryLuciano Coelho1-114/+0
This debugfs entry was implemented just as a proof-of-concept before the full support for netdetect via cfg80211/mac80211 was implemented. Now that we have a proper way to enable netdetect from userspace, this entry is redundant and should be removed to avoid unnecessary maintenance work. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-08-23iwlwifi: mvm: bump firmware API to 17Emmanuel Grumbach2-2/+2
The driver is now able to handle -17.ucode. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-23iwlwifi: mvm: support new TX power commandJohannes Berg3-10/+37
Add support for the new (bigger) TX power command. This doesn't actually take advantage of the new capabilities (to set per-chain TX power limits) but makes the code compatible with newer firmware images expecting the larger command. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-23iwlwifi: mvm: split debug message to avoid exceeding 110 charactersAyala Beker1-8/+12
split long debug messages that may result warning in tracing. Fixes: 1a84e7716086 ("iwlwifi: mvm: add debug info to schedule scan complete message.") Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-23iwlwifi: correctly size command string arraysJohannes Berg3-3/+3
The command string array is assumed to be indexable by a full u8, so it must have 256 entries (0-255), not just 255. A recent firmware change (apparently) started using the command 0xff for a notification to the host, causing the driver to crash in debug message/tracing code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-23iwlwifi: mvm: update wakeup reason enumSara Sharon1-1/+6
when waking from d0i3 there is a wakeup reason. Enum in driver is not up to date with FW api - fix it. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-23iwlwifi: mvm: catch underflow error earlierDan Carpenter1-2/+3
My static checker complains that we don't check for underflows in iwl_dbgfs_fw_dbg_conf_write(). This is harmless because we have a sanity check in iwl_mvm_start_fw_dbg_conf(), but we may as well make this unsigned and silence the underflow warning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-18iwlwifi: mvm: fix a race in D0i3 vs. Tx pathEmmanuel Grumbach1-2/+3
When we enter D0i3, we must stop TXing otherwise the sequence number we use might conflict with the firmware's internal TX. In order to do so, we have IWL_MVM_STATUS_IN_D0I3 which should prevent any Tx while we enter D0i3. There is a bug in this code since we may Tx even if IWL_MVM_STATUS_IN_D0I3 is set. This can happen as long as mvm->d0i3_ap_sta_id is not set. To make sure that we don't have any packet in the Tx path while we set mvm->d0i3_ap_sta_id, call synchronize_net only after we already set mvm->d0i3_ap_sta_id. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-18iwlwifi: mvm: don't disconnect on beacon loss in D0I3David Spinadel1-11/+26
Currently if we wake up during D0I3 due to beacon loss we disconnect immediately. This behaviour causes redundant disconnection, which could be prevented by polling as it is usually done in mac80211. Instead, we prefer reporting beacon loss and let mac80211 try polling before disconnection. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-18iwlwifi: out-of-bounds access in iwl_init_sband_channelsAdrien Schildknecht1-2/+2
KASan error report: ================================================================== BUG: KASan: out of bounds access in iwl_init_sband_channels+0x207/0x260 [iwlwifi] at addr ffff8800c2d0aac8 Read of size 4 by task modprobe/329 ================================================================== Both loops of this function compare data from the 'chan' array and then check if the index is valid. The 2 conditions should be inverted to avoid an out-of-bounds access. Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-18iwlwifi: bump mvm firmware API to 16Emmanuel Grumbach2-2/+2
The driver is now able to handle -16.ucode. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-18iwlwifi: rs: disable MIMO only if allowed in configurationAlexander Bondar1-1/+2
Fix bug where MIMO is disabled for low latency TX on P2P VIF regardless of configuration. Make it dependent on IWL_MVM_RS_DISABLE_P2P_MIMO compilation option. Change configuration so that MIMO will be disabled only in SDIO platforms. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-16iwlwifi: mvm: Enable power management on low-latency bssAvri Altman1-2/+2
Currently the driver disable power management on all low-latency interfaces, while it should disable it on WiDi interfaces only. Non-P2P interfaces that runs voice and video traffic should enable power management. Signed-off-by: Avri Altman <avri.altman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-16iwlwifi: mvm: support TDLS wider-bandwidthArik Nemtsov1-0/+1
When TDLS support is declared by the FW, set the bit indicating wider-BW support as well. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-16iwlwifi: mvm: fix a range check in debugfs codeDan Carpenter1-3/+3
The &mvm->tof_data.range_req.ap[] array has IWL_MVM_TOF_MAX_APS elements so the check should be >= instead of >. Also the test can underflow so I have changed "i" to unsigned. Fixes: ce7929186a39 ('wlwifi: mvm: add basic Time of Flight (802.11mc FTM) support') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-16iwlwifi: convert hex_dump_to_buffer() to %*phAndy Shevchenko2-12/+3
There is no need to use hex_dump_to_buffer() in the cases like this: hexdump_to_buffer(buf, len, 16, 1, outbuf, outlen, false); /* len <= 16 */ sprintf("%s\n", outbuf); since it maybe easily converted to simple: sprintf("%*ph\n", len, buf); Note: it seems in one case the output is groupped by 2 bytes and looks like a typo. Thus, patch changes that to plain byte stream. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-16iwlwifi: pass NAPI struct from transport layerJohannes Berg9-61/+20
The mac80211 patch to pass the NAPI struct only changed iwlwifi to store the NAPI struct, but we can do better: pass it directly from the lower transport layer to the opmode during RX, and then on to mac80211 from there. When we add multiple RX queues, we can then pass the appropriate NAPI struct properly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-16Merge tag 'mac80211-next-for-davem-2015-08-14' into nextEmmanuel Grumbach6806-155537/+798356
Another pull request for the next cycle, this time with quite a bit of content: * mesh fixes/improvements from Alexis, Bob, Chun-Yeow and Jesse * TDLS higher bandwidth support (Arik) * OCB fixes from Bertold Van den Bergh * suspend/resume fixes from Eliad * dynamic SMPS support for minstrel-HT (Krishna Chaitanya) * VHT bitrate mask support (Lorenzo Bianconi) * better regulatory support for 5/10 MHz channels (Matthias May) * basic support for MU-MIMO to avoid the multi-vif issue (Sara Sharon) along with a number of other cleanups.
2015-08-16iwlwifi: mvm: add debug info to schedule scan complete message.Ayala Beker1-7/+16
Add more information to schedule scan complete message. Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-16iwlwifi: mvm: remove partial and full scan lists from lmac sched scanDavid Spinadel1-17/+11
Lmac sched scan supports partial scans, so we can set some channels to be scanned on every scan iteration and others to be scanned only on some iterations. Currently we set all channels to be scanned every iteration, but still have some configuration of which iterations should be partial and which should be full. Remove all partial/full scan configuration to reduce confusions. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-16iwlwifi: mvm: simplify calculating scan dwells and other timing valuesDavid Spinadel1-81/+88
Remove timing values from iwl_mvm_scan_params and use defines and arrays of values instead. While at that fix few values and corner cases and align all OSs to ChromeOS values. Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-16iwlwifi: make sure d3_suspend/resume ops existEliad Peller1-1/+5
We added calls to d3_suspend/resume trans ops during the suspend/resume flow. However, the wrapper code didn't verify the trans ops were actually defined, resulting in panic when they were not (such as in the case of sdio trans) Fixes: 6dfb36c89dc2 ("iwlwifi: call d3_suspend/resume in d0i3 case as well") Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-14mac80211: fix BIT position for TDLS WIDE extended capEmmanuel Grumbach1-1/+1
The bit was not according to ieee80211 specification. Fix that. Reviewed-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14mac80211: use DECLARE_EWMAJohannes Berg5-10/+12
Instead of using the out-of-line average calculation, use the new DECLARE_EWMA() macro to declare a signal EWMA, and use that. This actually *reduces* the code size slightly (on x86-64) while also reducing the station info size by 80 bytes. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14average: provide macro to create static EWMAJohannes Berg1-0/+39
Having the EWMA parameters stored in the runtime struct imposes memory requirements for the constant values that could just be inlined in the code. This particularly makes sense if there are a lot of such structs, for example in mac80211 in the station table where each station has a number of these in an array, and there can be many stations. Provide a macro DECLARE_EWMA() that declares the necessary struct and inline functions to access it with the parameters hard-coded; using this also means the user no longer needs to 'select AVERAGE' as it's entirely self-contained. In the mac80211 case, on x86-64, this actually slightly *reduces* code size, while also saving 80 bytes of runtime memory per sta. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14mac80211_hwsim: unregister genetlink family properlySu Kang Yin1-1/+3
During hwsim_init_netlink(), we should call genl_unregister_family() if failed on netlink_register_notifier() since the genetlink is already registered. Signed-off-by: Su Kang Yin <cantona@cantona.net> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14mac80211: add rate mask logic for vht ratesLorenzo Bianconi6-16/+181
Define rc_rateidx_vht_mcs_mask array and rate_idx_match_vht_mcs_mask() method in order to apply mcs mask for vht rates Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14mac80211: define rate_control_apply_mask_ratetbl()Lorenzo Bianconi1-0/+27
Define rate_control_apply_mask_ratetbl() in order to apply ratemask in rate_control_set_rates() for station rate table Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14mac80211: remove ieee80211_tx_rate dependency in rate mask codeLorenzo Bianconi1-68/+71
Remove ieee80211_tx_rate dependency in rate_idx_match_legacy_mask(), rate_idx_match_mcs_mask() and rate_idx_match_mask() in order to use the previous logic to define a ratemask in rate_control_set_rates() for station rate table. Moreover move rate mask definition logic in rate_control_cap_mask() Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14mac80211: remove ieee80211_tx_info from rate_control_apply_mask signatureLorenzo Bianconi1-6/+5
Remove unnecessary ieee80211_tx_info pointer from rate_control_apply_mask signature. rate_control_apply_mask() will be used to define a ratemask in rate_control_set_rates() for station rate table Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14mac80211: Make OCB mode set BSSIDBertold Van den Bergh1-1/+1
Perform the BSS_CHANGED_BSSID action when joining an OCB network. This is required to set the broadcast BSSID in some network drivers. Signed-off-by: Bertold Van den Bergh <bertold.vandenbergh@esat.kuleuven.be> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14mac80211: Only accept data frames in OCB modeBertold Van den Bergh1-1/+1
Currently OCB mode accepts frames with bssid==broadcast and type!=beacon. Some non-data frames are sent matching this, for example probe responses. This results in unnecessary creation of STA entries. Signed-off-by: Bertold Van den Bergh <bertold.vandenbergh@esat.kuleuven.be> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14mac80211: Set txrc.bss to true for OCB interfacesBertold Van den Bergh1-1/+2
To make mac80211 accept the multicast rate requested by the user the rate control should be told that it is operating in BSS mode. Without this, the default rate is selected in rate_control_send_low (!pubsta and !txrc->bss) Signed-off-by: Bertold Van den Bergh <bertold.vandenbergh@esat.kuleuven.be> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14nl80211: Allow setting multicast rate on OCB interfacesBertold Van den Bergh1-1/+2
Allow setting multicast rate on OCB interfaces. Current behaviour results in EOPNOTSUPP when attempting this. Signed-off-by: Bertold Van den Bergh <bertold.vandenbergh@esat.kuleuven.be> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14cfg80211: propagate set_wiphy failure to userspaceMichal Kazior1-0/+1
If driver failed to setup wiphy params (e.g. rts threshold, fragmentation treshold) userspace wasn't properly notified about this. This could lead to user confusion who would think the command succeeded even if that wasn't the case. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-14cfg80211: regulatory: handle 5 and 10 MHz channels properlyMatthias May1-11/+53
The original assumption of 20MHz wide channels hasn't been true since the addition of support for 5 and 10 MHz channels. Change the code to no longer disable all channels that don't fit into the 20MHz grid, but instead set the appropriate flags to disable operation on specific bandwidths. Signed-off-by: Matthias May <matthias.may@neratec.com> [reword commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-13mac80211: remove always true conditionDan Carpenter1-4/+1
The outside if statement checks that IEEE80211_TX_INTFL_MLME_CONN_TX is set so this condition is always true. Checking twice upsets the static checkers. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-13mac80211: remove ieee80211_aes_cmac_calculate_k1_k2()Johannes Berg2-30/+0
The iwlwifi driver was the only driver that used this, but as it turns out it never needed it, so we can remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-13iwlwifi: mvm: don't set K1/K2 for AES-CMACJohannes Berg2-4/+2
According to firmware engineers, the firmware has never required these fields and the values have always been calculated, they were just leftovers from a previous implementation. Therefore remove the unnecessary calculation. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>