- 18 Feb, 2013 4 commits
-
-
Thomas Pedersen authored
Convert mesh peering events into strings and make the debug output a little easier to read. Also stop printing the llid and plid since these don't change across peering states and are random numbers anyway so they just amount to noise. Signed-off-by:
Thomas Pedersen <thomas@cozybit.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Thomas Pedersen authored
ieee80211_ht_cap_ie_to_sta_ht_cap() will clean up the ht_supported flag and station bandwidth field for us if the peer beacon doesn't have an HT capability element (is operating as non-HT). Also, we don't really need a special station ch_width member to track the station operating mode any more so use sta.bandwidth instead. Signed-off-by:
Thomas Pedersen <thomas@cozybit.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
If an interface is set down while authenticating or associating, there's a station entry that will be removed by the flushing in do_stop() and that will cause a warning. It's otherwise harmless, but avoid the warning by calling ieee80211_mgd_stop() first. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Update the 802.11 book to list the correct data structures. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 15 Feb, 2013 36 commits
-
-
Seth Forshee authored
Several tracepoints are using STA_PR_FMT where STA_PR_ARG should be used, resulting in messages like "phy0 sta:ARG TYPE NOT FIELD BUT 1". Change these to STA_PR_ARG. Signed-off-by:
Seth Forshee <seth.forshee@canonical.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Bob Copeland authored
Since mesh powersaving was added, pending bcast/mcast frames may go out the CAB queue now. Unfortunately, the queue was only set up for AP mode, so we would try to tx on the IEEE80211_INVAL_HW_QUEUE. Allow cab_queue for mesh interfaces as well. Fixes the following warning (or crash without MAC80211_VERBOSE_DEBUG): WARNING: at net/mac80211/tx.c:1223 __ieee80211_tx+0x162/0x35f [mac80211]() Modules linked in: mac80211_hwsim mac80211 cfg80211 [...] Pid: 3085, comm: avahi-daemon Tainted: G W 3.8.0-rc1+ #377 Call Trace: [<ffffffff81045c20>] warn_slowpath_common+0x83/0x9c [<ffffffff81045c53>] warn_slowpath_null+0x1a/0x1c [<ffffffffa083aef0>] __ieee80211_tx+0x162/0x35f [mac80211] [<ffffffffa083cb1d>] ieee80211_tx+0xd3/0xf9 [mac80211] [<ffffffffa083cc0f>] ieee80211_xmit+0xcc/0xd5 [mac80211] [<ffffffffa083db59>] ieee80211_subif_start_xmit+0xc53/0xcd8 [mac80211] [<ffffffff81319acd>] dev_hard_start_xmit+0x259/0x3ce [<ffffffff81333d6b>] sch_direct_xmit+0x74/0x17d [<ffffffff8131a0b1>] dev_queue_xmit+0x230/0x414 [<ffffffff8134877a>] ip_finish_output2+0x348/0x3aa [<ffffffff81349029>] ip_finish_output+0x6c/0x71 [<ffffffff81349046>] NF_HOOK_COND.constprop.44+0x18/0x58 [<ffffffff8134a03a>] ip_mc_output+0x134/0x13c [<ffffffff8134835a>] dst_output+0x18/0x1c [<ffffffff81349a24>] ip_local_out+0x20/0x24 [<ffffffff8134a8cf>] ip_send_skb+0x16/0x3c [<ffffffff8136bfba>] udp_send_skb+0x254/0x2b9 [<ffffffff8136c85e>] udp_sendmsg+0x5a8/0x7d4 Signed-off-by:
Bob Copeland <bob@cozybit.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
There's various code with strange indentation, questionable loop and locking constructs, etc. The bigger change is moving the "sdata" argument to the first argument of all functions, like all other mac80211 functions that have one. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Karl Beldan authored
Otherwise memory corruption occurs when using channel contexts (ATM when param 'channel' > 1). Signed-off-by:
Karl Beldan <karl.beldan@rivierawaves.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Even when connecting to an AP that doesn't support VHT, and even when the local device doesn't support it either, the downgrade message gets printed. Suppress the message if HT and/or VHT is disabled. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Adding the flag to mac80211 already without testing was clearly a mistake, one that we now pay for by having to reserve bit 13 forever. The problem is cfg80211 doesn't allow capability/rate changes for station entries that were added unassociated, so the station entries cannot be set up properly when marked associated. Change the NL80211_FEATURE_FULL_AP_CLIENT_STATE value to make it clear to userspace implementations that all current kernels don't actually support it, even though the previous bit is set, and of course also remove the flag from mac80211 until we test and fix the issues. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Jouni Malinen authored
The information of the peer's capabilities is required for the driver to perform TDLS Peer UAPSD operations. This information of the peer is passed by the supplicant using NL80211_CMD_SET_STATION command. This commit enhances the function nl80211_set_station to pass this information of the peer to the driver in case this command is used with the TDLS peer STA. In addition, make the HT/VHT capability configuration handled more consistently for other STA cases (reject both instead of just HT). Signed-off-by:
Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Jouni Malinen authored
The information of the peer's capabilities and extended capabilities are required for the driver to perform TDLS Peer UAPSD operations and off channel operations. This information of the peer is passed from user space using NL80211_CMD_SET_STATION command. This commit enhances the function nl80211_set_station to pass the capability information of the peer to the driver. Similarly, there may be need for capability information for other modes, so allow this to be provided with both add_station and change_station. Signed-off-by:
Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Use the new extended capabilities advertising to advertise the fact that operating mode notification is supported. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
In many cases, userspace may need to know which of the 802.11 extended capabilities ("Extended Capabilities element") are implemented in the driver or device, to include them e.g. in beacons, assoc request/response or other frames. Add a new nl80211 attribute to hold the extended capabilities bitmap for this. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Instead of modifying the HT SMPS capability field for stations, track the SMPS mode explicitly in a new field in the station struct and use it in the drivers that care about it. This simplifies the code using it. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Thomas Pedersen authored
Mesh interfaces will now respond to any broadcast (or matching directed mesh) probe requests with a probe response. Signed-off-by:
Thomas Pedersen <thomas@cozybit.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Thomas Pedersen authored
Previously, the entire mesh beacon would be generated each time the beacon timer fired. Instead generate a beacon head and tail (so the TIM can easily be inserted when mesh power save is on) when starting a mesh or the MBSS parameters change. Also add a mutex for protecting beacon updates and preventing leaks. Signed-off-by:
Thomas Pedersen <thomas@cozybit.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Make all the parsed IE pointers const, and propagate the change to all the users etc. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When drivers or regulatory have limitations on 40, 80 or 160 MHz channels, advertise these to userspace via nl80211. Also add a new feature flag to let userspace know this is supported. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Some drivers might support 80 or 160 MHz only on some channels for whatever reason, so allow them to disable these channel widths. Also maintain the new flags when regulatory bandwidth limitations would disable these wide channels. Reviewed-by:
Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
A while ago, I made the mac80211 station code never change the channel type after association. This solved a number of issues but is ultimately wrong, we should react if the AP changes the HT operation IE and switches bandwidth. One of the issues is that we associate as HT40 capable, but if the AP ever switches to 40 MHz we won't be able to receive such frames because we never set our channel to 40 MHz. This addresses this and VHT operation changes. If there's a change that is incompatible with our setup, e.g. if the AP decides to change the channel entirely (and for some reason we still hear the beacon) we'll just disconnect. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The next patch will need it further up in the file, so move it unchanged now. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
For HT and VHT the current bandwidth can change, add the function ieee80211_vif_change_bandwidth() to take care of this. It returns a failure if the new bandwidth isn't compatible with the existing channel context, the caller has to handle that. When it happens, also inform the driver that the bandwidth changed for this virtual interface (no drivers would actually care today though.) Changing to/from HT/VHT isn't allowed though. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The channel use is confusing, some uses the channel context and some the bss_conf.chandef. The latter is fine, so get rid of the channel context part. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Having HT/VHT operation IEs but not capability IEs leads to a strange situation where we configure the channel to an HT or VHT bandwidth and then can't actually use it. Prevent this by checking that the HT and VHT capability IEs are present as well as the operation IEs; if not, disable HT and/or VHT. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
In beacons and association response frames an AP may include an operating mode notification element to advertise changes in the number of spatial streams it can receive. Handle this using the existing function that handles the action frame, but only handle NSS changes, not bandwidth changes which aren't allowed here. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
This should be called ieee80211_change_chanctx() since it changes the channel context, not a chandef. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The code to disable HT and VHT if VHT was advertised without VHT is wrong -- it accidentally uses the wrong flags. Fix that. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
In case of connection, the station data is initialised from the beacon/probe response first and then updated from the association response. If the latter is different we update the rate control algorithm and driver. Instead of doing it this way, set the station data properly with data from the association response before initializing rate control. Also simplify the code by passing the station pointer. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Handle the operating mode notification action frame. When the supported streams or the bandwidth change let the driver and rate control algorithm know. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
With VHT, a station can change the number of spatial streams it can receive on the fly, not unlike spatial multiplexing in HT. Prepare for that by tracking the maximum number of spatial streams it can receive when the connection is established. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Define the action frame format, the VHT category and its action types and the field format and EID for operating mode notifications. The frame may be used outside of VHT context as well, so don't include "VHT" in the names. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
For VHT, many more bandwidth changes are possible. As a first step, stop toggling the IEEE80211_HT_CAP_SUP_WIDTH_20_40 flag in the HT capabilities and instead introduce a bandwidth field indicating the currently usable bandwidth to transmit to the station. Of course, make all drivers use it. To achieve this, make ieee80211_ht_cap_ie_to_sta_ht_cap() get the station as an argument, rather than the new capabilities, so it can set up the new bandwidth field. If the station is a VHT station and VHT bandwidth is in use, also set the bandwidth accordingly. Doing this allows us to get rid of the supports_40mhz flag as the HT capabilities now reflect the true capability instead of the current setting. While at it, also fix ieee80211_ht_cap_ie_to_sta_ht_cap() to not ignore HT cap overrides when MCS TX isn't supported (not that it really happens...) Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Like with HT, make things a bit simpler in future patches by passing the station to ieee80211_vht_cap_ie_to_sta_vht_cap() instead of the vht_cap pointer. Also disable VHT here if HT isn't supported. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
-
Johannes Berg authored
Since no driver calls the TKIP functions from interrupt context, there's no need to use spin_lock_irqsave(). Just use spin_lock_bh() (and spin_lock() in the TX path where we're in a BH or they're already disabled.) Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
There's no need to use _irqsave() as the lock is never used in interrupt context. This also fixes a problem in the iwlwifi MVM driver that calls spin_unlock_bh() within its set_tim() callback. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
There's no use for it, WPA is entirely handled in wpa_supplicant in userspace, so don't pick the IE. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
In some cases when disconnecting after (or during?) CSA the queues might not recover, and then the only way to recover is reloading the module. Fix this by always unblocking the queue CSA reason when disconnecting. Cc: stable@vger.kernel.org Reported-by:
Jan-Michael Brummer <jan.brummer@tabos.org> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Since the idle decision rework, mac80211 started calling bss_info_changed() for the driver's monitor interface, which causes a crash for iwlwifi, but drivers generally don't expect this to happen. Therefore, avoid it. While at it, also prevent calling it in such cases and only print a warning. For the P2P Device interface the idle will no longer be called (no channel context), so also prevent that and warn on it. Reported-by:
Chaitanya <chaitanya.mgit@gmail.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-