- 08 Apr, 2013 6 commits
-
-
Johannes Berg authored
Given the (nested) switch statements, this code can't be reached, so make it warn instead of manipulating the carrier state which seems purposeful. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When a device is unplugged while suspended, mac80211 is de-initialized and all interfaces are removed while no state is actually present in the driver. This can cause warnings and driver confusion. Fix this by reordering the do_stop code to not call the driver when it is suspended, i.e. when there's no state in the driver anyway. The previous patches removed a few corner cases in ROC and virtual monitor interfaces so that now this is safe to do and no state should be left over. Reported-by:
Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
It has to be removed from the driver, but completely destroying it helps handle unplug of a device during suspend since then the channel context handling etc. doesn't have to happen later when it's removed. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
They can't really be executed while suspended and could trigger work warnings, so abort all ROC items. When the system resumes the notifications about this will be delivered to userspace which can then act accordingly (though it will assume they were canceled/finished.) Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The code now explicitly calls ieee80211_configure_filter() anyway, so nothing needs to be explained. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The master interface no longer exists ... and hasn't for a few years now, so remove this reference :-) Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 18 Mar, 2013 2 commits
-
-
Johannes Berg authored
There are a number of situations in which mac80211 only really needs to flush queues for one virtual interface, and in fact during this frames might be transmitted on other virtual interfaces. Calculate and pass a queue bitmap to the driver so it knows which queues to flush. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Stanislaw Gruszka authored
This basically reverts commit b207cdb0. Now is possible to use drv_{add,remove}_interface() and vif->debugfs_dir to create/remove per interface debugfs files. Remove redundant callbacks. Signed-off-by:
Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 11 Mar, 2013 1 commit
-
-
Alexander Bondar authored
Some devices have multicast filter capability for each individual virtual interface rather than just a global one. Add an interface specific driver callback allowing such drivers to configure this. Signed-off-by:
Alexander Bondar <alexander.bondar@intel.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 06 Mar, 2013 4 commits
-
-
Johannes Berg authored
For AP interfaces, there's no need to flush stations or keys again when the interface is stopped as already happened when the BSS was stopped on the interface. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Since hostapd will remove keys this isn't usually an issue, but we shouldn't leak keys to the next BSS started on the same interface. For VLANs this also fixes a bug, keys that aren't removed would otherwise be leaked. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
During roaming, the crypto_tx_tailroom_needed_cnt counter will often take values 2,1,0,1,2 because first keys are removed and then new keys are added. This is inefficient because during the 0->1 transition, synchronize_net must be called to avoid packet races, although typically no packets would be flowing during that time. To avoid that, defer the decrement (2->1, 1->0) when keys are removed (by half a second). This means the counter will really have the values 2,2,2,3,4 ... 2, thus never reaching 0 and having to do the 0->1 transition. Note that this patch entirely disregards the drivers for which this optimisation was done to start with, for them the key removal itself will be expensive because it has to synchronize_net() after the counter is incremented to remove the key from HW crypto. For them the sequence will look like this: 0,1,0,1,0,1,0,1,0 (*) which is clearly a lot more inefficient. This could be addressed separately, during key removal the 0->1->0 sequence isn't necessary. (*) it starts at 0 because HW crypto is on, then goes to 1 when HW crypto is disabled for a key, then back to 0 because the key is deleted; this happens for both keys in the example. When new keys are added, it goes to 1 first because they're added in software; when a key is moved to hardware it goes back to 0 Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Stanislaw Gruszka authored
Since two years no mac80211 driver implement support for NAPI. Looks this feature is unneeded, so remove it from generic mac80211 code. Signed-off-by:
Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 02 Mar, 2013 1 commit
-
-
Felix Fietkau authored
When setting a monitor interface up or down, the idle state needs to be recalculated, otherwise the hardware will just stay in its previous idle state. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 26 Feb, 2013 1 commit
-
-
Felix Fietkau authored
When the driver does not want a monitor mode VIF, no channel context is allocated for it. This causes ieee80211_recalc_idle to put the hardware into idle mode if only a monitor mode is active, breaking injection. Fix this by checking local->monitors in addition to active channel contexts. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 18 Feb, 2013 1 commit
-
-
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>
-
- 15 Feb, 2013 3 commits
-
-
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>
-
Michael Braun authored
When the vlan device is removed, ps->bc_buf processing can no longer send its frames. Signed-off-by:
Michael Braun <michael-dev@fami-braun.de> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Simon Wunderlich authored
Add command to trigger radar detection in the driver/FW. Once radar detection is started it should continuously monitor for radars as long as the channel active. If radar is detected usermode notified with 'radar detected' event. Scanning and remain on channel functionality must be disabled while doing radar detection/scanning, and vice versa. Based on original patch by Victor Goldenshtein <victorg@ti.com> Signed-off-by:
Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 11 Feb, 2013 3 commits
-
-
Johannes Berg authored
Now that we have channel contexts, idle is (pretty much) equivalent to not having a channel context. Change the code to use this relation so that there no longer is a need for a lot of idle recalculate calls everywhere. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
There are only a few drivers that use HW scan, and all of those don't need a non-idle transition before starting the scan -- some don't even care about idle at all. Remove the flag and code associated with it. The only driver that really actually needed this is wl1251 and it can just do it itself in the hw_scan callback -- implement that. Acked-by:
Luciano Coelho <coelho@ti.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Alexander Bondar authored
Add debugfs driver callbacks so drivers can add debugfs entries for interfaces. Note that they _must_ remove the entries again as add/remove in the driver doesn't correspond to add/remove in debugfs; the former is up/down while the latter is netdev create/destroy. Signed-off-by:
Alexander Bondar <alexander.bondar@intel.com> Reviewed-by:
Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 18 Jan, 2013 1 commit
-
-
Johannes Berg authored
Depending on the driver, having ARP filtering for some addresses may be possible. Remove the logic that tracks whether ARP filter is enabled or not and give the driver the total number of addresses instead of the length of the list so it can make its own decision. Reviewed-by:
Luciano Coelho <coelho@ti.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 03 Jan, 2013 8 commits
-
-
Johannes Berg authored
Instead of checking every time bss_info_changed is called, assign the pointer once depending on the interface type and then leave it untouched until the interface type is changed. This makes the ieee80211_bss_info_change_notify() now a simple wrapper to call the driver only. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
If there are VLANs, stopping an AP is inefficient as it calls rcu_barrier() once for each interface (the VLANs and the AP itself). Optimise this by moving rcu_barrier() out of the station cleanups and calling it only once for all interfaces combined. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The last fixes re-added the RCU synchronize penalty on roaming to fix the races. Split up sta_info_flush() now to get rid of that again, and let managed mode (and only it) delay the actual destruction. Tested-by:
Ben Greear <greearb@candelatech.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When an interface is brought down it must have been disconnected (or similar) in all modes other than WDS, so warn if any stations were removed in other modes. Tested-by:
Ben Greear <greearb@candelatech.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When all interfaces have been removed, there can't be any stations left over, so there's no need to flush again. Remove this, and all code associated with it, which also simplifies the function. Tested-by:
Ben Greear <greearb@candelatech.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Chaitanya authored
The maximum MTU shouldn't take the headers into account, the maximum MSDU size is exactly the maximum MTU. Signed-off-by:
T Krishna Chaitanya <chaitanyatk@posedge.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Unfortunately, commit b22cfcfc, intended to speed up roaming by avoiding the synchronize_rcu() broke AP/mesh modes as it moved some code into that work item that will still call into the driver at a time where it's no longer expected to handle this: after the AP or mesh has been stopped. To fix this problem remove the per-station work struct, maintain a station cleanup list instead and flush this list when stations are flushed. To keep this patch smaller for stable, do this when the stations are flushed (sta_info_flush()). This unfortunately brings back the original roaming delay; I'll fix that again in a separate patch. Also, Ben reported that the original commit could sometimes (with many interfaces) cause long delays when an interface is set down, due to blocking on flush_workqueue(). Since we now maintain the cleanup list, this particular change of the original patch can be reverted. Cc: stable@vger.kernel.org [3.7] Reported-by:
Ben Greear <greearb@candelatech.com> Tested-by:
Ben Greear <greearb@candelatech.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Make AP_VLAN type interfaces track the AP master channel context so they have one assigned for the various lookups. Don't give them their own refcount etc. since they're just slaves to the AP master. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 06 Dec, 2012 1 commit
-
-
Johannes Berg authored
If the sdata work is pending while the interface is stopped, we currently flush it. If it's not running this means waiting for it to run, which could take a while if the workqueue is backlogged. However, the work exits right away if it starts to run while the interface is already stopping. There's no point in waiting for that, so use cancel_work_sync() instead. Reported-by:
Ben Greear <greearb@candelatech.com> Tested-by:
Ben Greear <greearb@candelatech.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 28 Nov, 2012 1 commit
-
-
Helmut Schaa authored
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>
-
- 26 Nov, 2012 1 commit
-
-
Johannes Berg authored
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>
-
- 30 Oct, 2012 1 commit
-
-
Johannes Berg authored
Even before channel contexts/multi-channel, having a single global TX power limit was already problematic, in particular if two managed interfaces connected to two APs with different power constraints. The channel context introduction completely broke this though and in fact I had disabled TX power configuration there for drivers using channel contexts. Change everything to track TX power per interface so that different user settings and different channel maxima are treated correctly. Also continue tracking the global TX power though for compatibility with applications that attempt to configure the wiphy's TX power globally. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 26 Oct, 2012 1 commit
-
-
Johannes Berg authored
Since cfg80211 will now call the explicit stop_ap operation when an AP interface goes down, move all teardown code there and remove it from interface handling. The only thing that needs to stay is the code to dev_close() all dependent VLANs. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 19 Oct, 2012 1 commit
-
-
Marco Porsch authored
This patch prepares mac80211 for a later implementation of mesh or ad-hoc powersave clients. The structures related to powersave (buffer, TIM map, counters) are moved from the AP-specific interface structure to a generic structure that can be embedded into any interface type. The functions related to powersave are prepared to allow easy extension with different interface types. For example with: + } else if (sta->sdata->vif.type == NL80211_IFTYPE_MESH_POINT) { + ps = &sdata->u.mesh.ps; Some references to the AP's beacon structure are removed where they were obviously not used. The patch compiles without warning and has been briefly tested as AP interface with one client in PS mode. Signed-off-by:
Marco Porsch <marco.porsch@etit.tu-chemnitz.de> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 17 Oct, 2012 2 commits
-
-
Johannes Berg authored
On each channel that the device is operating on, it may need to listen using one or more chains depending on the SMPS settings of the interfaces using it. The previous channel context changes completely removed this ability (before, it was available as the SMPS mode). Add per-context tracking of the required static and dynamic RX chains and notify the driver on changes. To achieve this, track the chains and SMPS mode used on each virtual interface and update the channel context whenever this changes. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Instead of operating on a single channel only, use the new channel context infrastructure in all mac80211 code. This enables drivers that want to use the new channel context infrastructure to use multiple channels, while nothing should change for all the other drivers that don't support it. Right now this disables both TX power settings and spatial multiplexing powersave. Both need to be re-enabled on a channel context basis. Additionally, when channel contexts are used drop the connection when channel switch is received rather than trying to handle it. This will have to be improved later. [With fixes from Eliad and Emmanuel incorporated] 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>
-
- 15 Oct, 2012 1 commit
-
-
Felix Fietkau authored
Free tx status skbs when draining power save buffers, pending frames, or when tearing down a vif. Fixes remaining conditions that can lead to hostapd/wpa_supplicant hangs when running out of socket write memory. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Cc: stable@vger.kernel.org Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-