aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi
AgeCommit message (Collapse)AuthorFilesLines
2016-02-01iwlwifi: mvm: make collecting fw debug data optionalGolan Ben-Ami2-2/+9
Slow platforms may have issues with dumping data upon firmware assert. Make it easier to disable it for those platform. Signed-off-by: Golan Ben-Ami <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-01iwlwifi: mvm: Add P2P client snoozingAvri Altman4-3/+47
Enable snoozing and U-APSD on P2P client. The firwmare will support this only if the BSS vif is not associated. Make this configurable by a constant variable and disable it by default. Signed-off-by: Avri Altman <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-01iwlwifi: mvm: add trigger for firmware dump upon TX response statusGolan Ben-Ami3-0/+49
This will allow to collect the data when the firmware sends a specific tx response status. Signed-off-by: Golan Ben-Ami <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-01iwlwifi: Document missing module optionsRodrigo Freire1-0/+2
This patch documents two missing module options in the internal code comment block. Signed-off-by: Rodrigo Freire <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-01iwlwifi: dvm: handle zero brightness for wifi LEDHubert Tarasiuk1-1/+4
In order to have the LED being OFF constantly when the brightness is set to 0, we need to pass IWL_LED_SOLID to iwl_led_cmd as the off parameter, otherwise the led will stay on constantly. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=110551 Signed-off-by: Hubert Tarasiuk <[email protected]> [reworked the commit message] Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-01iwlwifi: various comments and code cleanupsEmmanuel Grumbach4-6/+1
No need to include net/ip6_checksum.h twice. Remove TODOs. Remove trailing space. Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-01iwlwifi: mvm: Do not switch to D3 image on suspendMatti Gottlieb7-38/+70
Currently when the driver is configured with wowlan parameters, and enters D3 mode, the driver switches the FW image to D3, and when it exists suspend, it reloads the D0 image. If the firmware supports the consolidation of the D0 & D3 images there is no need to load the D3 image on suspend, and no need to reload the D0 image on resume. Do not switch images on suspend / resume, for firmwares that support consolidated images. Signed-off-by: Matti Gottlieb <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-01iwlwifi: pcie: add RTPM support when wifi is enabledLuciano Coelho5-27/+141
Enable runtime power management (RTPM) for PCIe devices and implement the corresponding functions to enable D0i3 mode when the device is idle. Additionally, remove some unnecessary #ifdef's because the RTPM code will not be called if runtime PM is not configured. Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-01iwlwifi: pcie: add initial RTPM support for PCILuca Coelho3-3/+96
Add an initial implementation of runtime power management (RTPM) for PCI devices. With this patch, RTPM is only used when wifi is off (i.e. the wifi interface is down). This implementation is behind a new Kconfig flag, IWLWIFI_PCIE_RTPM. Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-31iwlwifi: pcie: add 9000 series multi queue rx DMA supportSara Sharon6-80/+322
The 9000 series introduces several changes in the device DMA operation. As the device now supports multi-queue rx, several DMA channels should be configured. The flows of providing the device with the allocated RBDs now changes as well - the device maintains a separate table of used and free table. The hardware may use the free table to feed RBDs to any queue. This requires maintaing a shared table to map returned RBDs to the original RXB - for that purpose the VID is introduced - an internal identifier of the RB placed in the lower 12 bits and returned by HW in the used data. Another change is the support of 64 bit DMA address. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-31iwlwifi: fix name of ucode loaded for 8265 seriesOren Givon2-11/+37
Fix the name of the ucode being loaded for 8265 series to be: iwlwifi-8265-XX.ucode Signed-off-by: Oren Givon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-31iwlwifi: pcie: add infrastructure for multi-queue rxSara Sharon3-154/+191
The 9000 series devices will support multi rx queues. Current code has one static rx queue - change it to allocate a number of queues per the device capability (pre-9000 devices have the number of rx queues set to one). Subsequent generalizations are: Change the code to access an explicit numbered rx queue only when the queue number is known - when handling interrupt, when accessing the default queue and when iterating the queues. The rest of the functions will receive the rx queue as a pointer. Generalize the warning in allocation failure to consider the allocator status instead of a single rx queue status. Move the rx initial pool of memory buffers to be shared among all the queues and allocated to the default queue on init. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-31iwlwifi: pcie: buffer packets to avoid overflowing Tx queuesEmmanuel Grumbach2-8/+62
When the Tx queues are full above a threshold, we immediately stop the mac80211's queue to stop getting new packets. This worked until TSO was enabled. With TSO, one single packet from mac80211 can use many descriptors since a large send needs to be split into several segments. This means that stopping mac80211's queues is not enough and we also need to ensure that we don't overflow the Tx queues with one single packet from mac80211. Add code to transport layer to do just that. Stop mac80211's queue as soon as the queue is full above the same threshold as before, and keep pushing the current packet along with its segments on the queue, but check that we don't overflow. If that would happen, buffer the segments, and send them when there is room in the Tx queue again. Of course, we first need to send the buffered segments and only then, wake up mac80211's queues. Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-27Merge tag 'iwlwifi-for-kalle-2016-01-26_2' of ↵Kalle Valo5-33/+79
https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes * Fix support for 3168 device + NVM version + firmware file name + device IDs * Fix a compilation warning in dvm calibration code * Fix the TPC (reduced Tx Power) code. This fixes performance issues * Device IDs for 8265
2016-01-26iwlwifi: mvm: rs: fix TPC statistics handlingGregory Greenman3-29/+56
FW behaviour changed and now updates driver about the used TPC reduction in the following cases: 1. In tx response, which is used mostly for a single frame case 2. In BA notification When tx aggregation fails with the initial rate, FW will send to the driver BA notification and will try to transmit with the next rate, but this time without tx power reduction. Thus, in case of a failure with the initial rate, driver will get two BA notifications, the first one with reduced tx power as in the LQ command and the second one with 0 power reduction. This patch adapts the TPC statistics according to the description above: 1. Use BA notifications instead of Tx response 2. For TPC only, drop the optimization which considers empty BA as one MPDU. The reason is that with TPC we want to recover very quickly from a bad power reduction and, therefore we'd like the success ratio to get an immediate hit when failing to get a BA, so we'd switch back to a lower or zero power reduction Signed-off-by: Gregory Greenman <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-26iwlwifi: update support for 3168 series firmware and NVMOren Givon1-4/+19
Update the struct which defines the support for 3168 cards. Now it will search for a firmware of this format: iwlwifi-3168-XX.ucode Also, set the minimum version of the ucode to 20. Update the minimum NVM version and minimum NVM calibrations version of the 3168 series. Signed-off-by: Oren Givon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-24iwlwifi: add device ID for 8265Oren Givon1-0/+1
Signed-off-by: Oren Givon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-24iwlwifi: add new 3168 series devices supportOren Givon1-0/+3
Add new sub-system PCI IDs to the 3168 series. Added 0x2010, 0x2050 and 0x2150 sub-system IDs. Signed-off-by: Oren Givon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-16include/linux/kernel.h: change abs() macro so it uses consistent return typeMichal Nazarewicz1-1/+1
Rewrite abs() so that its return type does not depend on the architecture and no unexpected type conversion happen inside of it. The only conversion is from unsigned to signed type. char is left as a return type but treated as a signed type regradless of it's actual signedness. With the old version, int arguments were promoted to long and depending on architecture a long argument might result in s64 or long return type (which may or may not be the same). This came after some back and forth with Nicolas. The current macro has different return type (for the same input type) depending on architecture which might be midly iritating. An alternative version would promote to int like so: #define abs(x) __abs_choose_expr(x, long long, \ __abs_choose_expr(x, long, \ __builtin_choose_expr( \ sizeof(x) <= sizeof(int), \ ({ int __x = (x); __x<0?-__x:__x; }), \ ((void)0)))) I have no preference but imagine Linus might. :] Nicolas argument against is that promoting to int causes iconsistent behaviour: int main(void) { unsigned short a = 0, b = 1, c = a - b; unsigned short d = abs(a - b); unsigned short e = abs(c); printf("%u %u\n", d, e); // prints: 1 65535 } Then again, no sane person expects consistent behaviour from C integer arithmetic. ;) Note: __builtin_types_compatible_p(unsigned char, char) is always false, and __builtin_types_compatible_p(signed char, char) is also always false. Signed-off-by: Michal Nazarewicz <[email protected]> Reviewed-by: Nicolas Pitre <[email protected]> Cc: Srinivas Pandruvada <[email protected]> Cc: Wey-Yi Guy <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-01-14mac80211: pass block ack session timeout to to driverSara Sharon2-6/+12
Currently mac80211 does not inform the driver of the session block ack timeout when starting a rx aggregation session. Drivers that manage the reorder buffer need to know this parameter. Seeing that there are now too many arguments for the drv_ampdu_action() function, wrap them inside a structure. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2016-01-07iwlwifi: pcie: properly configure the debug buffer size for 8000Emmanuel Grumbach1-3/+12
8000 device family has a new debug engine that needs to be configured differently than 7000's. The debug engine's DMA works in chunks of memory and the size of the buffer really means the start of the last chunk. Since one chunk is 256-byte long, we should configure the device to write to buffer_size - 256. This fixes a situation were the device would write to memory it is not allowed to access. CC: <[email protected]> [4.1+] Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: fix memory leaks in error paths upon fw error dumpEmmanuel Grumbach1-8/+6
When iwl_mvm_fw_error_dump fails, it needs to clear the state in mvm, which includes: * clear IWL_MVM_STATUS_DUMPING_FW_LOG * set mvm->fw_dump_trig to NULL * free the description While at it, remove a NULL check in iwl_mvm_free_fw_dump_desc since kfree is NULL safe. Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: constify the parameters of a few functions in fw-dbg.cEmmanuel Grumbach5-13/+13
The debug functions of fw-dbg.c don't really need to modify the trigger and the description they receive as a parameter. Constify the pointers. Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: check minimum temperature notification lengthJohannes Berg1-1/+1
This notification will be extended with extra data, so just check that it has a minimum length, not the exact length; we might later add handling for the extra fields added and have more code to handle both versions. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: initialize gtkdata->mvm correctlyEliad Peller1-0/+1
gtkdata->mvm wasn't set in iwl_mvm_d0i3_update_keys, resulting in kernel panic in some flows (when mvm is actually used...) Fixes: a3f7ba5c8825 ("iwlwifi: update key params on d0i3 entrance/exit") Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: check PN for CCMP/GCMP in the driverJohannes Berg4-33/+245
As we're working on multi-queue RX, we want to parallelise checking the PN in order to avoid having to serialise the RX processing. It may seem that doing parallel PN checking is insecure, but it turns out to be OK because queue assignment is done based on the data in the frame (IP/TCP) and thus cannot be manipulated by an attacker, since the data is encrypted and must first have been decrypted successfully. There are some corner cases, in particular when the peer starts using fragmentation which redirects the packet to the default queue. However this redirection is remembered (for the STA, per TID) and thus cannot be exploited by an attacker either. Leave checking on the default queue (queue 0) to mac80211, since we get fragmented packets there and those are subject to stricter checks during reassembly. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: don't ask beacons when P2P GO vif and no assoc staAyala Beker1-25/+19
The commit below called iwl_mvm_mac_ctxt_changed() to handle a case that the vif is a P2P GO. However iwl_mvm_mac_ctxt_cmd_go() ignores the number of associated stations and asks the FW to pass beacons anyways. Fix this by checking ap_assoc_sta_count parameter, in iwl_mvm_mac_ctxt_cmd_go() as well, and ask the FW to pass beacons only when there's at least one associated station. Signed-off-by: Ayala Beker <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: prevent multiple stations with the same addressJohannes Berg1-0/+1
As the device (and parts of the driver) cannot deal with having the same MAC address for two stations (on two virtual interfaces), add some explicit code to prevent this case. Note that in practice this cannot happen since the device doesn't support operating with two AP/GO interfaces at the same time either, and other scenarios for this are, while not impossible, not going to happen in practice. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: remove useless WARN_ON and rely on cfg80211's combinationEmmanuel Grumbach1-2/+0
We advertise one STATION vif only, so this just can't happen. Remove this useless WARN_ON. Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: support A-MSDU in A-MPDUJohannes Berg1-0/+1
Since A-MPDU deaggregation is done in hardware, and A-MSDU deaggregation is done in software, there's no reason not to support A-MSDU in A-MPDU; set the flag to support it. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: add a non-trigger window to fw dbg triggersGolan Ben-Ami3-1/+31
Allow the user to configure a non-trigger session - a window between triggers in which the driver won't collect fw debug data. This can be useful when the frequent collection of fw data has an impact on the performance, such as debugging tx flows. Signed-off-by: Golan Ben-Ami <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: dump the radio registers when the firmware crashesEmmanuel Grumbach3-2/+46
Dumping the content of the radio registers greatly helps to debug PHY issues, which can lead to TFD queue hang. Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: fix extended dwell timeDavid Spinadel1-6/+7
FW adds 10 msec for every dwell time in low band, so we need to set 10 msec less. Don't use extended dwell time when fragmented scan is needed because FW adds 3 msec per probe and it can easily exceed max out of channel time. Fixes: c3e230b167a9 ("iwlwifi: mvm: add extended dwell time") Signed-off-by: David Spinadel <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: nvm: fix loading default NVM fileOren Givon1-1/+2
Fix loading the default NVM file, in the case where the requested NVM file isn't found in the file system. Signed-off-by: Oren Givon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: bump max API to 20Emmanuel Grumbach3-3/+3
7265D and up are now able to handle -20.ucode. Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: set max firmware version of 7265 to 17Emmanuel Grumbach1-1/+1
Just like 7260, 7265 will not have firmware releases newer than iwlwifi-7265-17.ucode. 7265D is still supported in latest firmware releases. Fixes: 628a2918afe4 ("iwlwifi: separate firmware version for 7260 devices") Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: reset mvm->scan_type when firmware is startedEmmanuel Grumbach2-1/+1
If we don't reset the scan type when the firmware is started, we will think the firmware is still configured after the interface has been brought down. When we will bring it up again, we will not configure the scan type in firmware and it will crash with the following assert: 0x0000100A | ADVANCED_SYSASSERT Fixes: 355346ba3050 ("iwlwifi: mvm: configure scheduled scan according to traffic conditions") Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: change mcc update APIMatti Gottlieb3-16/+100
New functionality for testing that is not relevant for this driver has been added. This required an API change. Add new cmd & response versions for the MCC update cmd & response. Add new TLV indicating that the FW is using the new API. Signed-off-by: Matti Gottlieb <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: let the firmware choose the antenna for beaconsEmmanuel Grumbach2-3/+9
The firmware knows better what antenna to choose. Old firmware still need the setting, so use a flag to know if the driver should choose the antenna or if the firmware can do it iself. Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: update and fix 7265 series PCI IDsOren Givon1-2/+3
Update and fix some 7265 PCI IDs entries. CC: <[email protected]> [3.13+] Signed-off-by: Oren Givon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: dvm: fix WoWLANEmmanuel Grumbach1-0/+3
My commit below introduced a mutex in the transport to prevent concurrent operations. To do so, it added a flag (is_down) to make sure the transport is in the right state. This uncoverred an bug that didn't cause any harm until now: iwldvm calls stop_device and then starts the firmware without calling start_hw in between. While this flow is fine from the device configuration point of view (register, etc...), it is now forbidden by the new is_down flag. This led to this error to appear: iwlwifi 0000:05:00.0: Can't start_fw since the HW hasn't been started and the suspend would fail. This fixes: https://bugzilla.kernel.org/show_bug.cgi?id=109591 CC: <[email protected]> [4.3+] Reported-by: Bogdan Bogush <[email protected]> Fixes=fa9f3281cbb1 ("iwlwifi: pcie: lock start_hw / start_fw / stop_device") Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2015-12-21iwlwifi: bail out in case of bad trans stateEliad Peller1-6/+18
In case of bad trans state (i.e. fw is not loaded) bail out immediately instead of calling the trans, which might not be fully initialized yet. Also add WARN_ON_ONCE to help debugging where the errorneous call is coming from. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2015-12-21iwlwifi: fix printf specifierEmmanuel Grumbach1-2/+2
Smatch warned about a bad specifier being used. Fix that. Signed-off-by: Emmanuel Grumbach <[email protected]>
2015-12-21iwlwifi: remove unused parameter from grab_nic_accessEmmanuel Grumbach7-32/+28
All the callers used silent = false. Signed-off-by: Emmanuel Grumbach <[email protected]>
2015-12-20iwlwifi: update key params on d0i3 entrance/exitEliad Peller4-45/+136
In order to let the fw do offloading properly, we need to provide various key data (e.g. PN). Configure the params on d0i3 entrance, and update them back on d0i3 exit. Since d3 code is now called in d0i3 which requires runtime pm only, make d3.0 depend on CONFIG_PM (rather than CONFIG_PM_SLEEP), and add required #ifdefs and wrappers where needed, so both CONFIG_PM=n and CONFIG_PM_RUNTIME=n configurations will build correctly. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2015-12-20iwlwifi: mvm: Change number of associated stations when station becomes ↵Ayala Beker2-11/+8
associated Currently, the number of associated stations gets updated when adding a new station or removing it. This is incorrect as it's possible that a station was inserted before it was associated Fix this by increasing/decreasing ap_assoc_sta_count whenever a station transitions in/out the associated state. Signed-off-by: Ayala Beker <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2015-12-20iwlwifi: Update PCI IDs for 8000 and 9000 seriesOren Givon1-5/+6
A new PCI IDs update to the 8000 and 9000 series. type=feature Signed-off-by: Oren Givon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2015-12-20iwlwifi: mvm: dump more registers upon errorEmmanuel Grumbach1-13/+16
These registers can help to debug PHY issues. Since this adds a significant amount of work to the debug collection phase, dump the periphery registers only if the firmware is stopped. Signed-off-by: Emmanuel Grumbach <[email protected]>
2015-12-20iwlwifi: mvm: infrastructure for frame-release messageSara Sharon4-1/+17
Incoming hardware will send frame release notifications to the reorder buffer in order to update with the BA session status and up to date NSSN. This patch enables the API. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2015-12-20iwlwifi: mvm: add 9000 series RX processingJohannes Berg5-4/+385
Convert the convert the new infrastructure added by previous patches to actually use the new RX descriptor layout. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>