summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mac80211: add debug file for mic failureSaravana2012-12-053-1/+24
| | | | | | | | | | The mic failure count provides the number of mic failures that have happened on a given key (without a countermeasure being started, since that would remove the key). Signed-off-by: Saravana <saravanad@posedge.com> [fix NULL pointer issues] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: check no-OFDM flag for channels wider than 20 MHzJohannes Berg2012-12-041-0/+3
| | | | | | | | For channels wider than 20 MHz OFDM will be used, so when checking whether or not a channel is usable, check for the no-OFDM flag if the channel is wider than 20 MHz. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: adapt slot time in IBSS modeSimon Wunderlich2012-12-041-0/+14
| | | | | | | | | | | | In 5GHz/802.11a, we are allowed to use short slot times. Doing this may increases performance by 20% for legacy connections (54 MBit/s). I can confirm this in my tests (27% more throughput using iperf), and also have a small positive effect (5% more throughput) for HT rates, tested on 1 stream. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: fix channel error on mesh joinMarco Porsch2012-12-031-1/+2
| | | | | | | | | | Fix an error on mesh join when no channel has been explicitly set beforehand. Also remove a double semicolon. Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: return if CSA is not handleSimon Wunderlich2012-12-031-0/+1
| | | | | | | | If channel contexts are enabled, the CSA should not be processed further. A return is missing here. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Fix typo in mac80211.hSimon Wunderlich2012-12-031-1/+1
| | | | | Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: simplify loop in minstrel_htJohannes Berg2012-11-301-5/+3
| | | | Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: fix BSS struct IE access racesJohannes Berg2012-11-3012-284/+353
| | | | | | | | | | | | | When a BSS struct is updated, the IEs are currently overwritten or freed. This can lead to races if some other CPU is accessing the BSS struct and using the IEs concurrently. Fix this by always allocating the IEs in a new struct that holds the data and length and protecting access to this new struct with RCU. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: remove probe response temporary buffer allocationJohannes Berg2012-11-306-30/+25
| | | | | | | Instead of allocating a temporary buffer to build IEs build them right into the SKB. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: make ieee80211_build_preq_ies saferJohannes Berg2012-11-303-17/+41
| | | | | | | | Instead of assuming 200 bytes are always enough for all the IEs we add, give the length of the buffer to the function and warn instead of overrunning. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: fix cmp_hidden_bssJohannes Berg2012-11-301-4/+14
| | | | | | | | | | The cmp_bss() comparator function uses memcmp() to compare the SSID. This means that cmp_hidden_bss() needs to similarly return a number bigger than zero (use 1) instead of -1 when ie1 is bigger than ie2, which is the case if an ie2 byte is non-zero. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: fix whitespace in scan handlingJohannes Berg2012-11-301-16/+13
| | | | | | Fix a number of indentation and similar issues. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: don't BUG_ON BSS struct issuesJohannes Berg2012-11-301-2/+4
| | | | | | | | There's no need to stop the machine, just leak the BSS entry if there's an issue with its hold counter when freeing. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: allow userspace registration for probe requests in IBSSAntonio Quartulli2012-11-301-1/+2
| | | | | | | | | This change allows userspace to register for probe request frames on an IBSS interface. Userspace then has to handle them and send replies. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: fix for mesh sync to indicate TBTT adjustmentMarco Porsch2012-11-301-0/+4
| | | | | | | | | | | | | | | Currently the mesh sync code checks, whether peers indicate TBTT adjustment, but it never sets the corresponding flag itself. By setting ifmsh->tbtt_adjusting to true, it will set the corresponding field in the mesh configuration IE of own beacons. This indication will be set in the current beacon. The TBTT adjustment will be performed afterwards, affecting the next beacon. Thus, the first beacon with stable TBTT will not indicate adjustment anymore and peers will continue tracking the new offset. Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* nl80211: Fix HT_IBSS feature check in ibss_joinSimon Wunderlich2012-11-291-0/+1
| | | | | | | | There is a standalone if, seems to be a regression of commit "nl80211/cfg80211: add VHT MCS support". Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: add debugfs file for last rx rateSaravana2012-11-291-0/+18
| | | | | | | | | Add a debugfs file showing the rate at which the last packet is received. Signed-off-by: Saravana <saravanad@posedge.com> [fix whitespace] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: re-organize the rx rate calculation logicSaravana2012-11-292-28/+35
| | | | | | | | | | | Currently the logic to fill a struct rate_info with a STA's last RX rate is accessible only in the cfg.c. As the RX rate calculation might be needed elsewhere, split this out into a separate function. Signed-off-by: Saravana <saravanad@posedge.com> [fix various whitespace issues, reword commit log] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: add debugfs file for current tx rateSaravana2012-11-291-0/+16
| | | | | | | | | | Add a debugfs file showing the current tx rate. The information available in the rc_stats file doesn't evidently provides us the current tx rate. This patch adds the support for the same. Signed-off-by: Saravana <saravanad@posedge.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: add debugfs file for last ack signalSaravana2012-11-293-0/+7
| | | | | | | | | Add a debugfs file showing the signal strength of the ack frame that is received for the currently sent tx packet Signed-off-by: Saravana <saravanad@posedge.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: Remove unused VHT chan codeMahesh Palivela2012-11-291-27/+1
| | | | | | | Cleanup of unused VHT channel config related code. Signed-off-by: Mahesh Palivela <maheshp@posedge.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: don't reinit rate control when mesh sta existsHelmut Schaa2012-11-281-1/+2
| | | | | | | | | | This fixes some unintended resets of the rate control statistics when minstrel_ht is used resulting in non-optimal throughput on mesh links. Tested-by: Emanuel Taube <emanuel.taube@gmail.com> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: reject setting masked mac addressesHelmut Schaa2012-11-281-0/+45
| | | | | | | | | | | If a driver registers an address mask we should ensure that no interface gets an address assigned that isn't covered by the registered address mask. This prevents invalid configurations from reaching the device and causing problems. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> [change function flow to reduce indentation, fix locking] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: fix potential NULL dereferenceDan Carpenter2012-11-281-1/+1
| | | | | | | | | Smatch complains that we could dereference skb later in the function. It's probably unlikely, but we may as well return here and avoid it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> [change summary] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* nl80211: remove unnecessary checksJohannes Berg2012-11-281-3/+2
| | | | | | | | The CQM TX-error rate/interval can't be less than zero since they're unsigned values, remove checks. Also fix indentation of the function. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: support P2P GO powersave configurationJohannes Berg2012-11-272-2/+16
| | | | | | | | If the low-level driver wants to support P2P GO powersave configuration, it must set the cfg80211 flags and mac80211 will pass the parameters to it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* nl80211: support P2P GO powersave configurationJohannes Berg2012-11-273-0/+79
| | | | | | | | | If a driver supports P2P GO powersave, allow it to set the new feature flags for it and allow userspace to configure the parameters for it. This can be done at GO startup and later changed with SET_BSS. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: support (partial) VHT radiotap informationJohannes Berg2012-11-274-0/+71
| | | | | | | Add some information that we have about VHT to radiotap. This at least lets one see the MCS and NSS information. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: support VHT associationJohannes Berg2012-11-273-72/+313
| | | | | | | | | Determine the VHT channel from the AP's VHT operation IE (if present) and configure the hardware to that channel if it is supported. If channel contexts cause a channel to not be usable, try a smaller bandwidth. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: rework chandef checking and export itJohannes Berg2012-11-274-72/+85
| | | | | | | | | Some of the chandef checking that we do in cfg80211 to check if a channel is supported or not is also needed in mac80211, so rework that a bit and export the functions that are needed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: fix some tracing output issuesJohannes Berg2012-11-261-76/+73
| | | | | | | | | In some cases, e.g. probe_status, there were spaces missing so the trace output was confusing. Also make it more like mac80211 when printing netdevs/wiphys to make reading a combined log easier. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211_hwsim: remove printing scan configJohannes Berg2012-11-261-6/+0
| | | | | | | | The frequencies will be printed when actually doing the scan, and the IEs can be captured on the hwsim0 monitor. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211_hwsim: advertise VHT supportJohannes Berg2012-11-261-0/+28
| | | | | | | | If the number of channels is > 1, which means that hwsim will use mac80211 channel contexts, it can also advertise VHT support. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wireless: add definitions for VHT MCS supportJohannes Berg2012-11-261-0/+23
| | | | | | | | Add definitions for the VHT MCS support values that are used to indicate, for each number of streams (1 through 8) which MCSes are supported. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: support VHT rates in TX infoJohannes Berg2012-11-262-20/+57
| | | | | | | | To achieve this, limit the number of retries to 31 (instead of 255) and use the three bits that are then free for VHT flags. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: support drivers reporting VHT RXJohannes Berg2012-11-265-10/+66
| | | | | | | Add support to mac80211 for having drivers report received VHT MCS information. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* nl80211/cfg80211: add VHT MCS supportJohannes Berg2012-11-264-24/+144
| | | | | | | | | | Add support for reporting and calculating VHT MCSes. Note that I'm not completely sure that the bitrate calculations are correct, nor that they can't be simplified. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: convert to channel definition structJohannes Berg2012-11-2620-262/+220
| | | | | | | | | | | | | | Convert mac80211 (and where necessary, some drivers a little bit) to the new channel definition struct. This will allow extending mac80211 for VHT, which is currently restricted to channel contexts since there are no drivers using that which makes it easier. As I also don't care about VHT for drivers not using the channel context API, I won't convert the previous API to VHT support. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* nl80211/cfg80211: support VHT channel configurationJohannes Berg2012-11-2613-113/+507
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change nl80211 to support specifying a VHT (or HT) using the control channel frequency (as before) and new attributes for the channel width and first and second center frequency. The old channel type is of course still supported for HT. Also change the cfg80211 channel definition struct to support these by adding the relevant fields to it (and removing the _type field.) This also adds new helper functions: - cfg80211_chandef_create to create a channel def struct given the control channel and channel type, - cfg80211_chandef_identical to check if two channel definitions are identical - cfg80211_chandef_compatible to check if the given channel definitions are compatible, and return the wider of the two This isn't entirely complete, but that doesn't matter until we have a driver using it. In particular, it's missing - regulatory checks on the usable bandwidth (if that even makes sense) - regulatory TX power (database can't deal with it) - a proper channel compatibility calculation for the new channel types Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: pass a channel definition structJohannes Berg2012-11-2620-402/+403
| | | | | | | | | | | | | | Instead of passing a channel pointer and channel type to all functions and driver methods, pass a new channel definition struct. Right now, this struct contains just the control channel and channel type, but for VHT this will change. Also, add a small inline cfg80211_get_chandef_type() so that drivers don't need to use the _type field of the new structure all the time, which will change. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* nl80211: add documentation for channel typeJohannes Berg2012-11-261-0/+9
| | | | Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: remove remain-on-channel channel typeJohannes Berg2012-11-2624-172/+81
| | | | | | | | | | | | | | | | | As mwifiex (and mac80211 in the software case) are the only drivers actually implementing remain-on-channel with channel type, userspace can't be relying on it. This is the case, as it's used only for P2P operations right now. Rather than adding a flag to tell userspace whether or not it can actually rely on it, simplify all the code by removing the ability to use different channel types. Leave only the validation of the attribute, so that if we extend it again later (with the needed capability flag), it can't break userspace sending invalid data. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: fix managed mode channel flags handlingJohannes Berg2012-11-261-9/+5
| | | | | | | | | | | | | | | | | | | | | If ieee80211_prep_channel() decides that HT should be disabled (because the HT IEs from the AP were invalid) it will set the IEEE80211_STA_DISABLE_HT to not send HT capabilities to the AP when associating. If this happens during authentication, the flag will be lost and we send HT frames, even if the channel config was set up for non-HT. This can lead to issues. Fix this by always resetting the ifmgd flags to zero when the channel context is released so that the flag resetting in ieee80211_mgd_assoc() isn't necessary. To make the code a bit easier move the call to release the channel in ieee80211_set_disassoc() to the end of the function together with the flag resetting (which needs to be at the end to avoid timers setting flags.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: remove mesh config macros from mesh_plink.cMarco Porsch2012-11-261-15/+13
| | | | | | | Use shortcut pointer instead where it is appropriate. Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: refactor ieee80211_set_qos_hdrMarco Porsch2012-11-261-17/+23
| | | | | | | | Return early if not a QoS Data frame. Give proper documentation. Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: move Mesh Capability field definition to ieee80211.hMarco Porsch2012-11-264-19/+20
| | | | | | Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de> [prefix with IEEE80211_] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: in ADHOC print debug message for every Auth messageAntonio Quartulli2012-11-261-2/+4
| | | | | | | | | The debug message has to be printed also for an Auth message with auth_sequence != 1. This helps understanding whether the two Auth messages are exchanged correctly or not. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: in ADHOC don't update last_rx if sta is not authorizedAntonio Quartulli2012-11-261-3/+7
| | | | | | | | | | | | | It does not make sense to keep a station alive if it is not authorised at all. If IBSS/RSN is used it could also be the case that something went wrong during the keys exchange and the stations ended up in a not recoverable state. By not updating last_rx we are giving the station a chance to be deleted and to start the key exchange once again from scratch. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: change function signature of cfg80211_get_p2p_attr()Arend van Spriel2012-11-262-4/+6
| | | | | | | | | | | | | The function cfg80211_get_p2p_attr() can fail and returns a negative error code. However, the return type is unsigned int. The largest positive number is determined by desired_len variable in the function, which is u16. So changing the return type to int to allow easy error checking. Also change the type for the attribute to enum for improved type checking. Signed-off-by: Arend van Spriel <arend@broadcom.com> [fix indentation, don't use u8 attr variable] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: use DS or HT operation IEs to determine BSS channelJohannes Berg2012-11-232-9/+45
| | | | | | | | | | | | | | | | | | Currently, mac80211 checks the DS params IE if present and uses it for the (primary) BSS channel, instead of the one that the frame was received on. This is particularly useful in the 2.4 GHz band since a frame is often received on one of the adjacent channels due to overlap. Move this code to cfg80211 so other drivers also do this. Additionally, on 5 GHz, in particular with some (possibly) upcoming changes in 802.11ai and duplicate transmissions when wider channels are used, something similar happens. So if present, also use the (primary) channel information contained in the HT operation IE. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
OpenPOWER on IntegriCloud