CSA broken with !use_chanctx drivers?

2014-09-11 Thread Luca Coelho
Hi Michal, Johannes and I were checking the channel switch code (namely to see if implementing the drv_channel_switch op was fine in our case) and we saw that CSA with non-chanctx drivers seems to be broken. In commit 4c3ebc56 (mac80211: use chanctx reservation for STA CSA) we lost this piece of

Re: CSA broken with !use_chanctx drivers?

2014-09-11 Thread Luca Coelho
On Thu, 2014-09-11 at 11:28 +0200, Michal Kazior wrote: On 11 September 2014 08:49, Luca Coelho l...@coelho.fi wrote: Hi Michal, Johannes and I were checking the channel switch code (namely to see if implementing the drv_channel_switch op was fine in our case) and we saw that CSA

[PATCH 5/7] mac80211: add post_channel_switch driver operation

2014-09-26 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com As a counterpart to the pre_channel_switch operation, add a post_channel_switch operation. This allows the drivers to go back to a normal configuration after the channel switch is completed. Signed-off-by: Luciano Coelho luciano.coe...@intel.com ---

[PATCH 2/7] mac80211: add device_timestamp to the ieee80211_channel_switch struct

2014-09-26 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Some devices may need the device timestamp in order to synchronize the channel switch. To pass this value back to the driver, add it to the channel switch structure and copy the device_timestamp value received in the rx info structure into it.

[PATCH 6/7] mac80211: wait for the first beacon on the new channel after CSA

2014-09-26 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Instead of immediately reopening the queues (in case of block_tx), calling the post_channel_switch operation and sending the notification, wait for the first beacon on the new channel. This makes sure that we don't lose packets if the AP/GO is not on

[PATCH 3/7] mac80211: add extended channel switching capability if the driver supports CSA

2014-09-26 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com The Extended Channel Switching capability bit in the extended capabilities element must be set if the driver supports CSA on non-beaconing interfaces. Since this capability needs to be set during driver registration, the extended_capabiliities global

[PATCH 1/7] nl80211: sanity check the channel switch counter value

2014-09-26 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com The nl80211 channel switch count attribute (NL80211_ATTR_CH_SWITCH_COUNT) is specified as u32, but the specification uses u8 for the counter. To make sure strange things don't happen without informing the user, sanity check the value and return

[PATCH 4/7] mac80211: add pre_channel_switch driver operation

2014-09-26 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Some drivers may need to prepare for a channel switch also when it is initiated from the remote side (eg. station, P2P client). To make this possible, add a generic callback that can be called for all interface types. Signed-off-by: Luciano Coelho

[PATCH 0/7] mac80211: some more channel switch work

2014-09-26 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Hi, These patches contain some more channel switch work. They have been in use in our internal tree for some time now and are mostly adding small details needed by the iwlmvm driver. There's also a nice improvement to a long-time TODO, where we

[PATCH 7/7] mac80211: allow channel switch with multiple channel contexts

2014-09-26 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Channel switch with multiple channel contexts should now work fine. Remove check that disallows switches when multiple contexts are in use. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- Note: the driver changes are only compile-tested.

Re: [PATCH 6/7] mac80211: wait for the first beacon on the new channel after CSA

2014-10-08 Thread Luca Coelho
Sorry for the delay in replying. On Mon, 2014-09-29 at 11:02 +0200, Michal Kazior wrote: On 26 September 2014 21:35, Luca Coelho l...@coelho.fi wrote: From: Luciano Coelho luciano.coe...@intel.com Instead of immediately reopening the queues (in case of block_tx), calling

[PATCH v2 4/7] mac80211: add pre_channel_switch driver operation

2014-10-08 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Some drivers may need to prepare for a channel switch also when it is initiated from the remote side (eg. station, P2P client). To make this possible, add a generic callback that can be called for all interface types. Signed-off-by: Luciano Coelho

[PATCH v2 0/7] mac80211: some more channel switch work

2014-10-08 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Hi, A few minor changes in v2: * add WARN_ON to make sure csa_active is set in ieee80211_chswitch_post_beacon() [Michal]; * remove stray empty line [Michal]; * s/vifos/vif/ in a mac80211.h declaration (no clue where the os came from

[PATCH v2 2/7] mac80211: add device_timestamp to the ieee80211_channel_switch struct

2014-10-08 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Some devices may need the device timestamp in order to synchronize the channel switch. To pass this value back to the driver, add it to the channel switch structure and copy the device_timestamp value received in the rx info structure into it.

[PATCH v2 6/7] mac80211: wait for the first beacon on the new channel after CSA

2014-10-08 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Instead of immediately reopening the queues (in case of block_tx), calling the post_channel_switch operation and sending the notification, wait for the first beacon on the new channel. This makes sure that we don't lose packets if the AP/GO is not on

[PATCH v2 1/7] nl80211: sanity check the channel switch counter value

2014-10-08 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com The nl80211 channel switch count attribute (NL80211_ATTR_CH_SWITCH_COUNT) is specified as u32, but the specification uses u8 for the counter. To make sure strange things don't happen without informing the user, sanity check the value and return

[PATCH v2 5/7] mac80211: add post_channel_switch driver operation

2014-10-08 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com As a counterpart to the pre_channel_switch operation, add a post_channel_switch operation. This allows the drivers to go back to a normal configuration after the channel switch is completed. Signed-off-by: Luciano Coelho luciano.coe...@intel.com ---

[PATCH v2 7/7] mac80211: allow channel switch with multiple channel contexts

2014-10-08 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Channel switch with multiple channel contexts should now work fine. Remove check that disallows switches when multiple contexts are in use. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- Note: the driver changes are only compile-tested.

[PATCH v2 3/7] mac80211: add extended channel switching capability if the driver supports CSA

2014-10-08 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com The Extended Channel Switching capability bit in the extended capabilities element must be set if the driver supports CSA on non-beaconing interfaces. Since this capability needs to be set during driver registration, the extended_capabiliities global

Re: [PATCH 0/3] Add mcast event when hwsim radios are created and removed

2014-10-28 Thread Luca Coelho
On Mon, 2014-10-27 at 16:14 -0700, Marcel Holtmann wrote: Hi Luca, Hi Marcel, That's not particularly hard to figure out, for example by looking at sysfs. Is this really so time-constrained/important/... that you can't do that? It does not seem very practical to dig this

[PATCH 2/2] mac80211: schedule the actual switch of the station before CSA count 0

2014-10-28 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Due to the time it takes to process the beacon that started the CSA process, we may be late for the switch if we try to reach exactly beacon 0. To avoid that, use count - 1 when calculating the switch time. Reported-by: Jouni Malinen j...@w1.fi

[PATCH 0/2] mac80211: fix HT+ to HT- (and vice-versa) CSA

2014-10-28 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com These two patches fix a bug that Jouni found when running his hostap hwsim test scripts (ap_ht40_csa). The failure was caused by two different bugs which are fixed in this patchset. The first bug was that we were not using the secondary channel

[PATCH 1/2] mac80211: use secondary channel offset IE also beacons during CSA

2014-10-28 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com If we are switching from an HT40+ to an HT40- channel (or vice-versa), we need the secondary channel offset IE to specify what is the post-CSA offset to be used. This applies both to beacons and to probe responses. In ieee80211_parse_ch_switch_ie()

Re: [PATCH 0/2] mac80211: fix HT+ to HT- (and vice-versa) CSA

2014-10-28 Thread Luca Coelho
(fixed Johannes' email address) Both these bugs go far back, so IMHO they should go to 3.8 and stable. 1/2 goes back to 3.13 2/2 goes back to 2.6.30 (though the affected code changed somewhat since then) -- Luca. On Tue, 2014-10-28 at 13:33 +0200, Luca Coelho wrote

Re: [PATCH 0/2] mac80211: fix HT+ to HT- (and vice-versa) CSA

2014-10-29 Thread Luca Coelho
On October 29, 2014 5:37:35 PM EET, Johannes Berg johan...@sipsolutions.net wrote: On Tue, 2014-10-28 at 15:32 +0200, Luca Coelho wrote: (fixed Johannes' email address) Both these bugs go far back, so IMHO they should go to 3.8 and stable. Both applied. I think you meant 3.18 :) Oops

Re: [PATCH 0/6 3.18] Fixes for iwlwifi drivers

2014-10-30 Thread Luca Coelho
The cover-letter subject is wrong. :) I guess you meant s/iwlwifi/rtlwifi/ ;) -- Luca. On Wed, 2014-10-29 at 23:17 -0500, Larry Finger wrote: Some late changes to rtlwifi made some of the older drivers not start correctly. These patches should be applied to 3.18. Signed-off-by: Larry

Re: wli1271: buffer overflow static checker warning

2014-11-07 Thread Luca Coelho
On November 7, 2014 12:05:43 PM EET, Dan Carpenter dan.carpen...@oracle.com wrote: Hello Luciano Coelho, The patch f5fc0f86b02a: wl1271: add wl1271 driver files from Aug 6, 2009, leads to the following static checker warning: 2009?! :) Does this code even still exist? :P -- To unsubscribe

[PATCH v2 0/3] cfg80211/mac80211: CSA notification

2014-11-07 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com This is a rework of the channel switch started notification that I sent a long time ago. According to the review, I removed the failure notification. Additionally, some other small changes were made to fix some things and adapt to the current code.

[PATCH v2 3/3] cfg80211/nl80211: allow any interface to send channel switch notifications

2014-11-07 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com For multi-vif channel switches, we want to send NL80211_CMD_CH_SWITCH_NOTIFY to the userspace to let it decide whether other interfaces need to be moved as well. This is needed when we want a P2P GO interface to follow the channel of a station, for

[PATCH 0/2] mac80211: fix a couple of mistakes in CSA code

2014-11-07 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Hi, It seems that I made a couple of mistakes when publishing our CSA patches to the mainline. These two patches fix these problems. -- Luca. Luciano Coelho (2): mac80211: fix order of setting ch_switch and drv_pre_channel_switch call

[PATCH 2/2] mac80211: add device_timestamp to the drv_pre_channel_switch trace

2014-11-07 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com The device_timestamp value was left out of the event trace for drv_pre_channel_switch by mistake. Add it. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- net/mac80211/trace.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH] mac80211: add back support for radiotap vendor namespace data

2014-11-07 Thread Luca Coelho
On November 7, 2014 9:15:21 PM EET, Johannes Berg johan...@sipsolutions.net wrote: On Fri, 2014-11-07 at 14:37 +0200, Luca Coelho wrote: +#if 0 + struct ieee80211_vendor_radiotap *rtap; + + rtap = (void *)skb_push(skb, sizeof(*rtap) + 8 + 4); + /* + * Don't enable this code

[PATCH] wlcore: check minimum buffer size in some cmd_send functions

2014-11-09 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Check for the minimum required buffer length in wlcore_cmd_send() and wlcore_cmd_configure_failsafe. This ensures that we will never try to use a buffer that is smaller than the required header. Reported-by: Dan Carpenter dan.carpen...@oracle.com

[PATCH] wlcore: make wlcore_cmd_send_failsafe() static

2014-11-09 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com The wlcore_cmd_send_failsafe() function is only called in the cmd.c file, where it is definde. Make it static. Additionally, move the EXPORT_SYMBOL macro for wl1271_cmd_send() to the right place. Signed-off-by: Luciano Coelho

[PATCH 06/16] iwlwifi: mvm: Handle failed beacon transmissions during CSA

2014-11-10 Thread Luca Coelho
From: Andrei Otcheretianski andrei.otcheretian...@intel.com The spec requires to decrement the CSA counters based on TBTT, regardless if the beacon was actually transmitted. Previously, the fw would send beacon notifications only for successfully transmitted beacons. This behavior resulted in

[PATCH 09/16] iwlwifi: mvm: add CSA absent time event for clients

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Add an absent time event when pre_channel_switch is called and use the time event started indication to set the disable_tx bit instead of doing it in unassign_vif(). This is done so that the firmware queues are stopped before the actual switch takes

[PATCH 07/16] iwlwifi: mvm: disable PS during channel switch

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Disable PS when pre_channel_switch is called and add the post_channel_switch operation to re-enable PS when the channel switch is completed. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- drivers/net/wireless/iwlwifi/mvm/mac80211.c | 28

[PATCH 02/16] iwlwifi: mvm: only save csa_vif in AP/GO mode

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com We only need the csa_vif in AP/GO modes, and assigning for other interfaces may cause problems, because csa_vif is never cleared. To prevent this, only assign the value if the iftype is NL80211_IFTYPE_AP. Use a switch to do this, even though, for

[PATCH 00/16] iwlwifi: mvm: more CSA patches

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Hi, These patches finalize the CSA implementation for iwlmvm. These are the remaining patches that were still pending in our internal tree. After this, I believe we are aligned. This series depends on the mac80211/cfg80211 series I sent to Johannes

[PATCH 05/16] iwlwifi: mvm: return the actual error code when switch_vif_chanctx fails

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com We have code to recover and go back to the original channel context if something fails in the middle of switch_vif_chanctx, but we return the error code of the recover calls instead of the original code, so if the recovery succeeds, we will return 0

[PATCH 01/16] iwlwifi: mvm: use new pre_channel_switch op instead of channel_switch_beacon

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com A new callback has been added to prepare the device for a channel switch. Use the new callback instead of the old channel_switch_beacon operation. This makes it possible to remove the channel_switch_beacon operation from mac80211. Signed-off-by:

[PATCH 08/16] iwlwifi: mvm: use switching_chanctx argument instead of csa_active

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Now that all CSA flows are using the switch_vif_chanctx op, we can rely on the switching_chanctx boolean that is passed to the __iwl_mvm_assign_vif_chanctx() and __iwl_mvm_unassign_vif_chanctx() functions to decide whether the context switch flows

[PATCH 04/16] iwlwifi: mvm: add support for CHANCTX_SWMODE_REASSIGN_VIF

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Add support to reassign vif in switch_vif_chanctx. This is similar to the existing CHANCTX_SWMODE_SWAP_CONTEXTS mode, but doesn't delete the old context nor creates a new one, doing to switch between two existing contexts. Signed-off-by: Luciano

[PATCH 03/16] iwlwifi: mvm: refactor iwl_mvm_switch_vif_chanctx to support other modes

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Currently we only support the CHANCTX_SWMODE_SWAP_CONTEXTS mode, but we need to support other modes as well. Spin a new function off in order to make it easier to support other modes. Signed-off-by: Luciano Coelho luciano.coe...@intel.com ---

[PATCH 10/16] iwlwifi: mvm: schedule CSA time event a bit before beacon 1

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Instead of using a hardcoded number of TUs before beacon 0 as the time to start the absence and actual channel switch, calculate it in relation to the beacon interval. We use 10 TUs + beacon interval before beacon 0 to target a bit before beacon 1.

[PATCH 11/16] iwlwifi: mvm: finalize on post_switch instead of unassign

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Now that mac80211 waits for the first beacon on the new channel before calling post_channel_switch, the reconfiguration of the firmware should be done in the post_channel_switch operation instead of when assigning the vif to the new context.

[PATCH 12/16] iwlwifi: mvm: add a channel_switch op to bypass mac80211 timer

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com We need to call ieee80211_chswitch_done() ourselves just when the absence TE started, so we perform the actual context switch early enough. To do so, add a dummy channel_switch op, which will cause mac80211 to skip the countdown timer and allow us to

[PATCH 15/16] iwlwifi: mvm: clear TE data if CSA time event fails to start

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com If setting the CSA time event fails, we must clear the TE data, otherwise we'll try to remove it when, for instance, a disconnection occurs, causing a SYSASSERT. Signed-off-by: Luciano Coelho luciano.coe...@intel.com ---

[PATCH 13/16] iwlwifi: mvm: disable beacon filtering during CSA

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com After a channel switch, transmission on the new channel is only started once we see a beacon on it. Thus, beacon filtering needs to be disabled during channel switch so that mac80211 receives this beacon and finishes the process. Signed-off-by:

[PATCH 14/16] iwlwifi: mvm: Insert DS Parameter Set placeholder in probes

2014-11-10 Thread Luca Coelho
From: Andrei Otcheretianski andrei.otcheretian...@intel.com Since it's too complicated for the fw to insert a DS Parameter Set element in the middle of the frame, it was decided that it should be done by the host. The fw will only parse the frame and update the current channel field.

[PATCH 16/16] iwlwifi: mvm: protect session during CSA

2014-11-10 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com When another vif is also running during a channel switch, we need to use a session protection when we move to the new channel, so that we don't miss the beacons. Without this, sometimes the other vif repeatedly gets time exactly when we should be

Re: [PATCH v2] mac80211: add back support for radiotap vendor namespace data

2014-11-10 Thread Luca Coelho
On Mon, 2014-11-10 at 10:10 +0100, Johannes Berg wrote: From: Johannes Berg johannes.b...@intel.com Radiotap vendor namespace data might still be useful, but we reverted it because it used too much space in the RX status. Put it back, but address the space problem by using a single bit only

Re: [PATCH v2 1/2] nl80211: Replace interface socket owner attribute with more generic one

2014-11-12 Thread Luca Coelho
On Wed, 2014-11-12 at 13:36 +0200, Jukka Rissanen wrote: @@ -2056,6 +2056,8 @@ enum nl80211_attrs { #define NL80211_ATTR_KEY NL80211_ATTR_KEY #define NL80211_ATTR_KEYS NL80211_ATTR_KEYS #define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS +#define NL80211_ATTR_IFACE_SOCKET_OWNER

Re: [RFC] mac80211: allow drivers to provide any statistics

2014-11-17 Thread Luca Coelho
On Mon, 2014-11-17 at 11:48 +0100, Johannes Berg wrote: From: Johannes Berg johannes.b...@intel.com In many cases, drivers can filter things like beacons that will skew statistics reported by mac80211. To get correct statistics in these cases, call drivers to obtain statistics and let them

[PATCH iw 1/2] update nl80211.h

2014-11-27 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- nl80211.h | 119 +++--- 1 file changed, 115 insertions(+), 4 deletions(-) diff --git a/nl80211.h b/nl80211.h index f7daae5..d775245

[PATCH iw 2/2] add WoWLAN net-detect trigger

2014-11-27 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Adds a netdetect option to the wowlan triggers that allows the user to request network detection to be started when the device goes to suspend mode. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- event.c | 30 ++- info.c |

Re: [PATCH iw 2/2] add WoWLAN net-detect trigger

2014-11-27 Thread Luca Coelho
On Thu, 2014-11-27 at 22:29 +0100, Arend van Spriel wrote: On 11/27/14 22:06, Luca Coelho wrote: From: Luciano Coelholuciano.coe...@intel.com Adds a netdetect option to the wowlan triggers that allows the user to request network detection to be started when the device goes to suspend

[PATCH iw v2 1/2] update nl80211.h

2014-11-28 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- nl80211.h | 119 +++--- 1 file changed, 115 insertions(+), 4 deletions(-) diff --git a/nl80211.h b/nl80211.h index f7daae5..d775245

[PATCH iw v2 2/2] add WoWLAN net-detect trigger

2014-11-28 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Adds a netdetect option to the wowlan triggers that allows the user to request network detection to be started when the device goes to suspend mode. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- In v2: * renamed the option in the

Re: [PATCH iw v2 2/2] add WoWLAN net-detect trigger

2014-11-28 Thread Luca Coelho
On Fri, 2014-11-28 at 10:19 +0200, Luca Coelho wrote: From: Luciano Coelho luciano.coe...@intel.com Adds a netdetect option to the wowlan triggers that allows the user to request network detection to be started when the device goes to suspend mode. Signed-off-by: Luciano Coelho

[PATCH iw v3 1/3] update nl80211.h

2014-11-28 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- nl80211.h | 119 +++--- 1 file changed, 115 insertions(+), 4 deletions(-) diff --git a/nl80211.h b/nl80211.h index f7daae5..d775245

[PATCH iw v3 3/3] parse net detect wowlan configuration information

2014-11-28 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Parse the net detect information when it is reported. This includes the scan interval, SSIDs to match and frequencies to scan. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- wowlan.c | 39 ++- 1 file

[PATCH iw v3 2/3] add WoWLAN net-detect trigger

2014-11-28 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Adds a netdetect option to the wowlan triggers that allows the user to request network detection to be started when the device goes to suspend mode. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- event.c | 28 +- info.c | 3

[PATCH] nl80211: check matches array length before acessing it

2014-12-01 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com If the userspace passes a malformed sched scan request (or a net detect wowlan configuration) by adding a NL80211_ATTR_SCHED_SCAN_MATCH attribute without any nested matchsets, a NULL pointer dereference will occur. Fix this by checking that we do

Re: [PATCH] mac80211: move U-APSD enablement to vif flags

2014-12-15 Thread Luca Coelho
On Mon, 2014-12-15 at 12:35 +0100, Johannes Berg wrote: From: Johannes Berg johannes.b...@intel.com In order to let drivers have more dynamic U-APSD support, move the enablement flag to the virtual interface driver flags. This lets drivers not only set it up differently for different

Re: changes to Linux wireless maintenance

2014-12-18 Thread Luca Coelho
Hi John, On Wed, 2014-12-17 at 10:59 -0500, John W. Linville wrote: Greetings, Almost 9 years ago, Jeff Garzik wrote a message on LKML detailing the sad state of wireless LANs in the Linux world. The point of his message was So... there it is. We suck. There's hope. No Luke Skywalker

Re: [PATCH] MAINTAINERS: changes for wireless

2014-12-18 Thread Luca Coelho
On Wed, 2014-12-17 at 12:07 -0500, John W. Linville wrote: http://marc.info/?l=linux-wirelessm=141883202530292w=2 This makes it official... :-) Signed-off-by: John W. Linville linvi...@tuxdriver.com --- MAINTAINERS | 19 --- 1 file changed, 8 insertions(+), 11

[PATCH] nl80211: add an attribute to allow delaying the first scheduled scan cycle

2015-01-16 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com The userspace may want to delay the the first scheduled scan or net-detect cycle. Add an optional attribute to the scheduled scan configuration to pass the delay to be (optionally) used by the driver. Signed-off-by: Luciano Coelho

[PATCH] mac80211: only roll back station states for WDS when suspending

2015-01-21 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com In normal cases (i.e. when we are fully associated), cfg80211 takes care of removing all the stations before calling suspend in mac80211. But in the corner case when we suspend during authentication or association, mac80211 needs to roll back the

[PATCH] mac80211: only roll back station states for WDS when suspending

2015-01-19 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com In the suspend code, we shouldn't roll back the station states because this is taken care of in other parts of the code, except for WDS interfaces. For AP types of interfaces, cfg80211 takes care of disconnecting all stations before calling the

[PATCH] mac80211: handle potential race between suspend and scan completion

2015-01-24 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com If suspend starts while ieee80211_scan_completed() is running, between the point where SCAN_COMPLETED is set and the work is queued, ieee80211_scan_cancel() will not catch the work and we may finish suspending before the work is actually executed,

[PATCH iw] Read number of supported net-detect matches

2015-01-13 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Instead of just printing whether netdetect is supported, parse the attribute and report the maximum number of matchsets the driver supports. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- info.c | 5 +++-- 1 file changed, 3

[PATCH] nl80211: send netdetect configuration info in NL80211_CMD_GET_WOWLAN

2015-01-09 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Send the netdetect configuration information in the response to NL8021_CMD_GET_WOWLAN commands. This includes the scan interval, SSIDs to match and frequencies to scan. Additionally, add the NL80211_WOWLAN_TRIG_NET_DETECT with

[PATCH] nl80211: use loop index as type for net detect frequency results

2015-02-09 Thread Luca Coelho
From: Samuel Tan samuel...@chromium.org We currently add nested members of the NL80211_ATTR_SCAN_FREQUENCIES as NLA_U32 attributes of type NL80211_ATTR_WIPHY_FREQ in cfg80211_net_detect_results. However, since there can be an arbitrary number of frequency results, we should use the loop index of

[PATCH] nl80211: small clarification of the sched_scan delay attribute

2015-03-18 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Just clarify that the delay is only before the first cycle. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- include/uapi/linux/nl80211.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/nl80211.h

[PATCH iw v2 1/4] iw: move generic sched scan parsing code out of net detect

2015-03-17 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com The scheduled scan structure is pretty much the same as the net-detect WoWLAN trigger's. Move the bulk of the command line parsing code to a generic function so we can reuse it for sched_scan. Signed-off-by: Luciano Coelho luciano.coe...@intel.com

[PATCH iw v2 0/4] iw: add scheduled scan support

2015-03-17 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com This series adds scheduled scan support to the iw tool (finally! ;). In v2, just rebased. Luciano Coelho (4): iw: move generic sched scan parsing code out of net detect iw: implement scheduled scan iw: add support for active scheduled scan

[PATCH iw v2 3/4] iw: add support for active scheduled scan

2015-03-17 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Add options to explicitly use active or passive scans on schedule scans (and net-detect). If neither active nor passive parameters are passed, the default is to do active scans with the wildcard SSID. Signed-off-by: Luciano Coelho

[PATCH iw v2 4/4] iw: add randomise option for sched_scan

2015-03-17 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Like with normal scans, we can randomise the MAC address sent out in active scheduled scans. Add the randomise option to sched_scan (and net-detect) parsing code. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- iw.h | 2 +- scan.c |

[PATCH iw v2 2/4] iw: implement scheduled scan

2015-03-17 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@nokia.com Add sched_start, sched_stop and events parsing for scheduled scan. For now, only passive scans are supported. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- event.c | 9 + info.c | 6 ++ scan.c | 29

[PATCH] nl80211: add net-detect delay to wowlan info

2015-03-17 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Pass the initial net-detect delay (NL80211_ATTR_SCHED_SCAN_DELAY) attribute in the WoWLAN info response. Additionally, remove a bogus TODO comment. Signed-off-by: Luciano Coelho luciano.coe...@intel.com Reviewed-by: Emmanuel Grumbach

[PATCH iw 4/4] iw: add randomise option for sched_scan

2015-03-13 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Like with normal scans, we can randomise the MAC address sent out in active scheduled scans. Add the randomise option to sched_scan (and net-detect) parsing code. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- iw.h | 2 +- scan.c |

[PATCH iw 3/4] iw: add support for active scheduled scan

2015-03-13 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Add options to explicitly use active or passive scans on schedule scans (and net-detect). If neither active nor passive parameters are passed, the default is to do active scans with the wildcard SSID. Signed-off-by: Luciano Coelho

[PATCH iw 2/4] iw: implement scheduled scan

2015-03-13 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@nokia.com Add sched_start, sched_stop and events parsing for scheduled scan. For now, only passive scans are supported. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- event.c | 9 + info.c | 6 ++ scan.c | 29

[PATCH iw 1/4] iw: move generic sched scan parsing code out of net detect

2015-03-13 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com The scheduled scan structure is pretty much the same as the net-detect WoWLAN trigger's. Move the bulk of the command line parsing code to a generic function so we can reuse it for sched_scan. Signed-off-by: Luciano Coelho luciano.coe...@intel.com

[PATCH iw 0/4] iw: add scheduled scan support

2015-03-13 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com This series adds scheduled scan support to the iw tool (finally! ;). Luciano Coelho (4): iw: move generic sched scan parsing code out of net detect iw: implement scheduled scan iw: add support for active scheduled scan iw: add randomise

[PATCH iw 2/2] iw: add a delay option to net-detect

2015-03-13 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Add an option that allows the initial net-detect scan to be delayed by the specified number of seconds. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- wowlan.c | 31 +++ 1 file changed, 27 insertions(+), 4

[PATCH iw 0/2] add option to pass initial delay to net-detect

2015-03-13 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Just adding a cover-letter because of the nl80211.h update. This patchset adds an option to add an initial delay before the net-detect scans start running. Luciano Coelho (2): update nl80211.h iw: add a delay option to net-detect nl80211.h |

[PATCH iw 1/2] update nl80211.h

2015-03-13 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- nl80211.h | 207 -- 1 file changed, 176 insertions(+), 31 deletions(-) diff --git a/nl80211.h b/nl80211.h index c0383e9..ae16ba9

Re: broadcast ssid in scheduled scan

2015-04-01 Thread Luca Coelho
On Tue, 2015-03-31 at 16:21 +0200, Johannes Berg wrote: On Mon, 2015-03-23 at 19:38 +0100, Arend van Spriel wrote: Johannes, Jouni, I have noticed that under some circumstances wpa_supplicant initiates a scheduled scan with broadcast ssid. This is something our firmware can not do so

Re: [PATCH v2] wlcore: add basic device-tree support

2015-02-26 Thread Luca Coelho
Hi, On Sun, 2015-02-15 at 13:09 +0200, Eliad Peller wrote: When running with device-tree, we no longer have a board file that can set up the platform data for wlcore. Allow this data to be passed from DT. For now, parse only the irq used. Other (optional) properties can be added later on.

Re: [PATCH v3 1/2] dt: bindings: add wl18xx wireless device

2015-02-26 Thread Luca Coelho
On Thu, 2015-02-19 at 18:13 +0200, Eliad Peller wrote: Add device tree binding documentation for TI's wl18xx wlan chip. Signed-off-by: Eliad Peller el...@wizery.com --- If, as I said in the other thread, you use the work I did earlier, support for wl12xx will also be included... -- Luca.

Re: Ubuntu regulatory database

2015-04-26 Thread Luca Coelho
On Mon, 2015-04-27 at 08:08 +0300, Kalle Valo wrote: Seth Forshee seth.fors...@canonical.com writes: On Sat, Apr 25, 2015 at 06:26:34PM +0100, Nuno Gonçalves wrote: I was surprised that the wireless regdb provided with Ubuntu 15.04 is almost 2 years old. Are you aware of the reason

Re: debian: crda package depends on iw?

2015-06-02 Thread Luca Coelho
On Fri, 2015-05-29 at 14:47 +0100, Ben Hutchings wrote: On Fri, 2015-05-29 at 16:24 +0300, Luca Coelho wrote: Hi Ben, I just noticed that the crda package depends on the iw package in Debian (I'm using jessie): luca@weizen:~$ apt-cache show crda Package: crda Version: 3.13-1

[PATCH py80211 0/4] py80211: add support for scheduled scan

2015-06-12 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Hi Arend, Here's a small patchset that adds support for scheduled scans in py80211. I'm not sure this is the right approach, I added separate classes for each command, so feel free to ask me to change it completely if you want and I may or may not

Re: [PATCH py80211 0/4] py80211: add support for scheduled scan

2015-06-16 Thread Luca Coelho
Hi Arend, On Sat, 2015-06-13 at 08:26 +0200, Arend van Spriel wrote: On 12-06-15 16:00, Luca Coelho wrote: Here's a small patchset that adds support for scheduled scans in py80211. Thanks! One general remark. It seems you are using soft-tabs where I stick to true tabs. Python is pretty

[PATCH py80211] py80211: scan: fix call to _add_scan_attrs() in the sched_scan_start class

2015-06-16 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com We should not pass self explicitly when calling the superclass's _add_scan_attrs() in the sched_scan_start class. Fix it. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- lib/scan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH py80211 4/4] py80211: scan: add matchsets support for scheduled scans

2015-06-12 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Modify the sched_scan_start class so that the caller can pass a list of matches to be used in the scheduled scan request. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- lib/scan.py | 24 1 file changed, 24

[PATCH py80211 1/4] py80211: scan: spin base scan classes off scan_request

2015-06-12 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Most of the scan_request code can be reused for scheduled scan, so spin the common part off the regular scan class. Additionally, add one extra class that is able to send scan commands (for sched_scan stop, for instance) without adding any scan

[PATCH py80211 2/4] py80211: scan: add sched_scan start class

2015-06-12 Thread Luca Coelho
From: Luciano Coelho luciano.coe...@intel.com Add a class to start scheduled scans. Signed-off-by: Luciano Coelho luciano.coe...@intel.com --- lib/scan.py | 20 1 file changed, 20 insertions(+) diff --git a/lib/scan.py b/lib/scan.py index 5ccae55..bfaf4da 100644 ---

  1   2   3   4   5   6   7   8   9   10   >