summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mwifiex: bring in scan channel gap featureAvinash Patil2014-09-156-1/+58
| | | | | | | | | | | | | | | | | | With scan channel gap when any station/AP is active, FW comes back to connected channel for any pending data transfter after scanning each channel. We set scan channel gap TLV to FW in scan command when any of the interface is active. This enables scan channel gap in FW. Also when scan channel gap is enabled, we would scan maximum channels allowed by FW. Scan channel gap is supported only on FW with V15 FW API. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Marc Yang <yangyang@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: set passive scan type for scan requests with no ssidAvinash Patil2014-09-151-1/+1
| | | | | | | | | | | | It was observed that station would sent probe request even when scan type has been set as passive during iw scan. This was happening because driver sets passive scan type only when channel has IEEE80211_CHAN_NO_IR flag set. Along with this, add condition to check if no ssids are specified in scan request so as to mark such scan request passive. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: minor cleanup in multiport aggregationAmitkumar Karwar2014-09-151-9/+2Star
| | | | | | | | | | | 'mp_data_port_mask' and 'mp_end_port' gives correct information even for the chipsets supporting SDIO new mode (32 ports). We will get rid of this chip specific handling. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: fix a bug in Tx multiport aggregationAmitkumar Karwar2014-09-151-4/+2Star
| | | | | | | | | | | | | | | | | When aggregation port limit is reached, we stop aggregation and the data is sent to firmware. It is observed that one less packet than the port limit is aggregated in this case. ex. 15 instead of 16. The reason is we have redundant port limit checks before current packet is added to aggregation buffer. The issue is fixed by removing these checks. We already have necessary check in precopy current buffer handling. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: fix 5G association failure after leaving 2.4G IBSSXinming Hu2014-09-151-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | When assocaiting to an AP , mwifiex set supported data rates based on target AP's capability. For 5G AP(11a mode), a/n/ac mode would possibly be set. However, for some chips which dont support 11AC mode current config_bands will be used instead. For example, if we join an IBSS in 11b mode ,adapter->config_bands will be set to 1(11b mode). Then we leave IBSS ,and try to connect 5G a/n mode AP. At this time , only 11b mode data rates will be supported in assoc request , which result in assoc failure with reason code 18: Association denied due to requesting station not supporting all rates. This patch fix such a cornel case, by adding additional check for current chip's 11ac capability. Reported-by: Andreas Fenkart <afenkart@gmail.com> Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Marc Yang <yangyang@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: support for event done interruptAvinash Patil2014-09-152-2/+10
| | | | | | | | | | This patch adds support for writing CPU event interrupt done back to device. Patch also increases interrupt buffer ring size from 4 to 8. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: rework internal scan for associationAvinash Patil2014-09-151-1/+26
| | | | | | | | | | | | | | | | | There was an issue with internal scan during association wherein we would complete internal scan on first scan command response. This would cause association failure if AP is not found in first scan response e.g. APs from A band. This patch fixes this issue by completing internal scan only when all scan commands from scan pending queue and command pending queue are sent to FW and response to last scan command is received. Tested-by: Xinmin Hu <huxm@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Marc Yang <yangyang@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: avoid processing RX packets with invalid lengthAvinash Patil2014-09-151-6/+14
| | | | | | | | | | | | | | If rx_len received in interface header from FW is more than RX buffer size, skb_put for such length results into skb_panic. Avoid this by not processing such packets. We just print a warning for such packets and free skb. Reviewed-by: Paul Stewart <pstew@chromium.org> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marc Yang <yangyang@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: fix probable memory corruption while processing TDLS frameAvinash Patil2014-09-151-1/+3
| | | | | | | | | | Size of RSN IE buffer in driver is 254 while maximum size of received buffer to be copied to RSN IE buffer can be 255. Add boundary check to copy maximum of 254 bytes into RSN IE buffer. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: set fw api info for backword compatibilityAvinash Patil2014-09-151-0/+1
| | | | | | | | | If we dont set FW API info here, for older FW releases where FW API is not available in GET_HW_SPEC, API version would remain 0. This may cause issues with 11ac if older FW is used with newer driver. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: HT-PHY: Update values for frequency calibrationRafał Miłecki2014-09-151-66/+248
| | | | | | | | Previous values were extracted from MMIO dump of some old 5.x driver, new ones should improve calibration. This also adds values for 5 GHz. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: HT-PHY: Implement band switchingRafał Miłecki2014-09-153-6/+40
| | | | | | | It works pretty much the same way as in N-PHY. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix beacon processing in offchannelSujith Manoharan2014-09-151-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When interfaces of different types are present in a context and an offchannel request is received on a STA interface, we end up trying to process beacons received when we are offchannel. This hits the below warning since offchannel will not have proper beacon parameters. Fix this by not processing beacons received when we are offchannel. ------------[ cut here ]------------ WARNING: CPU: 1 PID: 0 at ../drivers/net/wireless/ath/ath9k/recv.c:552 ath_rx_tasklet+0xf8f/0x1020 [ath9k]() CPU: 1 PID: 0 Comm: swapper/1 Tainted: G O 3.17.0-rc4-wl-debug #16 Hardware name: LENOVO 28427ZQ/INVALID, BIOS 6JET58WW (1.16 ) 09/17/2009 0000000000000000 15916787056abba3 ffff88013b603d08 ffffffff8156af94 ffff88013b603d50 ffff88013b603d40 ffffffff81070dbd ffff8800a84bb300 ffff8800b05db358 ffff8800a84cc578 ffff8800a84bb300 ffff8800b05daa40 Call Trace: <IRQ> [<ffffffff8156af94>] dump_stack+0x4d/0x6f [<ffffffff81070dbd>] warn_slowpath_common+0x7d/0xa0 [<ffffffff81070e3c>] warn_slowpath_fmt+0x5c/0x80 [<ffffffff81572143>] ? _raw_spin_lock_irqsave+0x83/0xa0 [<ffffffffa09d04a6>] ? ath_rx_tasklet+0x9f6/0x1020 [ath9k] [<ffffffffa09d0a3f>] ath_rx_tasklet+0xf8f/0x1020 [ath9k] [<ffffffffa09cd4f4>] ath9k_tasklet+0xf4/0x310 [ath9k] [<ffffffff81075a97>] tasklet_action+0xe7/0xf0 [<ffffffff8107508a>] __do_softirq+0x12a/0x340 [<ffffffff8107544e>] irq_exit+0x9e/0xc0 [<ffffffff81575e56>] do_IRQ+0x56/0xe0 [<ffffffff81573c72>] common_interrupt+0x72/0x72 <EOI> [<ffffffff81421037>] ? cpuidle_enter_state+0x67/0x1a0 [<ffffffff81421257>] cpuidle_enter+0x17/0x20 [<ffffffff810b3ebe>] cpu_startup_entry+0x3ce/0x420 [<ffffffff81048563>] start_secondary+0x233/0x2c0 ---[ end trace f15c3e33ba78d840 ]--- ------------[ cut here ]------------ Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: btcoexist: avoid format string in printkLarry Finger2014-09-151-1/+1
| | | | | | | | | | Recent changes to this driver inadvertently reverted the change made by Kees Cook in commit 6437f51ec3. Reported-by: Kees Cook <keescook@chromium.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Kees Cook <keescook@chromium.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix radar parameters initializationLorenzo Bianconi2014-09-152-2/+5
| | | | | | | | Move ath9k_hw_set_radar_params() in ath9k_hw_reset() in order to avoid AR_PHY_RADAR registers are overwritten after hw reset Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* hostap: proc: substitute loops by %*phNAndy Shevchenko2014-09-151-4/+2Star
| | | | | | | | For dumping small buffers we may use %*phN specifier instead of custom approach.. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'for-upstream' of ↵John W. Linville2014-09-155-55/+75
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
| * Bluetooth: Fix re-setting RPA as expired when deferring updateJohan Hedberg2014-09-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | The hci_update_random_address will clear the RPA_EXPIRED flag and proceed with setting a new one if the flag was set. However, the set_random_addr() function that is called may choose to defer the update to a later moment. In such a case the flag would incorrectly remain unset unless set_random_addr() re-sets it. This patch fixes the issue. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Expire RPA if encryption failsJohan Hedberg2014-09-111-0/+6
| | | | | | | | | | | | | | | | | | | | If encryption fails and we're using an RPA it may be because of a conflict with another device. To avoid repeated failures the safest action is to simply mark the RPA as expired so that a new one gets generated as soon as the connection drops. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Avoid hard-coded IO capability values in SMPJohan Hedberg2014-09-111-2/+2
| | | | | | | | | | | | | | | | This is a trivial change to use a proper define for the NoInputNoOutput IO capability instead of hard-coded values. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix L2CAP information request handling for fixed channelsJohan Hedberg2014-09-111-20/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even if we have no connection-oriented channels we should perform the L2CAP Information Request procedures before notifying L2CAP channels of the connection. This is so that the L2CAP channel implementations can perform checks on what the remote side supports (e.g. does it support the fixed channel in question). So far the code has relied on the l2cap_do_start() function to initiate the Information Request, however l2cap_do_start() is used on a per-channel basis and only for connection-oriented channels. This means that if there are no connection-oriented channels on the system we would never start the Information Request procedure. This patch creates a new l2cap_request_info() helper function to initiate the Information Request procedure, and ensures that it is called whenever a BR/EDR connection has been established. The patch also updates fixed channels to be notified of connection readiness only once the Information Request procedure has completed. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add smp_ltk_sec_level() helper functionJohan Hedberg2014-09-113-5/+10
| | | | | | | | | | | | | | | | | | There are several places that need to determine the security level that an LTK can provide. This patch adds a convenience function for this to help make the code more readable. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix SMP security level when we have no IO capabilitiesJohan Hedberg2014-09-111-2/+10
| | | | | | | | | | | | | | | | | | | | When the local IO capability is NoInputNoOutput any attempt to convert the remote authentication requirement to a target security level is futile. This patch makes sure that we set the target security level at most to MEDIUM if the local IO capability is NoInputNoOutput. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Centralize disallowing SMP commands to a single placeJohan Hedberg2014-09-111-16/+1Star
| | | | | | | | | | | | | | | | | | | | | | All the cases where we mark SMP commands as dissalowed are their respective command handlers. We can therefore simplify the code by always clearing the bit immediately after testing it. This patch converts the corresponding test_bit() call to a test_and_clear_bit() call and also removes the now unused SMP_DISALLOW_CMD macro. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix ignoring unknown SMP authentication requirement bitsJohan Hedberg2014-09-111-9/+13
| | | | | | | | | | | | | | | | | | | | | | The SMP specification states that we should ignore any unknown bits from the authentication requirement. We already have a define for masking out unknown bits but we haven't used it in all places so far. This patch adds usage of the AUTH_REQ_MASK to all places that need it and ensures that we don't pass unknown bits onward to other functions. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Remove unnecessary early initialization of variableJohan Hedberg2014-09-111-6/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | We do nothing else with the auth variable in smp_cmd_pairing_rsp() besides passing it to tk_request() which in turn only cares about whether one of the sides had the MITM bit set. It is therefore unnecessary to assign a value to it until just before calling tk_request(), and this value can simply be the bit-wise or of the local and remote requirements. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix allowing SMP Signing info PDUJohan Hedberg2014-09-101-0/+2
| | | | | | | | | | | | | | | | | | | | If the remote side is not distributing its IRK but is distributing the CSRK the next PDU after master identification is the Signing Information. This patch fixes a missing SMP_ALLOW_CMD() for this in the smp_cmd_master_ident() function. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | Merge tag 'mac80211-next-for-john-2014-09-12' of ↵John W. Linville2014-09-1556-399/+1115
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg <johannes@sipsolutions.net> says: "This time, I have some rate minstrel improvements, support for a very small feature from CCX that Steinar reverse-engineered, dynamic ACK timeout support, a number of changes for TDLS, early support for radio resource measurement and many fixes. Also, I'm changing a number of places to clear key memory when it's freed and Intel claims copyright for code they developed." Conflicts: net/mac80211/iface.c Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | mac80211: replace SMPS hw flags with wiphy feature bitsEliad Peller2014-09-119-35/+19Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new static_smps / dynamic_smps feature bits instead of mac80211-internal hw flags. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | mac80211: set smps_mode according to ap paramsEliad Peller2014-09-111-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Take the requested smps mode from the ap params (instead of always starting with SMPS_OFF) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | cfg80211: allow requesting SMPS mode on ap startEliad Peller2014-09-113-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add feature bits to indicate device support for static-smps and dynamic-smps modes. Add a new NL80211_ATTR_SMPS_MODE attribue to allow configuring the smps mode to be used by the ap (e.g. configuring to ap to dynamic smps mode will reduce power consumption while having minor effect on throughput) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | mac80211: set network header in TDLS framesArik Nemtsov2014-09-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Correctly mark the network header location in mac80211-generated TDLS frames. These may be used by lower-level drivers. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | cfg80211/mac80211: add wmm info to assoc eventEliad Peller2014-09-115-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Userspace might need to know what queues are configured for uapsd (e.g. for setting proper default values in tspecs). Add this bitmap to the association event (inside wmm nested attribute) Add additional parameter to cfg80211_rx_assoc_resp, and update its callers. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | cfg80211: add WMM traffic stream APIJohannes Berg2014-09-116-1/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add nl80211 and driver API to validate, add and delete traffic streams with appropriate settings. The API calls for userspace doing the action frame handshake with the peer, and then allows only to set up the parameters in the driver. To avoid setting up a session only to tear it down again, the validate API is provided, but the real usage later can still fail so userspace must be prepared for that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | mac80211: add TDLS connection timeoutLiad Kaufman2014-09-112-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding a timeout for tearing down a TDLS connection that hasn't had ACKed traffic sent through it for a certain amount of time. Since we have no other monitoring facility to indicate the existance (or non-existance) of a peer, this patch will cause a peer to be considered as unavailable if for some X time at least some Y packets have all not been ACKed. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | mac80211: improve minstrel_ht rate sorting by throughput & probabilityThomas Huehn2014-09-113-119/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch improves the way minstrel_ht sorts rates according to throughput and success probability. 3 FOR-loops across the entire rate and mcs group set in function minstrel_ht_update_stats() which where used to determine the fastest, second fastest and most robust rate are reduced to 2 FOR-loop. The sorted list of rates according throughput is extended to the best four rates as we need them in upcoming joint rate and power control. The sorting is done via the new function minstrel_ht_sort_best_tp_rates(). The annotation of those 4 best throughput rates in the debugfs file rc-stats is changes to: "A,B,C,D", where A is the fastest rate and C the 4th fastest. Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Tested-by: Stefan Venz <ikstream86@gmail.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | mac80211: Unify rate statistic variables between Minstrel & Minstrel_HTThomas Huehn2014-09-114-97/+85Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minstrel and Mintrel_HT used there own structs to keep track of rate statistics. Unify those variables in struct minstrel_rate_states and move it to rc80211_minstrel.h for common usage. This is a clean-up patch to prepare Minstrel and Minstrel_HT codebase for upcoming TPC. Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | cfg80211: clear nl80211 messages carrying keys after processingJohannes Berg2014-09-111-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | Clear any nl80211 messages that might contain keys after processing them to avoid leaving their data in memory "forever" after they've been freed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | cfg80211: don't put kek/kck/replay counter on the stackJohannes Berg2014-09-112-13/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to put the values on the stack, just pass a pointer to the data in the nl80211 message. This reduces stack usage and avoids potential issues with putting sensitive data on the stack. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | cfg80211: clear wext keys when freeing and removing themJohannes Berg2014-09-112-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | When freeing the keys stored for wireless extensions, clear the memory to avoid having the key material stick around in memory "forever". Similarly, when userspace overwrites a key, actually clear it instead of just setting the key length to zero. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | mac80211: clear key material when freeing keysJohannes Berg2014-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | When freeing the key, clear the memory to avoid having the key material stick around in memory "forever". Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | cfg80211: clear connect keys when freeing themJohannes Berg2014-09-115-11/+11
| | | | | | | | | | | | | | | | | | | | | When freeing the connect keys, clear the memory to avoid having the key material stick around in memory "forever". Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | mac80211: annotate MMIC head/tailroom warningJohannes Berg2014-09-081-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This message occasionally triggers for some people as in https://bugzilla.redhat.com/show_bug.cgi?id=1111740 but it's not clear which (headroom or tailroom) is at fault. Annotate the message a bit to get more information. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | mac80211: support DTPC IE (from Cisco Client eXtensions)Steinar H. Gunderson2014-09-084-12/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux already supports 802.11h, where the access point can tell the client to reduce its transmission power. However, 802.11h is only defined for 5 GHz, where the need for this is much smaller than on 2.4 GHz. Cisco has their own solution, called DTPC (Dynamic Transmit Power Control). Cisco APs on a controller sometimes but not always send 802.11h; they always send DTPC, even on 2.4 GHz. This patch adds support for parsing and honoring the DTPC IE in addition to the 802.11h element (they do not always contain the same limits, so both must be honored); the format is not documented, but very simple. Tested (on top of wireless.git and on 3.16.1) against a Cisco Aironet 1142 joined to a Cisco 2504 WLC, by setting various transmit power levels for the given access points and observing the results. The Wireshark 802.11 dissector agrees with the interpretation of the element, except for negative numbers, which seem to never happen anyway. Signed-off-by: Steinar H. Gunderson <sgunderson@bigfoot.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | mac80211: split 802.11h parsing from transmit power policySteinar H. Gunderson2014-09-081-19/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decouple the logic of parsing the 802.11d and 802.11h IEs from the part of deciding what to do about the data (messaging, clamping to 0 dBm, doing the actual setting). This paves the way for the next patch, which introduces more data sources for transmit power limitation. Signed-off-by: Steinar H. Gunderson <sgunderson@bigfoot.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | mac80211: fix broken use of VHT/20Mhz with some APsEyal Shapira2014-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit "mac80211: disable 40MHz support in case of 20MHz AP" broke working VHT in 20Mhz with APs like Netgear R6300v2 which do not publish support for 40Mhz but allow use of VHT in 20Mhz. The break is because VHT is disabled once no HT cap doesn't indicate support for 40Mhz. This causes the assoc request to be sent without any VHT IE and the association is only HT due to this. For more details check out commit 4a817aa7 "mac80211: allow VHT with peers not capable of 40MHz" Fixes: 53b954ee4a71 ("mac80211: disable 40MHz support in case of 20MHz AP") Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | mac80211: extend set_coverage_class signatureLorenzo Bianconi2014-09-058-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend mac80211 set_coverage_class API in order to enable ACK timeout estimation algorithm (dynack) passing coverage class equals to -1 to lower drivers. Synchronize set_coverage_class routine signature with mac80211 function pointer for p54, ath9k, ath9k_htc and ath5k drivers. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | cfg80211: enable dynack through nl80211Lorenzo Bianconi2014-09-053-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable ACK timeout estimation algorithm (dynack) using mac80211 set_coverage_class API. Dynack is activated passing coverage class equals to -1 to lower drivers and it is automatically disabled setting valid value for coverage class. Define NL80211_ATTR_WIPHY_DYN_ACK flag attribute to enable dynack from userspace. In order to activate dynack NL80211_FEATURE_ACKTO_ESTIMATION feature flag must be set by lower drivers to indicate dynack capability. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | mac80211: combine roc with the "next roc" if possibleEliad Peller2014-09-051-24/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the remaining time in the current roc is not long enough, mac80211 adds the new roc right after it (if they have similar params). However, in case of multiple rocs, the "next roc" is not considered, resulting in multiple rocs, each one with its own duration. Refactor the code a bit and consider the next roc, so a single max roc will be used instead of multiple rocs (which might last much longer). Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | mac80211: adjust roc duration when combining ROCsEliad Peller2014-09-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new duration (remaining duration after the current ROC ends) was calculated but not used, making the optimization worthless. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>