aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlegacy
AgeCommit message (Collapse)AuthorFilesLines
2017-03-07iwlegacy: remove usage of txrc->max_rate_idxJohannes Berg2-2/+2
Just calculate it like mac80211 does today, so we can get rid of the calculation in mac80211 for everyone else. Signed-off-by: Johannes Berg <[email protected]>
2017-03-06wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple driversAndrew Zaborowski2-0/+4
Set the NL80211_EXT_FEATURE_CQM_RSSI_LIST wiphy extended feature wholesale in all mac80211-based drivers that do not set the IEEE80211_VIF_BEACON_FILTER flags on their interfaces. mac80211 will be processing supplied RSSI values in ieee80211_rx_mgmt_beacon and will detect when the thresholds set by ieee80211_set_cqm_rssi_range_config are crossed. Remaining (few) drivers need code to enable the firmware to monitor the thresholds. This is mostly only compile-tested. Signed-off-by: Andrew Zaborowski <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2017-02-27lib/vsprintf.c: remove %Z supportAlexey Dobriyan1-15/+15
Now that %z is standartised in C99 there is no reason to support %Z. Unlike %L it doesn't even make format strings smaller. Use BUILD_BUG_ON in a couple ATM drivers. In case anyone didn't notice lib/vsprintf.o is about half of SLUB which is in my opinion is quite an achievement. Hopefully this patch inspires someone else to trim vsprintf.c more. Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2 Signed-off-by: Alexey Dobriyan <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Rasmus Villemoes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2017-01-02Merge tag 'wireless-drivers-next-for-davem-2017-01-02' of ↵David S. Miller1-10/+10
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.11 The most notable change here is the inclusion of airtime fairness scheduling to ath9k. It prevents slow clients from hogging all the airtime and unfairly slowing down faster clients. Otherwise smaller changes and cleanup. Major changes: ath9k * cleanup eeprom endian handling * add airtime fairness scheduling ath10k * fix issues for new QCA9377 firmware version * support dev_coredump() for firmware crash dump * enable channel 169 on 5 GHz band ==================== Signed-off-by: David S. Miller <[email protected]>
2016-12-30iwlegacy: make il3945_mac_ops __ro_after_initJohannes Berg1-10/+10
There's no need for this to be only __read_mostly, since it's only written in a single way depending on the module parameter, so that can be moved into the module's __init function, and the ops can be __ro_after_init. This is a little bit safer since it means the ops can't be overwritten (accidentally or otherwise), which would otherwise cause an arbitrary function or bad pointer to be called. Signed-off-by: Johannes Berg <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-12-16Makefile: drop -D__CHECK_ENDIAN__ from cflagsMichael S. Tsirkin1-2/+0
That's the default now, no need for makefiles to set it. Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: Kalle Valo <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Acked-by: Marc Kleine-Budde <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Arend van Spriel <[email protected]>
2016-09-17Merge tag 'wireless-drivers-next-for-davem-2016-09-15' of ↵David S. Miller1-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.9 Major changes: iwlwifi * preparation for new a000 HW continues * some DQA improvements * add support for GMAC * add support for 9460, 9270 and 9170 series mwifiex * support random MAC address for scanning * add HT aggregation support for adhoc mode * add custom regulatory domain support * add manufacturing mode support via nl80211 testmode interface bcma * support BCM53573 series of wireless SoCs bitfield.h * add FIELD_PREP() and FIELD_GET() macros mt7601u * convert to use the new bitfield.h macros brcmfmac * add support for bcm4339 chip with modalias sdio:c00v02D0d4339 ath10k * add nl80211 testmode support for 10.4 firmware * hide kernel addresses from logs using %pK format specifier * implement NAPI support * enable peer stats by default ath9k * use ieee80211_tx_status_noskb where possible wil6210 * extract firmware capabilities from the firmware file ath6kl * enable firmware crash dumps on the AR6004 ath-current is also merged to fix a conflict in ath10k. ==================== Signed-off-by: David S. Miller <[email protected]>
2016-09-14iwlegacy: constify local structuresJulia Lawall1-2/+2
For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches <[email protected]>. Signed-off-by: Julia Lawall <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-12iwlegacy: use IS_ENABLED() instead of checking for built-in or moduleJavier Martinez Canillas1-2/+2
The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-07-06mac80211: Add support for beacon report radio measurementAvraham Stern1-1/+5
Add the following to support beacon report radio measurement with the measurement mode field set to passive or active: 1. Propagate the required scan duration to the device 2. Report the scan start time (in terms of TSF) 3. Report each BSS's detection time (also in terms of TSF) TSF times refer to the BSS that the interface that requested the scan is connected to. Signed-off-by: Assaf Krauss <[email protected]> Signed-off-by: Avraham Stern <[email protected]> [changed ath9k/10k, at76c59x-usb, iwlegacy, wl1251 and wlcore to match the new API] Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2016-06-14iwlegacy: avoid warning about missing bracesArnd Bergmann1-1/+2
gcc-6 warns about code in il3945_hw_txq_ctx_free() being somewhat ambiguous: drivers/net/wireless/intel/iwlegacy/3945.c:1022:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] This adds a set of curly braces to avoid the warning. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-04-12cfg80211: remove enum ieee80211_bandJohannes Berg10-122/+122
This enum is already perfectly aliased to enum nl80211_band, and the only reason for it is that we get IEEE80211_NUM_BANDS out of it. There's no really good reason to not declare the number of bands in nl80211 though, so do that and remove the cfg80211 one. Signed-off-by: Johannes Berg <[email protected]>
2016-04-07iwl4965: Fix more memory leaks in __il4965_up()Julian Calaby1-0/+2
In some of the non-success return paths, the memory allocated by iwl4965_sta_alloc_lq() in iwl4965_alloc_bcast_station() is not freed. In particular: - if the card isn't ready after il4965_prepare_card_hw() - if the card is hardware-rfkilled In the hardware rfkilled path, the driver enables the rfkill interrupt. When the card is unrfkilled and this interrupt is raised we end up calling il4965_bg_restart() which calls __il4965_up() which calls iwl4965_alloc_bcast_station() again. Suggested-by: Jia-Ju Bai <[email protected]> Signed-off-by: Julian Calaby <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-04-07iwl4965: Fix a memory leak in error handling code of __il4965_upJia-Ju Bai1-0/+1
When il4965_hw_nic_init in __il4965_up fails, the memory allocated by iwl4965_sta_alloc_lq in iwl4965_alloc_bcast_station is not freed. This patches adds il_dealloc_bcast_stations in the error handling code of __il4965_up to fix this problem. This patch has been tested in real device, and it actually fixes the bug. Signed-off-by: Jia-Ju Bai <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Julian Calaby <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-04-07iwl4965: Fix a null pointer dereference in il_tx_queue_free and ↵Jia-Ju Bai1-4/+10
il_cmd_queue_free If "txq->cmd = kzalloc(...)" in il_tx_queue_init fails, "kfree(txq->cmd[i])" in il_tx_queue_free and il_cmd_queue_free in iwl4965_hw_txq_ctx_free will causes a null pointer dereference, because txq->cmd is NULL at that time. This patch fixes this problem by adding a if-check before kfree. To avoid double free in il_tx_queue_free and il_cmd_queue_free caused by the fixing, txq->meta and txq->cmd in error handling code of il_tx_queue_init are assigned null values. Otherwise, a double free will occur. This patch has been tested in real device, and it actually fixes the bug. Thanks Stanislaw for his suggestion. Signed-off-by: Jia-Ju Bai <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Julian Calaby <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-04-07iwlegacy: Return directly if allocation fails in il_eeprom_init()Markus Elfring1-5/+3
Also remove an unused label. Signed-off-by: Markus Elfring <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> [Rewrote commit message] Signed-off-by: Julian Calaby <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-01-14mac80211: pass block ack session timeout to to driverSara Sharon2-6/+6
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-07iwlegacy: 4965-mac: constify il_sensitivity_ranges structureJulia Lawall1-1/+1
The il_sensitivity_ranges is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2015-12-11iwlegacy: mark il_adjust_beacon_interval as noinlineArnd Bergmann1-1/+1
With the new optimized do_div() code, some versions of gcc produce obviously incorrect code that leads to a link error in iwlegacy/common.o: drivers/built-in.o: In function `il_send_rxon_timing': :(.text+0xa6b4d4): undefined reference to `____ilog2_NaN' :(.text+0xa6b4f0): undefined reference to `__aeabi_uldivmod' In a few thousand randconfig builds, I have seen this problem a couple of times in this file, but never anywhere else in the kernel, so we can try to work around this in the only file that shows the behavior, by marking the il_adjust_beacon_interval function as noinline, which convinces gcc to use the unoptimized do_div() all the time. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2015-12-11iwlegacy: cleanup end of il_send_add_sta()Dan Carpenter1-6/+6
This code causes a static checker warning because we check for "if (ret == 0)" but we have already had verified that was true. Clean it up a little. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2015-11-18iwlegacy: move under intel directoryKalle Valo20-0/+38023
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <[email protected]>