summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cfg80211: Add support to sched scan to report better BSSsvamsi krishna2017-01-133-11/+99
| | | | | | | | | | | | Enhance sched scan to support option of finding a better BSS while in connected state. Firmware scans the medium and reports when it finds a known BSS which has better RSSI than the current connected BSS. New attributes to specify the relative RSSI (compared to the current BSS) are added to the sched scan to implement this. Signed-off-by: vamsi krishna <vamsin@qti.qualcomm.com> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: Add support for randomizing TA of Public Action framesvamsi krishna2017-01-132-2/+25
| | | | | | | | | | | | | | | | | | | | | Add support to use a random local address (Address 2 = TA in transmit and the same address in receive functionality) for Public Action frames in order to improve privacy of WLAN clients. Applications fill the random transmit address in the frame buffer in the NL80211_CMD_FRAME command. This can be used only with the drivers that indicate support for random local address by setting the new NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA and/or NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED in ext_features. The driver needs to configure receive behavior to accept frames to the specified random address during the time the frame exchange is pending and such frames need to be acknowledged similarly to frames sent to the local permanent address when this random address functionality is not used. Signed-off-by: vamsi krishna <vamsin@qti.qualcomm.com> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wext: uninline stream addition functionsJohannes Berg2017-01-132-60/+74
| | | | | | | | | | | | | | With 78, 111 and 85 bytes respectively (on x86-64), the functions iwe_stream_add_event(), iwe_stream_add_point() and iwe_stream_add_value() really shouldn't be inlines. It appears that at least my compiler already decided the same, and created a single instance of each one of them for each file using it, but that's still a number of instances in the system overall, which this reduces. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: set wifi_acked[_valid] bits for transmitted SKBsJohannes Berg2017-01-121-0/+5
| | | | | | | | | There may be situations in which the in-kernel originator of an SKB cares about its wifi transmission status. To have that, set the wifi_acked[_valid] bits before freeing/orphaning the SKB if the destructor is set. The originator can then use it in there. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Add RX flag to indicate ICV strippedDavid Spinadel2017-01-123-3/+8
| | | | | | | | | Add a flag that indicates that the WEP ICV was stripped from an RX packet, allowing the device to not transfer that if it's already checked. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wext: handle NULL extra data in iwe_stream_add_point betterArnd Bergmann2017-01-121-1/+2
| | | | | | | | | | | | | | | | | | | | | gcc-7 complains that wl3501_cs passes NULL into a function that then uses the argument as the input for memcpy: drivers/net/wireless/wl3501_cs.c: In function 'wl3501_get_scan': include/net/iw_handler.h:559:3: error: argument 2 null where non-null expected [-Werror=nonnull] memcpy(stream + point_len, extra, iwe->u.data.length); This works fine here because iwe->u.data.length is guaranteed to be 0 and the memcpy doesn't actually have an effect. Making the length check explicit avoids the warning and should have no other effect here. Also check the pointer itself, since otherwise we get warnings elsewhere in the code. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: wext does not need to set monitor channel in managed modeJorge Ramirez-Ortiz2017-01-111-23/+0
| | | | | | | | | | | | | | | | | | There is not a valid reason to attempt setting the monitor channel while in managed mode. Since this code path only deals with this mode, remove the code block. Johannes: I'll note that the comment indicated it was for backward compatibility, but the code wasn't functional since switching the monitor channel isn't supported (any more?) when in managed mode, as that mode owns the channel configuration. Additionally, since monitor can't be done on a managed mode interface, this would only have had any effect to start with if a separate monitor interface is present, in which case it's better to change the channel through that anyway, if even possible. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECTAndrzej Zaborowski2017-01-097-1/+76
| | | | | | | | | | | | | | | Disconnect or deauthenticate when the owning socket is closed if this flag is supplied to CMD_CONNECT or CMD_ASSOCIATE. This may be used to ensure userspace daemon doesn't leave an unmanaged connection behind. In some situations it would be possible to account for that, to some degree, in the deamon restart code or in the up/down scripts without the use of this attribute. But there will be systems where the daemon can go away for varying periods without a warning due to local resource management. Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: size various nl80211 messages correctlyJohannes Berg2017-01-091-8/+8
| | | | | | | | | | | | | | | | | | | | | Ilan reported that sometimes nl80211 messages weren't working if the frames being transported got very large, which was really a problem for userspace-to-kernel messages, but prompted me to look at the code. Upon review, I found various places where variable-length data is transported in an nl80211 message but the message isn't allocated taking that into account. This shouldn't cause any problems since the frames aren't really that long, apart in one place where two (possibly very long frames) might not fit. Fix all the places (that I found) that get variable length data from the driver and put it into a message to take the length of the variable data into account. The 100 there is just a safe constant for the remaining message overhead (it's usually around 50 for most messages.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* rfkill: Add rfkill-any LED triggerMichał Kępień2017-01-091-1/+71
| | | | | | | | | | | Add a new "global" (i.e. not per-rfkill device) LED trigger, rfkill-any, which may be useful on laptops with a single "radio LED" and multiple radio transmitters. The trigger is meant to turn a LED on whenever there is at least one radio transmitter active and turn it off otherwise. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: support ieee80211-freq-limit DT propertyRafał Miłecki2017-01-064-0/+170
| | | | | | | | | | | | | | | | This patch adds a helper for reading that new property and applying limitations of supported channels specified this way. It is used with devices that normally support a wide wireless band but in a given config are limited to some part of it (usually due to board design). For example a dual-band chipset may be able to support one band only because of used antennas. It's also common that tri-band routers have separated radios for lower and higher part of 5 GHz band and it may be impossible to say which is which without a DT info. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> [add new function to documentation, fix link] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: move function checking range fit to util.cRafał Miłecki2017-01-063-20/+25
| | | | | | | | It is needed for another cfg80211 helper that will be out of reg.c so move it to common util.c file and make it non-static. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* dt-bindings: document common IEEE 802.11 frequency limit propertyRafał Miłecki2017-01-061-0/+24
| | | | | | | | | This new file should be used for properties that apply to all wireless devices. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wireless: move IEEE80211_NUM_ACS to ieee80211.hJohannes Berg2017-01-052-1/+2
| | | | | | | This constant isn't really specific to mac80211, so move it "up" a level to ieee80211.h Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: only pass sband to set_mandatory_flags_band()Arend Van Spriel2017-01-051-4/+4
| | | | | | | | | | | The supported band structure contains the band is applies to so no need to pass it separately. Also added a default case to the switch for completeness. The current code base does not call this function with NUM_NL80211_BANDS but kept that case statement although default case would cover that. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: sysfs: use wiphy_name()Johannes Berg2017-01-041-2/+4
| | | | | | | | Instead of open-coding dev_name(), use the wiphy_name() inline to make the code easier to understand. While at it, clean up some coding style. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: fix example REG_RULE usage in DocumentationRafał Miłecki2017-01-021-3/+3
| | | | | | | | | It's just an example, but lets make it look more real to don't confuse people about possible REG_RULE usage. Channels are 20 MHz wide, so start and end frequencies are 10 MHz away from the center one. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: update wireless-regdb repo url in DocumentationRafał Miłecki2017-01-021-1/+1
| | | | | | | | It's maintained by Seth Forshe for a long time now. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Cc: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Fix addition of mesh configuration elementIlan peer2017-01-021-2/+0
| | | | | | | | | | | | | The code was setting the capabilities byte to zero, after it was already properly set previously. Fix it. The bug was found while debugging hwsim mesh tests failures that happened since the commit mentioned below. Fixes: 76f43b4c0a93 ("mac80211: Remove invalid flag operations in mesh TSF synchronization") Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Masashi Honma <masashi.honma@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* Revert "rfkill: Add rfkill-any LED trigger"Johannes Berg2016-12-201-74/+1
| | | | | | | | | | | | | This reverts commit 73f4f76a196d7adb11a1e192bd8024fe0bc83910. As Mike reported, and I should've seen in review, we can't call the new LED functions, which acquire the mutex, from places like rfkill_set_sw_state() that are documented to be callable from any context the user likes to use. For Mike's case it led to a deadlock, but other scenarios are possible. Reported-by: Михаил Кринкин <krinkin.m.u@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* nl80211: better describe field in struct nl80211_bss_select_rssi_adjustArend Van Spriel2016-12-161-2/+3
| | | | | | | | | The two fields in struct nl80211_bss_select_rssi_adjust did not state their type or unit. Adding documentation. Reported-by: Jouni Malinen <j@w1.fi> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* nl80211: rework {sched_,}scan event related functionsArend Van Spriel2016-12-163-34/+15
| | | | | | | | | | | | | A couple of functions used with scan events were named with term "send" although they were only preparing the the event message so renamed those. Also remove nl80211_send_sched_scan_results() in favor of just calling nl80211_send_sched_scan() with the right value. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> [mention nl80211_send_sched_scan_results() in the commit log] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* rfkill: hide unused goto labelArnd Bergmann2016-12-161-0/+2
| | | | | | | | | | | | | | A cleanup introduced a harmless warning in some configurations: net/rfkill/core.c: In function 'rfkill_init': net/rfkill/core.c:1350:1: warning: label 'error_input' defined but not used [-Wunused-label] This adds another #ifdef around the label to match that around the caller. Fixes: 6124c53edeea ("rfkill: Cleanup error handling in rfkill_init()") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: minstrel: avoid port control frames for samplingThomas Huehn2016-12-151-0/+5
| | | | | | | | Makes connections more reliable Signed-off-by: Thomas Huehn <thomas.huehn@evernet-eg.de> Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: minstrel_ht: remove obsolete #if for >= 3 streamsFelix Fietkau2016-12-151-20/+0
| | | | | | | | This was added during early development when 3x3 hardware was not very common yet. This is completely unnecessary now. Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: minstrel: make prob_ewma u16 instead of u32Felix Fietkau2016-12-151-1/+1
| | | | | | | Saves about 1.2 KiB memory per station Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: minstrel: store probability variance instead of standard deviationFelix Fietkau2016-12-154-19/+30
| | | | | | | | | | | This avoids the costly int_sqrt calls in the statistics update and moves it to the debugfs code instead. This also fixes an overflow in the previous standard deviation calculation. Signed-off-by: Thomas Huehn <thomas.huehn@evernet-eg.de> Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: minstrel: reduce MINSTREL_SCALEFelix Fietkau2016-12-151-1/+1
| | | | | | | | | The loss of a bit of extra precision does not hurt the calculation, 12 bits is still enough to calculate probabilities well. Reducing the scale makes it easier to avoid overflows Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: minstrel: remove cur_prob from debugfsFelix Fietkau2016-12-154-26/+18
| | | | | | | | | This field is redundant, because it is simply last success divided by last attempt count. Removing it from the rate stats struct saves about 1.2 KiB per HT station. Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: check for MCS in ieee80211_duration before fetching chanctxFelix Fietkau2016-12-151-4/+4
| | | | | | | Makes the code a bit more efficient Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: minstrel_ht: make att_hist and succ_hist u32 instead of u64Felix Fietkau2016-12-151-1/+1
| | | | | | | | They are only used for debugging purposes and take a very long time to overflow. Visibly reduces the size of the per-sta rate control data. Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: minstrel_ht: move short preamble check out of get_rateFelix Fietkau2016-12-151-17/+5
| | | | | | | | Test short preamble support in minstrel_ht_update_caps instead of looking at the per-packet flag. Makes the code more efficient. Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: minstrel_ht: move supported bitrate mask out of group dataFelix Fietkau2016-12-153-22/+22
| | | | | | | | Improves dcache footprint by ensuring that fewer cache lines need to be touched. Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: only alloc mem if a station doesn't exist yetKoen Vandeputte2016-12-151-7/+7
| | | | | | | | This speeds up the function in case a station already exists by avoiding calling an expensive kzalloc just to free it again after the next check. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Use appropriate name for functions and messagesMasashi Honma2016-12-135-13/+13
| | | | | | | These functions drifts TSF timers, not TBTT. Signed-off-by: Masashi Honma <masashi.honma@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Remove invalid flag operations in mesh TSF synchronizationMasashi Honma2016-12-133-15/+0
| | | | | | | | | | | | | | | mesh_sync_offset_adjust_tbtt() implements Extensible synchronization framework ([1] 13.13.2 Extensible synchronization framework). It shall not operate the flag "TBTT Adjusting subfield" ([1] 8.4.2.100.8 Mesh Capability), since it is used only for MBCA ([1] 13.13.4 Mesh beacon collision avoidance, see 13.13.4.4.3 TBTT scanning and adjustment procedures for detail). So this patch remove the flag operations. [1] IEEE Std 802.11 2012 Signed-off-by: Masashi Honma <masashi.honma@gmail.com> [remove adjusting_tbtt entirely, since it's now unused] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* rfkill: Add rfkill-any LED triggerMichał Kępień2016-12-131-0/+73
| | | | | | | | | | | | | | | | Add a new "global" (i.e. not per-rfkill device) LED trigger, rfkill-any, which may be useful on laptops with a single "radio LED" and multiple radio transmitters. The trigger is meant to turn a LED on whenever there is at least one radio transmitter active and turn it off otherwise. This requires taking rfkill_global_mutex before calling rfkill_set_block() in rfkill_resume(): since __rfkill_any_led_trigger_event() is called from rfkill_set_block() unconditionally, each caller of the latter needs to take care of locking rfkill_global_mutex. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* rfkill: Cleanup error handling in rfkill_init()Michał Kępień2016-12-131-11/+12
| | | | | | | | Use a separate label per error condition in rfkill_init() to make it a bit cleaner and easier to extend. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Show pending txqlen in debugfs.Ben Greear2016-12-131-0/+27
| | | | | | | | Could be useful for debugging memory consumption issues, and perhaps power-save as well. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Suppress NEW_PEER_CANDIDATE event if no roomMasashi Honma2016-12-131-6/+8
| | | | | | | | | Previously, kernel sends NEW_PEER_CANDIDATE event to user land even if the found peer does not have any room to accept other peer. This causes continuous connection trials. Signed-off-by: Masashi Honma <masashi.honma@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: multicast to unicast conversionMichael Braun2016-12-134-1/+137
| | | | | | | | | | | | | | | | | | | | | | | Add the ability for an AP (and associated VLANs) to perform multicast-to-unicast conversion for ARP, IPv4 and IPv6 frames (possibly within 802.1Q). If enabled, such frames are to be sent to each station separately, with the DA replaced by their own MAC address rather than the group address. Note that this may break certain expectations of the receiver, such as the ability to drop unicast IP packets received within multicast L2 frames, or the ability to not send ICMP destination unreachable messages for packets received in L2 multicast (which is required, but the receiver can't tell the difference if this new option is enabled.) This also doesn't implement the 802.11 DMS (directed multicast service). Signed-off-by: Michael Braun <michael-dev@fami-braun.de> [use true/false, rename label to the correct "multicast", use __be16 for ethertype and network order for constants] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Remove unused 'beaconint_us' variableKirtika Ruchandani2016-12-131-4/+0
| | | | | | | | | | | | | | | Commit 4a733ef1bea7 (mac80211: remove PM-QoS listener) removed all use of 'beaconint_us' from ieee80211_recalc_ps() but left the variable intact. Compiling with W=1 gives the following warning, fix it. net/mac80211/mlme.c: In function ‘ieee80211_recalc_ps’: net/mac80211/mlme.c:1481:7: warning: variable ‘beaconint_us’ set but not used [-Wunused-but-set-variable] iee80211_tu_to_usec has no side-effects and is safe to remove. Fixes: 4a733ef1bea7 ("mac80211: remove PM-QoS listener") Cc: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Remove unused 'sband' and 'local' variablesKirtika Ruchandani2016-12-131-4/+0
| | | | | | | | | | | | | | | | | | | | | | | Commit b1bce14a7954 (mac80211: update opmode when adding new station) refactored ieee80211_vht_handle_opmode into __ieee80211_vht_handle_opmode and ieee80211_vht_handle_opmode leaving a set but unused variable (sband) in the former. Compiling with W=1 gives the following warning, fix it. net/mac80211/vht.c: In function ‘__ieee80211_vht_handle_opmode’: net/mac80211/vht.c:424:35: warning: variable ‘sband’ set but not used [-Wunused-but-set-variable] Remove 'struct ieee80211_local* local' as well, it was only used to set sband. This is a harmless warning, and is only being fixed to reduce the noise with W=1 in the kernel. Fixes: b1bce14a7954 ("mac80211: update opmode when adding new station") Cc: Marek Kwaczynski <marek.kwaczynski@tieto.com> Cc: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Remove unused 'len' variableKirtika Ruchandani2016-12-131-5/+3
| | | | | | | | | | | | | | | | | | | | Commit 633e27132625 (mac80211: split sched scan IEs) introduced the len variable to keep track of the return value of ieee80211_build_preq_ies() but did not use it. Compiling with W=1 gives the following warning, fix it. net/mac80211/scan.c: In function ‘__ieee80211_request_sched_scan_start’: net/mac80211/scan.c:1123:9: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] This is a harmless warning and is only being fixed to reduce the noise with W=1 in the kernel. Fixes: 633e27132625 ("mac80211: split sched scan IEs") Cc: David Spinadel <david.spinadel@intel.com> Cc: Alexander Bondar <alexander.bondar@intel.com> Cc: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Remove unused 'i' variableKirtika Ruchandani2016-12-131-3/+1
| | | | | | | | | | | | | | | | | | Commit 5bcae31d9 (mac80211: implement multi-vif in-place reservations) introduced ieee80211_vif_use_reserved_switch() with a counter variable 'i' that is set but not used. Compiling with W=1 gives the following warning, fix it. net/mac80211/chan.c: In function ‘ieee80211_vif_use_reserved_switch’: net/mac80211/chan.c:1273:6: warning: variable ‘i’ set but not used [-Wunused-but-set-variable] This is a harmless warning, and is only being fixed to reduce the noise obtained with W=1 in the kernel. Fixes: 5bcae31d9 ("mac80211: implement multi-vif in-place reservations") Cc: Michal Kazior <michal.kazior@tieto.com> Cc: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Remove unused 'struct rate_control_ref' variableKirtika Ruchandani2016-12-131-4/+0
| | | | | | | | | | | | | | | Commit 3b17fbf87d5d introduced sta_get_expected_throughput() leaving variable 'struct rate_control_ref* ref' set but unused. Compiling with W=1 gives the following warning, fix it. net/mac80211/sta_info.c: In function ‘sta_set_sinfo’: net/mac80211/sta_info.c:2052:27: warning: variable ‘ref’ set but not used [-Wunused-but-set-variable] Fixes: 3b17fbf87d5d ("mac80211: mesh: Add support for HW RC implementation") Cc: Johannes Berg <johannes.berg@intel.com> Cc: Maxim Altshul <maxim.altshul@ti.com> Signed-off-by: Kirtika Ruchandani <kirtika@google.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Remove unused 'rates_idx' variableKirtika Ruchandani2016-12-131-2/+1
| | | | | | | | | | | | | | | | | | Commit f027c2aca0cf introduced 'rates_idx' in ieee80211_tx_status_noskb but did not use it. Compiling with W=1 gives the following warning, fix it. mac80211/status.c: In function ‘ieee80211_tx_status_noskb’: mac80211/status.c:636:6: warning: variable ‘rates_idx’ set but not used [-Wunused-but-set-variable] This is a harmless warning, and is only being fixed to reduce the noise generated with W=1. Fixes: f027c2aca0cf ("mac80211: add ieee80211_tx_status_noskb") Cc: Johannes Berg <johannes.berg@intel.com> Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Kirtika Ruchandani <kirtika@google.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Remove unused 'struct ieee80211_rx_status' ptrKirtika Ruchandani2016-12-131-4/+0
| | | | | | | | | | | | | | | Commit 554891e63a29 introduced 'struct ieee80211_rx_status' in ieee80211_rx_h_defragment but did not use it. Compiling with W=1 gives the following warning, fix it. net/mac80211/rx.c: In function ‘ieee80211_rx_h_defragment’: net/mac80211/rx.c:1911:30: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] Fixes: 554891e63a29 ("mac80211: move packet flags into packet") Cc: Johannes Berg <johannes.berg@intel.com> Cc: John W. Linville <linville@tuxdriver.com> Signed-off-by: Kirtika Ruchandani <kirtika@google.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* nl80211: multicast_to_unicast can be changed while IFF_UPMichael Braun2016-12-131-3/+0
| | | | | | | | | There is no need to prevent toggling multicast_to_unicast while interface is already up. This change simplifies reconfiguration from hostapd. Signed-off-by: Michael Braun <michael-dev@fami-braun.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* nl80211: check NL80211_ATTR_SCHED_SCAN_INTERVAL only onceArend Van Spriel2016-12-131-4/+1
| | | | | | | | | | The presence of the NL80211_ATTR_SCHED_SCAN_INTERVAL attribute was checked in nl80211_parse_sched_scan() and nl80211_parse_sched_scan_plans() which might be a bit redundant so removing one. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>