[PATCH v2] nl80211: Emit a SET_INTERFACE on iftype change

2018-10-19 Thread Andrew Zaborowski
->change_virtual_intf. Signed-off-by: Andrew Zaborowski --- net/wireless/nl80211.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index ac08ba5f0a..de727a69c4 100644 --- a/net/wireless/nl80211.c +++ b/net/wirel

Re: [PATCH] nl80211: Emit a NEW_INTERFACE on iftype change

2018-10-19 Thread Andrew Zaborowski
On Fri, 19 Oct 2018 at 08:48, Johannes Berg wrote: > On Fri, 2018-10-19 at 04:37 +0200, Andrew Zaborowski wrote: > > Let userspace learn about iftype changes by sending an > > NL80211_CMD_NEW_INTERFACE when handling a NL80211_CMD_SET_INTERFACE > > command. There seems to be

[PATCH] nl80211: Emit a NEW_INTERFACE on iftype change

2018-10-18 Thread Andrew Zaborowski
->change_virtual_intf. Signed-off-by: Andrew Zaborowski --- net/wireless/nl80211.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index ac08ba5f0a..7b6b214bb4 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -3165,6 +3165

[PATCH] nl80211: Fix a GET_KEY reply attribute

2018-09-24 Thread Andrew Zaborowski
Use the NL80211_KEY_IDX attribute inside the NL80211_ATTR_KEY in NL80211_CMD_GET_KEY responses to comply with nl80211_key_policy. This is unlikely to affect existing userspace. Signed-off-by: Andrew Zaborowski --- net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH] nl80211: Reject disconnect commands except from conn_owner

2018-05-22 Thread Andrew Zaborowski
On 22 May 2018 at 09:53, Arend van Spriel <arend.vanspr...@broadcom.com> wrote: > On 5/22/2018 2:46 AM, Andrew Zaborowski wrote: >> Reject NL80211_CMD_DISCONNECT, NL80211_CMD_DISASSOCIATE, >> NL80211_CMD_DEAUTHENTICATE and NL80211_CMD_ASSOCIATE commands >> from client

[PATCH] nl80211: Reject disconnect commands except from conn_owner

2018-05-21 Thread Andrew Zaborowski
processes try to use nl80211 at the same time, it's not a security measure. The same thing should possibly be done for JOIN_IBSS/LEAVE_IBSS and START_AP/STOP_AP. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- net/wireless/nl80211.c | 16 1 file chang

[PATCH] mac80211_hwsim: Fix radio dump for radio idx 0

2018-05-21 Thread Andrew Zaborowski
Since 6335698e24ec11e1324b916177da6721df724dd8 the radio with idx of 0 will not get dumped in HWSIM_CMD_GET_RADIO because of the last_idx checks. Offset cb->args[0] by 1 similarly to what is done in nl80211.c. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- dr

Re: [PATCH] nl80211: Reject disconnect commands except from conn_owner

2018-05-08 Thread Andrew Zaborowski
Hi, On 8 May 2018 at 14:19, Johannes Berg <johan...@sipsolutions.net> wrote: > On Tue, 2018-05-08 at 14:18 +0200, Arend van Spriel wrote: >> On 5/7/2018 9:19 PM, Johannes Berg wrote: >> > On Sun, 2018-04-29 at 20:30 +0200, Andrew Zaborowski wrote: >> > > On 28

Re: [PATCH] nl80211: Reject disconnect commands except from conn_owner

2018-04-29 Thread Andrew Zaborowski
On 28 April 2018 at 15:07, Kalle Valo <kv...@codeaurora.org> wrote: > Andrew Zaborowski <andrew.zaborow...@intel.com> writes: >> Reject NL80211_CMD_DISCONNECT, NL80211_CMD_DISASSOCIATE, >> NL80211_CMD_DEAUTHENTICATE and NL80211_CMD_ASSOCIATE commands >> from client

[PATCH] nl80211: Reject disconnect commands except from conn_owner

2018-04-27 Thread Andrew Zaborowski
Reject NL80211_CMD_DISCONNECT, NL80211_CMD_DISASSOCIATE, NL80211_CMD_DEAUTHENTICATE and NL80211_CMD_ASSOCIATE commands from clients other than the connection owner set in the connect, authenticate or associate commands, if it was set. The main point of this check is to prevent chaos when two

[PATCH] mac80211_hwsim: Set wmediumd for new radios

2018-03-21 Thread Andrew Zaborowski
d data->wmedium could be replaced with a pointer to hwsim_net. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- drivers/net/wireless/mac80211_hwsim.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac8021

Re: [PATCH 2/2][RFC] mac80211_hwsim: Report radio addresses in NEW_RADIO/GET_RADIO

2017-02-27 Thread Andrew Zaborowski
Hi, On 27 February 2017 at 18:10, Ben Greear <gree...@candelatech.com> wrote: > On 02/27/2017 07:26 AM, Andrew Zaborowski wrote: >> As it turns out it can be read from /sys, but I do need it so I can >> know what to put in HWSIM_ATTR_ADDR_RECEIVER based on the destination

Re: [PATCH 2/2][RFC] mac80211_hwsim: Report radio addresses in NEW_RADIO/GET_RADIO

2017-02-27 Thread Andrew Zaborowski
Hi, On 27 February 2017 at 14:27, Johannes Berg wrote: >> Additionally I tried to add a HWSIM_ATTR_WIPHY to report the wiphy >> index directly without users going through wiphy name to index >> mapping, but get_wiphy_idx() is internal to cfg80211. The index is >>

Re: [PATCH 1/2] mac80211_hwsim: Make sure NEW_RADIO contains final name

2017-02-27 Thread Andrew Zaborowski
Hi, On 27 February 2017 at 14:24, Johannes Berg <johan...@sipsolutions.net> wrote: > On Fri, 2017-02-24 at 01:08 +0100, Andrew Zaborowski wrote: >> Also related to this I find that the HWSIM_ATTR_RADIO_NAME attributes >> emitted contain the name string and are exactly of the

Re: [PATCH 162/306] mac80211-hwsim: add length checks before allocating skb.

2017-02-24 Thread Andrew Zaborowski
On 24 February 2017 at 01:28, wrote: > Modify the receive-from-user-space logic to do length > and 'is-down' checks before trying to allocate an skb. > > And, if we are going to ignore the pkt due to radio idle, > then do not return an error code to user-space.

Re: [PATCH 1/2] mac80211_hwsim: Make sure NEW_RADIO contains final name

2017-02-23 Thread Andrew Zaborowski
On 23 February 2017 at 13:02, Andrew Zaborowski <andrew.zaborow...@intel.com> wrote: > ieee80211_alloc_hw_nm will validate the requested name (if any) before > creating the new device and may use a name different from the one > requested rather than fail. Make sure the HWSIM_CMD_NE

Re: [PATCH 2/2][RFC] mac80211_hwsim: Report radio addresses in NEW_RADIO/GET_RADIO

2017-02-23 Thread Andrew Zaborowski
On 23 February 2017 at 20:01, Benjamin Beichler wrote: >> Add a HWSIM_ATTR_RADIO_ADDR attribute to those to events/response so >> that a userspace medium can query the list of addresses in the >> simulator. >> >> When a userspace medium needs to handle a

[PATCH 1/2] mac80211_hwsim: Make sure NEW_RADIO contains final name

2017-02-23 Thread Andrew Zaborowski
that mac80211_hwsim_new_radio may now modify params. A check for duplicate radio name could be added separately. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- drivers/net/wireless/mac80211_hwsim.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wi

[PATCH 2/2][RFC] mac80211_hwsim: Report radio addresses in NEW_RADIO/GET_RADIO

2017-02-23 Thread Andrew Zaborowski
ers to the address of the hwsim receiving radio. I suspect the network layers can change address 0 and they will be out of sync. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- Additionally I tried to add a HWSIM_ATTR_WIPHY to report the wiphy index directly without users going thro

Re: [PATCH v6 1/3] cfg80211: Accept multiple RSSI thresholds for CQM

2017-02-20 Thread Andrew Zaborowski
Hi, On 15 February 2017 at 09:58, Kalle Valo <kv...@codeaurora.org> wrote: > Johannes Berg <johan...@sipsolutions.net> writes: >> On Fri, 2017-02-10 at 10:02 +0100, Andrew Zaborowski wrote: >>> Change the SET CQM command's RSSI threshold attribute to accep

Re: [PATCH v4 3/5] cfg80211: Accept multiple RSSI thresholds for CQM

2017-02-10 Thread Andrew Zaborowski
On 8 February 2017 at 13:32, Johannes Berg wrote: >> > I think it would make sense to unconditionally apply the hysteresis >> > to low/high, i.e. always set >> > low = low - hyst >> > high = high + hyst >> > >> > so that you get "sticky" ranges once you're in them? >>

[PATCH v6 1/3] cfg80211: Accept multiple RSSI thresholds for CQM

2017-02-10 Thread Andrew Zaborowski
drivers if offloaded or done in the drivers. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- changes in v3: - define NL80211_EXT_FEATURE_CQM_RSSI_LIST which drivers need to set if they implement set_cqm_rssi_range_config (mac80211 is a special case) - error check the k

[PATCH v5 2/3] mac80211: Add set_cqm_rssi_range_config

2017-02-09 Thread Andrew Zaborowski
Support .set_cqm_rssi_range_config if the beacons are available for processing in mac80211. There's no reason that this couldn't be offloaded by mac80211-based drivers but there's no driver method for that added in this patch. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.

[PATCH v5 3/3] wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers

2017-02-09 Thread Andrew Zaborowski
by ieee80211_set_cqm_rssi_range_config are crossed. Remaining (few) drivers need code to enable the firmware to monitor the thresholds. This is mostly only compile-tested. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- drivers/net/wireless/admtek/adm

Re: [PATCH v4 3/5] cfg80211: Accept multiple RSSI thresholds for CQM

2017-02-08 Thread Andrew Zaborowski
Hi, On 8 February 2017 at 10:58, Johannes Berg wrote: > >> This method doesn't have a hysteresis parameter because there's no >> benefit to the cfg80211 code from having the hysteresis be handled by >> hardware/driver in terms of the number of wakeups. At the same

[PATCH v4 1/5] mac80211: Pass new RSSI level in CQM RSSI notification

2017-01-25 Thread Andrew Zaborowski
or below threshold so we don't pass any value at this time (parameter is 0). Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 ++ drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +- drivers/net/wireless/st/cw1200/sta.c

[PATCH v4 4/5] mac80211: Add set_cqm_rssi_range_config

2017-01-25 Thread Andrew Zaborowski
Support .set_cqm_rssi_range_config if the beacons are available for processing in mac80211. There's no reason that this couldn't be offloaded by mac80211-based drivers but there's no driver method for that added in this patch as I don't have the hardware. Signed-off-by: Andrew Zaborowski

[PATCH v4 5/5] wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers

2017-01-25 Thread Andrew Zaborowski
by ieee80211_set_cqm_rssi_range_config are crossed. Remaining (few) drivers need code to enable the firmware to monitor the thresholds. This is mostly only compile-tested. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- drivers/net/wireless/admtek/adm

[PATCH v4 2/5] cfg80211: Pass new RSSI level in CQM RSSI notification

2017-01-25 Thread Andrew Zaborowski
. Without this, the new cfg80211 code (patch 3) will call .get_station which will send a duplicate HostCmd_CMD_RSSI_INFO command to the hardware. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- drivers/net/wireless/marvell/mwifiex/sta_event.c | 4 ++-- drivers/net/wi

Re: [PATCH v3 4/4] mac80211: Add set_cqm_rssi_range_config

2017-01-24 Thread Andrew Zaborowski
Hi, On 24 January 2017 at 16:18, Johannes Berg <johan...@sipsolutions.net> wrote: > On Fri, 2017-01-20 at 09:55 +0100, Andrew Zaborowski wrote: >> Support .set_cqm_rssi_range_config if the beacons are available for >> processing in mac80211. There's no reason that this cou

[PATCH v3 1/4] mac80211: Pass new RSSI level in CQM RSSI notification

2017-01-20 Thread Andrew Zaborowski
or below threshold so we don't pass any value at this time (parameter is 0). Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 ++ drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +- drivers/net/wireless/st/cw1200/sta.c

[PATCH v3 3/4] cfg80211: Accept multiple RSSI thresholds for CQM

2017-01-20 Thread Andrew Zaborowski
of the number of wakeups. At the same time the behavior would likely be less consistent between drivers if offloaded or done in the drivers. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- changes in v3: - define NL80211_EXT_FEATURE_CQM_RSSI_LIST which drivers need

[PATCH v3 4/4] mac80211: Add set_cqm_rssi_range_config

2017-01-20 Thread Andrew Zaborowski
feature is automatically set during ieee80211_register_hw if the default interface being created doesn't indicate beacon filtering enabled. For drivers that don't want a default interface but want to support this feature the flag needs to be set explicitly in the driver. Signed-off-by: Andrew

[PATCH v3 2/4] cfg80211: Pass new RSSI level in CQM RSSI notification

2017-01-20 Thread Andrew Zaborowski
. Without this, the new cfg80211 code (patch 3) will call .get_station which will send a duplicate HostCmd_CMD_RSSI_INFO command to the hardware. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- drivers/net/wireless/marvell/mwifiex/sta_event.c | 4 ++-- drivers/net/wi

Re: [PATCH v2 3/4] cfg80211: Accept multiple RSSI thresholds for CQM

2017-01-07 Thread Andrew Zaborowski
Hi, On 5 January 2017 at 06:49, Johannes Berg <johan...@sipsolutions.net> wrote: > On Wed, 2017-01-04 at 15:19 -0500, Andrew Zaborowski wrote: >> On 4 January 2017 at 10:53, Johannes Berg <johan...@sipsolutions.net> >> wrote: >> > Thus, you either need a

[PATCH v5] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

2017-01-06 Thread Andrew Zaborowski
, in the deamon restart code or in the up/down scripts without the use of this attribute. But there will be systems where the daemon can go away for varying periods without a warning due to local resource management. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- changes in v2:

Re: [PATCH v4] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

2017-01-06 Thread Andrew Zaborowski
Hi, On 5 January 2017 at 04:56, Johannes Berg <johan...@sipsolutions.net> wrote: > On Wed, 2017-01-04 at 15:35 -0500, Andrew Zaborowski wrote: >> On 4 January 2017 at 10:40, Johannes Berg <johan...@sipsolutions.net> >> wrote: >> > This also doesn't seem right

Re: [PATCH v4] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

2017-01-04 Thread Andrew Zaborowski
On 4 January 2017 at 10:40, Johannes Berg wrote: >> +++ b/net/wireless/mlme.c >> @@ -340,6 +340,8 @@ int cfg80211_mlme_deauth(struct >> cfg80211_registered_device *rdev, >> >> ASSERT_WDEV_LOCK(wdev); >> >> + wdev->conn_owner_nlportid = 0; > > Is this really

Re: [PATCH v2 3/4] cfg80211: Accept multiple RSSI thresholds for CQM

2017-01-04 Thread Andrew Zaborowski
Hi, On 4 January 2017 at 10:53, Johannes Berg wrote: > Should userspace really just get -EOPNOTSUPP back? In what circumstance? > > Also, this whole business with using an array in the existing > NL80211_ATTR_CQM_RSSI_THOLD is not very backward compatible, because an

[PATCH v4] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

2016-12-17 Thread Andrew Zaborowski
, in the deamon restart code or in the up/down scripts without the use of this attribute. But there will be systems where the daemon can go away for varying periods without a warning due to local resource management. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- changes in v2:

Re: [PATCH 3/3][RFC] nl80211/mac80211: Accept multiple RSSI thresholds for CQM

2016-12-17 Thread Andrew Zaborowski
On 13 December 2016 at 11:11, Johannes Berg wrote: > >> I wasn't clear: nl80211 sets the thresholds so that "high" is higher >> than last known value and "low" is lower than last known value, also >> the distance is at least 2 x hysteresis. There's no purpose for >>

Re: [PATCH v3] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

2016-12-17 Thread Andrew Zaborowski
Hi, On 13 December 2016 at 10:33, Johannes Berg wrote: > [snip] > > Please fix coding style, particularly indentation. Ok, fixed the wrapped lines. > >> +static void cfg80211_disconnect_wk(struct work_struct *work) >> +{ >> + struct cfg80211_registered_device

[PATCH v3] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

2016-12-12 Thread Andrew Zaborowski
, in the deamon restart code or in the up/down scripts without the use of this attribute. But there will be systems where the daemon can go away for varying periods without a warning due to local resource management. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- changes in v2:

[PATCH] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

2016-12-12 Thread Andrew Zaborowski
, in the deamon restart code or in the up/down scripts without the use of this attribute. But there will be systems where the daemon can go away for varying periods without a warning due to local resource management. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- include/net/cfg8

Re: [PATCH] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

2016-12-12 Thread Andrew Zaborowski
On 12 December 2016 at 08:21, Marcel Holtmann wrote: >> Disconnect or deauthenticate when the owning socket is closed if this >> flag is supplied to CMD_CONNECT or CMD_AUTHENTICATE. This may be used >> to ensure userspace daemon doesn't leave an unmanaged connection behind.

[PATCH v2 4/4] mac80211: Add set_cqm_rssi_range_config

2016-12-11 Thread Andrew Zaborowski
Support .set_cqm_rssi_range_config if the beacons are available for processing in mac80211. There's no reason that this couldn't be offloaded by mac80211-based drivers but there's no driver method for that added in this patch as I don't have the hardware. Signed-off-by: Andrew Zaborowski

[PATCH v2 1/4] mac80211: Pass new RSSI level in CQM RSSI notification

2016-12-11 Thread Andrew Zaborowski
Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 ++ drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +- drivers/net/wireless/st/cw1200/sta.c| 2 +- drivers/net/wireless/ti/wl1251/event.c | 4 ++-- drive

[PATCH] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

2016-12-11 Thread Andrew Zaborowski
, in the deamon restart code, or in the up/down scripts without the use of this attribute. But there will be systems where the daemon can go away for varying periods without a warning due to local resource management. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- include/net/cf

Re: [PATCH][RFC] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

2016-12-07 Thread Andrew Zaborowski
On 7 December 2016 at 07:19, Johannes Berg wrote: >> Possibly Johanness refers to the fact that if you use >> CMD_AUTHENTICATE, or if you use CMD_CONNECT but the driver implements >> the SME -- doesn't use the cfg80211 software SME -- then >> cfg80211_disconnect won't

Re: [PATCH][RFC] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

2016-12-06 Thread Andrew Zaborowski
Hi, On 6 December 2016 at 22:42, Denis Kenzior wrote: > On 12/06/2016 01:16 AM, Johannes Berg wrote: >> Anyway ... I'm not even super against this patch, but you need to fix >> things: >> * this is actually wrong for authenticate - I'll let you figure out >> why by

[PATCH][RFC] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

2016-12-02 Thread Andrew Zaborowski
Disconnect or deauthenticate when the owning socket is closed if this flag has been supplied to CMD_CONNECT, CMD_AUTHENTICATE or CMD_ASSOCIATE. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- include/net/cfg80211.h | 5 + include/uapi/linux/nl80211.h | 3 ++

Re: [PATCH 3/3][RFC] nl80211/mac80211: Accept multiple RSSI thresholds for CQM

2016-11-28 Thread Andrew Zaborowski
On 28 November 2016 at 16:35, Johannes Berg <johan...@sipsolutions.net> wrote: > On Mon, 2016-11-28 at 16:29 +0100, Andrew Zaborowski wrote: >> In order to keep the hardware offload feature when working with >> hardware that can only offload the old single-thresholds

[PATCH 3/3][RESEND][RFC] nl80211/mac80211: Accept multiple RSSI thresholds for CQM

2016-11-22 Thread Andrew Zaborowski
Change the SET CQM command RSSI threshold attribute semantic to accept any number of thresholds as a sorted array. The API should be backwards compatible so that if one s32 threshold value is passed, the old mechanism is enabled. The netlink event generated is the same too. cfg80211 handles an

[PATCH 2/3][RESEND] cfg80211: Pass new RSSI level in CQM RSSI notification

2016-11-22 Thread Andrew Zaborowski
Update the drivers to pass the RSSI level as a cfg80211_cqm_rssi_notify parameter and pass this value to userspace in a new nl80211 attribute. This helps both userspace and also helps in the implementation of the multiple RSSI thresholds CQM mechanism. Note for marvell/mwifiexe I pass 0 for the

[PATCH 3/3][RFC] nl80211/mac80211: Accept multiple RSSI thresholds for CQM

2016-11-05 Thread Andrew Zaborowski
Change the SET CQM command RSSI threshold attribute semantic to accept any number of thresholds as a sorted array. The API should be backwards compatible so that if one s32 threshold value is passed, the old mechanism is enabled. The netlink event generated is the same too. cfg80211 handles an

[PATCH 0/3][RFC] CQM RSSI event with many thresholds

2016-11-05 Thread Andrew Zaborowski
From: Andrew Zaborowski <balr...@gmail.com> This is a first stab at a nl80211 API using multiple RSSI thresholds discussed previously. It is similar to the current CQM RSSI event with one threshold and a hysteresis parameter. I tried to avoid creating new nl80211 commands and event

[PATCH 2/3][RFC] cfg80211: Pass new RSSI level in CQM RSSI notification

2016-11-05 Thread Andrew Zaborowski
Update the drivers to pass the RSSI level as a cfg80211_cqm_rssi_notify parameter and pass this value to userspace in a new nl80211 attribute. This helps both userspace and also helps in the implementation of the multiple RSSI thresholds CQM mechanism. Note for marvell/mwifiexe I pass 0 for the

[PATCH 1/3][RFC] mac80211: Pass new RSSI level in CQM RSSI notification

2016-11-05 Thread Andrew Zaborowski
--- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 ++ drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +- drivers/net/wireless/st/cw1200/sta.c| 2 +- drivers/net/wireless/ti/wl1251/event.c | 4 ++-- drivers/net/wireless/ti/wlcore/event.c | 3 ++- include/net/mac80211.h

[PATCH][RFC] nl80211/mac80211: Rounded RSSI reporting

2016-10-20 Thread Andrew Zaborowski
Hi, I'm looking for a way to enable userspace to receive RSSI updates without polling and waking up only as often as needed, for use in a wifi daemon oriented for low power. Userspace tends to display a wifi icon with the rssi shown as a number of "signal bars", usually 4, 5, or 6. This patch