Re: Monitor mode 'cook' flag meaning

2017-02-21 Thread Johannes Berg
(please quote properly) On Mon, 2017-02-20 at 18:46 -0700, Thomas d'Otreppe wrote: > Do you have any example of devices where control or otherbss would be > useful? Would both be for FullMAC devices? No, I don't really know. johannes

Re: wpa psk offloading

2017-02-21 Thread Johannes Berg
On Tue, 2017-02-21 at 10:20 +0100, Arend Van Spriel wrote: > Hi Johannes, > > Internally I am asked to look at "pmk plumbing" patches allowing > firmware to deal with 4-way handshake. Now I noticed this topic being > discussed during last wireless workshop in Santa Fe [1]. > > I do not recall any

Re: [PATCH] ath10k: fix recent bandwidth conversion bug

2017-11-13 Thread Johannes Berg
On Thu, 2017-11-02 at 22:08 +0100, Sebastian Gottschall wrote: > i know. saw that later too. code should be safe It would be good if you could adhere to our mailing list customs and start quoting properly, instead of just top-posting. Thanks, johannes

Re: [PATCH v2 3/4] cfg80211: reg: remove support for built-in regdb

2017-11-13 Thread Johannes Berg
On Mon, 2017-11-13 at 10:19 +0100, Benjamin Beichler wrote: > > Is there already an example regulatory.db file available? There isn't yet, Seth? > And is there already a tool chain for creating the new format? I posted a patch: https://patchwork.kernel.org/patch/9992477/ for the regdb project.

Re: [PATCH] mac80211: Update last_ack status for all except probing frames

2017-11-13 Thread Johannes Berg
On Mon, 2017-11-06 at 20:20 +, Rajkumar Manoharan wrote: > > > For steering an idle station from one BSS to another, the steering > > > application has to know the actual station idle period. But if the > > > idle period is cleared by ap_max_inactivity, the steering application > > > cannot ste

Re: [PATCH] IW: Zero or Uninitialized value of keylen passing

2017-11-13 Thread Johannes Berg
On Thu, 2017-11-02 at 11:28 +, Amit Khatri wrote: > From b755c8ee282abbd0008e9e7241c457662c90f2c3 Mon Sep 17 00:00:00 2001 > From: Amit Khatri > Date: Thu, 2 Nov 2017 15:55:16 +0530 > Subject: [PATCH] IW: Zero or Uninitialized value of keylen passing > > In case of hexadeciaml keydata, keylen

Re: [PATCH] cfg80211: Include length of kek in rekey data

2017-11-13 Thread Johannes Berg
On Wed, 2017-10-25 at 14:49 +0530, Vidyullatha Kanchanapally wrote: > With support for new AKM suites (example FILS-SHA256), the KEK length > can now be more than NL80211_KEK_LEN and the KCK length can be zero. > Add changes in cfg80211 to specify the length of KEK, and make KCK > optional. Make NL

Re: [RFC PATCH 2/2] nl80211: implement beacon change notifier

2017-11-13 Thread Johannes Berg
On Thu, 2017-11-09 at 12:40 +0300, Sergey Matyukevich wrote: > From: Vasily Ulyanov > > Notify user-space listeners about beacon data change. What would this be needed for, and why couldn't you just directly talk to hostapd/wpa_s? johannes

Re: [RFC] cfg80211: Implement Multiple BSSID capability in scanning

2017-11-13 Thread Johannes Berg
Hi, Thanks for working on this. > +u8 *gen_new_bssid(const u8 *bssid, u8 max_bssid, u8 mbssid_index, gfp_t gfp) I looks like this should be static? I'm also pretty sure you leak the result, I guess you shouldn't allocate memory here. Just passing in a pointer to a buffer (that could be on the st

Re: Setting single rate in ath10k broken by "reject/clear user rate mask if not usable"

2017-11-13 Thread Johannes Berg
On Fri, 2017-10-27 at 13:41 -0700, Ben Greear wrote: > ath10k ignores the tx rateset pretty much entirely when sending management > frames, so even if you set the tx rateset to have only VHT MCS 8, > management frames are still sent with legacy ratesets. So that's a driver bug. > My end goal abo

Re: [RFC PATCH 2/2] nl80211: implement beacon change notifier

2017-11-13 Thread Johannes Berg
Hi, > I apologize for email duplication, but it looks like reply from Vasily > has been rejected due to Outlook issues. While we choose between mutt > and gnus, here I briefly repeat the rationale behind these RFC patches. :) > The nl80211 get_beacon callback appears to be useful in the case whe

[PATCH] nl80211: add a few extended error strings to key parsing

2017-11-13 Thread Johannes Berg
From: Johannes Berg This mostly serves as an example for how to add error strings and erroneous attribute pointers. Signed-off-by: Johannes Berg --- net/wireless/nl80211.c | 61 +- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a

Re: [PATCH v2 3/4] cfg80211: reg: remove support for built-in regdb

2017-11-13 Thread Johannes Berg
On Mon, 2017-11-13 at 15:34 +0100, Benjamin Beichler wrote: > Am 13.11.2017 um 14:36 schrieb Seth Forshee: > > On Mon, Nov 13, 2017 at 10:23:09AM +0100, Johannes Berg wrote: > > > On Mon, 2017-11-13 at 10:19 +0100, Benjamin Beichler wrote: > > > > Is there already

Re: [PATCH v2 3/4] cfg80211: reg: remove support for built-in regdb

2017-11-13 Thread Johannes Berg
On Mon, 2017-11-13 at 15:48 +0100, Benjamin Beichler wrote: > > Then this may be a bug, since the loading the regulatory.db fails > (platform regulatory.0: Direct firmware load for regulatory.db failed > with error -2) also, when CONFIG_CFG80211_REQUIRE_SIGNED_REGDB is not > set (and of course CON

Re: [RFC] cfg80211: Implement Multiple BSSID capability in scanning

2017-11-14 Thread Johannes Berg
> + if (tmp_old[0] == WLAN_EID_VENDOR_SPECIFIC) { > + if (!memcmp(tmp_old + 2, tmp + 2, 5)) { > + /* same vendor ie, copy from new ie */ > + memcpy(pos, tmp, tmp[1] + 2); > +

Re: [RFC] cfg80211: Implement Multiple BSSID capability in scanning

2017-11-14 Thread Johannes Berg
On Tue, 2017-11-14 at 14:20 +, Peng Xu wrote: > > > > > + if (tmp_old[0] == WLAN_EID_VENDOR_SPECIFIC) { > > > + if (!memcmp(tmp_old + 2, tmp + 2, 5)) { > > > + /* same vendor ie, copy from new ie > > > > */ > > > +

Re: [RFC] cfg80211: Implement Multiple BSSID capability in scanning

2017-11-14 Thread Johannes Berg
> > > > This may be right for the WFA/Microsoft OUI, but not necessary anything > > else? > > > > Right, I only considered the most common cases since I did not find a > generic way to compare two vendor elements. Any suggestion? Right, not really. I'm not even sure why this is necessary anyw

Re: [bug report] mac80211: fix VLAN handling with TXQs

2017-11-15 Thread Johannes Berg
Hi Dan, > This is a semi-automatic email about new static checker warnings. > > The patch 531682159092: "mac80211: fix VLAN handling with TXQs" from > Jun 22, 2017, leads to the following Smatch complaint: > > net/mac80211/tx.c:3529 ieee80211_tx_dequeue() > error: we previously assumed

Re: What would it take to get WDS working with channel contexts?

2017-11-17 Thread Johannes Berg
On Thu, 2017-11-16 at 16:28 -0800, Ben Greear wrote: > I have a user interested in getting WDS working on ath10k, but evidently > this is not supported since ath10k uses channel-contexts: > > From net/mac80211/main.c: > > /* >* WDS is currently prohibited when chann

[PATCH] mac80211: properly free requested-but-not-started TX agg sessions

2017-11-20 Thread Johannes Berg
From: Johannes Berg When deleting a station or otherwise tearing down all aggregation sessions, make sure to delete requested but not yet started ones, to avoid the following scenario: * session is requested, added to tid_start_tx[] * ieee80211_ba_session_work() runs, gets past BLOCK_BA check

pull-request: mac80211 2017-11-20

2017-11-20 Thread Johannes Berg
mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl() Johannes Berg (3): nl80211: don't expose wdev->ssid for most interfaces cfg80211: initialize regulatory keys/database later mac80211: properly free requested-but-not-started TX agg sessions Kees Cook (2):

Re: [PATCH] mac80211: Update last_ack status for all except probing frames

2017-11-20 Thread Johannes Berg
On Wed, 2017-11-15 at 19:21 +, Rajkumar Manoharan wrote: > > > Hmm.. But polling TX/RX counters will not give exact activity time. Yeah but if you do it every minute, you'll know if it was idle for roughly 5 minutes, or so... dunno, things could be done. > Moreover > It will be useful if ST

Re: pull-request: mac80211 2017-11-20

2017-11-21 Thread Johannes Berg
On Tue, 2017-11-21 at 20:17 +0900, David Miller wrote: > From: Johannes Berg > Date: Mon, 20 Nov 2017 17:06:44 +0100 > > > ssh://korg/pub/scm/linux/kernel/git/jberg/mac80211.git > > tags/mac80211-for-davem-2017-11-20 > > That's an awesome URL, but I don't

[PATCH] mac80211: use QoS NDP for AP probing

2017-11-21 Thread Johannes Berg
From: Johannes Berg When connected to a QoS/WMM AP, mac80211 should use a QoS NDP for probing it, instead of a regular non-QoS one, fix this. Change all the drivers to *not* allow QoS NDP for now, even though it looks like most of them should be OK with that. Signed-off-by: Johannes Berg

Re: kernel BUG at crypto/asymmetric_keys/public_key.c:80

2017-11-22 Thread Johannes Berg
On Wed, 2017-11-22 at 19:29 +0100, Arend van Spriel wrote: > + Johannes > > >>> BUG_ON(!sig->digest); > BUG_ON(!sig->s); I *think* this is the same bug that was reported before, then this should fix it: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=d7be10

Re: kernel BUG at crypto/asymmetric_keys/public_key.c:80

2017-11-23 Thread Johannes Berg
On Wed, 2017-11-22 at 15:07 -0800, Florian Fainelli wrote: > On 11/22/2017 10:42 AM, Johannes Berg wrote: > > On Wed, 2017-11-22 at 19:29 +0100, Arend van Spriel wrote: > > > + Johannes > > > > > > >>> BUG_ON(!sig->digest); > > >

Re: kernel BUG at crypto/asymmetric_keys/public_key.c:80

2017-11-23 Thread Johannes Berg
On Thu, 2017-11-23 at 09:47 -0800, Florian Fainelli wrote: > Absolutely, please find it enclosed. Thanks. This is a bit odd. I didn't think the most likely reason is that you have CONFIG_CRYPTO_SHA256=m but everything else built-in. Thus, when loading the certificate, there's no way to calcula

[PATCH] cfg80211: select CRYPTO_SHA256 if needed

2017-11-24 Thread Johannes Berg
From: Johannes Berg When regulatory database certificates are built-in, they're currently using the SHA256 digest algorithm, so add that to the build in that case. Also add a note that for custom certificates, one may need to add the right algorithms. Reported-by: Florian Fainelli Signe

pull-request: mac80211 2017-11-27

2017-11-27 Thread Johannes Berg
metric for RANN frame Johannes Berg (2): cfg80211: select CRYPTO_SHA256 if needed mac80211: use QoS NDP for AP probing Sara Sharon (1): mac80211: tear down RX aggregations first drivers/net/wireless/ath/ath9k/channel.c | 2 +- drivers/net/wireless/st/cw1200/sta.c | 4 ++

Re: Setting TX power on a monitoring interface

2017-11-27 Thread Johannes Berg
On Mon, 2017-11-20 at 17:34 +0100, Peter Große wrote: > Hi everyone. > > The iw tool allows to set TX power settings on network interfaces. > > If I try to set the TX power level on a _monitor_ interface, I get > a kernel warning: > > [ cut here ] > WARNING: CPU: 0 PID:

Re: What would it take to get WDS working with channel contexts?

2017-11-27 Thread Johannes Berg
On Fri, 2017-11-17 at 08:46 -0800, Ben Greear wrote: > It looks like my options are to hack the mac80211 stack to be minimally > functional with WDS and channel-contexts, or to hack ath10k driver to > disable chan-tx in order to try to fix the ath10k firmware WDS issues. > > I'd guess the former

Re: [RFC PATCH 2/2] nl80211: implement beacon change notifier

2017-11-27 Thread Johannes Berg
On Wed, 2017-11-15 at 18:35 +0300, Sergey Matyukevich wrote: > In our case, we are experimenting with applications running along with > hostapd and enabling band steering and client roaming functionality. > As I mentioned, various approaches are being examined, including > both pure nl80211-based

Re: [RFC] cfg80211: Implement Multiple BSSID capability in scanning

2017-11-27 Thread Johannes Berg
Hi, > As you pointed out the use cases for having vendor elements in MBSSID > subelements, what is > your suggestion to identify and process the vendor elements? Is a new version of this patch hinging only on this? We'd love to have a fixed-up one :-) johannes

Re: [RFC] cfg80211: Implement Multiple BSSID capability in scanning

2017-11-27 Thread Johannes Berg
On Mon, 2017-11-27 at 19:14 +, Peng Xu wrote: > > Is a new version of this patch hinging only on this? We'd love to have a > > fixed- > > up one :-) > > The new version covers the use cases mentioned by Jouni as the OUIs of the > vendor commands > has the format of OUI + type + subtype. For

Re: platform regulatory.0: Direct firmware load for regulatory.db failed with error -2

2017-11-28 Thread Johannes Berg
On Tue, 2017-11-28 at 09:09 -0300, Cristian wrote: > Hello, > > Linux version 4.15.0-041500rc1-generic > > Report in: > https://bugzilla.kernel.org/show_bug.cgi?id=198013 > > dmesg: > [5.663292] platform regulatory.0: Direct firmware load for > regulatory.db failed with error -2 Yeah, nothi

Re: [PATCH 1/5] mac80211: always update the PM state of a peer on MGMT / DATA frames

2017-12-01 Thread Johannes Berg
On Fri, 2017-12-01 at 13:48 +0200, Luciano Coelho wrote: > > FTR, I'm sending a separate patch with the hwsim fix, as we agreed, as > part of the patchset I'm sending today. > Still need a fix to the test case as well though :-) johannes

Re: Setting TX power on a monitoring interface

2017-12-01 Thread Johannes Berg
On Mon, 2017-11-27 at 16:07 +0100, Peter Große wrote: > > I think if the driver has WANT_MONITOR_VIF, then we can pass that > > through and let the driver sort it out. > > > > But if not, we probably just have to reject the configuration? > > With passing through you mean calling bss_info_change

Re: [PATCH 2/2] ath10k: add per peer tx stats support for 10.2.4

2017-12-01 Thread Johannes Berg
On Fri, 2017-12-01 at 16:29 +0100, Toke Høiland-Jørgensen wrote: > > Yeah, figures. Well, maybe we'll just have to support an asynchronous > callback into mac80211 to register airtime usage. Will probably have to > add some asynchronicity anyway to avoid doing too much work in the fast > path. I

Re: [PATCH 2/2] ath10k: add per peer tx stats support for 10.2.4

2017-12-01 Thread Johannes Berg
On Fri, 2017-12-01 at 16:54 +0100, Toke Høiland-Jørgensen wrote: > I guess that once we have an asynchronous scheduler task of some kind, > supporting the callback is easy, but pulling the data out of each packet > needs more work. Right. > But since we'll have to do that for ath9k anyway it >

[PATCH net 1/2] netlink: add NLA_U8_BUGGY attribute type

2017-12-02 Thread Johannes Berg
From: Johannes Berg This netlink type is used only for backwards compatibility with broken userspace that used the wrong size for a given u8 attribute, which is now rejected. It would've been wrong before already, since on big endian the wrong value (always zero) would be used by the kernel

[PATCH net 2/2] nl80211: use NLA_U8_BUGGY for two attributes

2017-12-02 Thread Johannes Berg
From: Johannes Berg We discovered that these are set incorrectly by the corresponding userspace code, so keep compatible with their bugs even if they'd always set the value to 0. Reported-by: Jouni Malinen Fixes: 28033ae4e0f5 ("net: netlink: Update attr validation to require exact

Re: net/wireless/shipped-certs.c:2:1: error: expected expression at end of input

2017-12-05 Thread Johannes Berg
On Tue, 2017-12-05 at 11:01 +0100, Paul Menzel wrote: > > > ``` > $ git describe > v4.15-rc2-79-gfd6d2e506ce6 > $ git log --oneline -1 > fd6d2e506ce6 Merge tag 'docs-4.15-fixes' of git://git.lwn.net/linux > $ time ARCH=i386 make deb-pkg -j50 > […] > net/wireless/shipped-certs.c:2:1: error: expect

Re: net/wireless/shipped-certs.c:2:1: error: expected expression at end of input

2017-12-05 Thread Johannes Berg
Hi, > > Ah, here we go - you probably don't have "hexdump" installed on this > > system? > > Well, I didn’t, but got the error, that hexdump couldn’t be found. After > installing it, I got the error above, and sent the message. Ah, ok. > Removing the file `net/wireless/shipped-certs.c`, and bu

[PATCH 1/2] wireless: replace usage of hexdump with od/sed

2017-12-05 Thread Johannes Berg
From: Johannes Berg Since od/sed are in posix, hopefully there's a better chance people will have them, over hexdump. Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking") Signed-off-by: Johannes Berg --- net/wireless/Makefile | 4 ++-- 1 file changed, 2 i

[PATCH 2/2] wireless: don't write C files on failures

2017-12-05 Thread Johannes Berg
From: Johannes Berg Change the scripting inside the shipped/extra certs C code generation to not write the file when there are any failures. That way, if the build aborts due to failures, we don't get into a situation where a dummy file has been created and the next build succeeds, but not

Re: [PATCH net 1/2] netlink: add NLA_U8_BUGGY attribute type

2017-12-05 Thread Johannes Berg
On Tue, 2017-12-05 at 11:31 -0500, David Miller wrote: > > > We could try to fix up the big endian problem here, but we > > don't know *how* userspace misbehaved - if using nla_put_u32 > > then we could, but we also found a debug tool (which we'll > > ignore for the purposes of this regression) th

Re: [PATCH net 1/2] netlink: add NLA_U8_BUGGY attribute type

2017-12-05 Thread Johannes Berg
On Tue, 2017-12-05 at 11:41 -0500, David Miller wrote: > > There is no reasonable interpretation for what that application is > doing, so I think we can safely call that case as buggy. > > We are only trying to handle the situation where a U8 attribute > is presented as a bonafide U32 or a correc

Re: Setting TX power on a monitoring interface

2017-12-09 Thread Johannes Berg
Hi, (side note - I might reply faster if you don't drop me from Cc, since then it goes to my inbox in addition to my list folder) > > I meant to pass the &monitor_sdata.vif pointer instead of the real > > monitor interface that's coming through cfg80211. The former is virtual > > and has no netde

Re: [PATCH 1/2] mac80211: Populate RSC counter in set_key method

2017-12-09 Thread Johannes Berg
On Fri, 2017-12-08 at 19:02 +0530, Govind Singh wrote: > Send RSC counter to driver in set_key method, so that FW/driver > can drop the packet in PN check if received packet sequence > no is less than current RSC counter during group keys(GTK) > exchange. Good idea, but ... does it really work thi

[PATCH] mac80211: fix locking in ieee80211_sta_tear_down_BA_sessions

2017-12-09 Thread Johannes Berg
From: Johannes Berg Due to overlap between commit 1281103770e9 ("mac80211: Simplify locking in ieee80211_sta_tear_down_BA_sessions()") and the way that Luca modified commit 72e2c3438ba3 ("mac80211: tear down RX aggregations first") when sending it upstream from Intel's

Re: Wireless regressions in v4.15-rc1

2017-12-09 Thread Johannes Berg
On Sat, 2017-12-02 at 14:59 +0200, Kalle Valo wrote: > > net: netlink: Update attr validation to require exact length for some types > https://git.kernel.org/linus/28033ae4e0f5 This was reverted, more or less, to print only a warning: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git

pull-request: mac80211 2017-12-11

2017-12-11 Thread Johannes Berg
using lots of locking warnings ---- Johannes Berg (3): wireless: replace usage of hexdump with od/sed wireless: don't write C files on failures mac80211: fix locking in ieee80211_sta_tear_down_BA_sessions net/mac80211/ht.c

Re: [PATCH] nl80211: Update ERP info using NL80211_CMD_UPDATE_CONNECT_PARAMS

2017-12-11 Thread Johannes Berg
On Wed, 2017-10-25 at 14:50 +0530, Vidyullatha Kanchanapally wrote: > + * @UPDATE_FILS_ERP_INFO: Indicates that FILS connection parameters (realm, > + * username, erp sequence number and rrk) are updated > + * @UPDATE_AUTH_TYPE: Indicates that Authentication type is updated These are new here,

Re: [PATCH 1/1] ocb: Use common freqchan helper for setting the operating channel

2017-12-11 Thread Johannes Berg
On Fri, 2017-10-27 at 23:43 +0200, Peter Große wrote: > Simplify code by using the helper which has been introduced earlier. > > Signed-off-by: Peter Große > --- > ocb.c | 50 -- No objection to the patch, but you need to generate the diff against

Re: [PATCH v3 31/36] mac80211_hwsim: Replace hrtimer tasklet with softirq hrtimer

2017-12-11 Thread Johannes Berg
t otherwise looks good to me. Reviewed-by: Johannes Berg

[PATCH] nl80211: fix nl80211_send_iface() error paths

2017-12-11 Thread Johannes Berg
From: Johannes Berg Evidently I introduced a locking bug in my change here, the nla_put_failure sometimes needs to unlock. Fix it. Fixes: 44905265bc15 ("nl80211: don't expose wdev->ssid for most interfaces") Signed-off-by: Johannes Berg --- net/wireless/nl80211.c | 6 --

Re: [PATCH v2 1/5] mac80211_hwsim: wait for deferred radio deletion on mod unload

2017-12-11 Thread Johannes Berg
On Tue, 2017-11-21 at 13:17 +0100, Benjamin Beichler wrote: > > + /*wait for radios with deferred delete*/ please add spaces there > + spin_lock_bh(&hwsim_delete_lock); > + while (!list_empty(&delete_radios)) { > + pr_debug("mac80211_hwsim: wait for deferred radio remove\

Re: [PATCH v2 3/5] mac80211_hwsim: add generation count for netlink dump operation

2017-12-11 Thread Johannes Berg
On Tue, 2017-11-21 at 13:17 +0100, Benjamin Beichler wrote: > Make the dump operation aware of changes on radio list and corresponding > inconsistent dumps. Change the dump iteration to be independent from > increasing radio indices on radio list. Looks like this should use nl_dump_check_consisten

Re: [PATCH v2 4/5] mac80211_hwsim: add permanent mac address option for new radios

2017-12-11 Thread Johannes Berg
On Tue, 2017-11-21 at 13:17 +0100, Benjamin Beichler wrote: > > + * @HWSIM_ATTR_TX_INFO_FLAGS: additional flags for corresponding > + * rates of %HWSIM_ATTR_TX_INFO > + HWSIM_ATTR_TX_INFO_FLAGS, This should be in the next patch johannes

Re: [PATCH v2 3/5] mac80211_hwsim: add generation count for netlink dump operation

2017-12-11 Thread Johannes Berg
On Mon, 2017-12-11 at 13:37 +0100, Benjamin Beichler wrote: > Am 11.12.2017 um 13:14 schrieb Johannes Berg: > > On Tue, 2017-11-21 at 13:17 +0100, Benjamin Beichler wrote: > > > Make the dump operation aware of changes on radio list and corresponding > > > inconsis

Re: [PATCH v2 1/5] mac80211_hwsim: wait for deferred radio deletion on mod unload

2017-12-11 Thread Johannes Berg
On Mon, 2017-12-11 at 13:54 +0100, Benjamin Beichler wrote: > Am 11.12.2017 um 12:46 schrieb Johannes Berg: > > > > > + spin_lock_bh(&hwsim_delete_lock); > > > + while (!list_empty(&delete_radios)) { > > > + pr_debug("

Re: [PATCH v2 3/5] mac80211_hwsim: add generation count for netlink dump operation

2017-12-11 Thread Johannes Berg
On Mon, 2017-12-11 at 14:02 +0100, Benjamin Beichler wrote: > > > But you added this: > > > > + /* list changed */ > > + if (cb->prev_seq && cb->seq != cb->prev_seq) > > + goto cleanup; > > > > which is mostly just a copy of the inline. > > > > johannes > > Year you a

Re: [PATCH v2 3/5] mac80211_hwsim: add generation count for netlink dump operation

2017-12-11 Thread Johannes Berg
On Mon, 2017-12-11 at 14:29 +0100, Benjamin Beichler wrote: > I think we need to send something like an empty message, containing the > flag. Because there exist the corner case, that while a dump is > interrupted the complete list is deleted. Currently this could not > happen because of non-paral

Re: 76f43b4 fix for stable

2017-12-11 Thread Johannes Berg
On Mon, 2017-12-11 at 14:51 +0100, Richard Schütz wrote: > Hello, > > as per netdev-FAQ.txt I'm requesting the submission of commit > 57629915d568c522ac1422df7bba4bee5b5c7a7c ("mac80211: Fix addition of > mesh configuration element") to stable. Because of automatic selection > commit 76f43b4c0a

Re: linux-next: build failure after merge of the mac80211-next tree

2017-12-12 Thread Johannes Berg
Hi Stephen, Thanks! Felix made me aware of this yesterday evening and said he's going to work out the required changes to mt76. Kalle and I will make sure to submit the trees to Dave one by one so he doesn't have to deal with it :) Unfortunately, this might take a few days to resolve. > -void

Re: [PATCH] ocb: Use common freqchan helper for setting the operating channel

2017-12-13 Thread Johannes Berg
On Wed, 2017-12-13 at 13:58 +0100, Peter Große wrote: > Simplify code by using the helper which has been introduced earlier. > > Signed-off-by: Peter Große > --- > > Mh, the patch is against the full tree of iw, not the kernel, so there is no > net/wireless/ path. D'oh! I guess you should've me

[PATCH] cfg80211: ship certificates as hex files

2017-12-19 Thread Johannes Berg
From: Johannes Berg Not only does this remove the need for the hexdump code in most normal kernel builds (still there for the extra directory), but it also removes the need to ship binary files, which apparently is somewhat problematic, as Randy reported. While at it, also add the generated

Re: [PATCH 10/10] qtnfmac: support MAC address based access control

2017-12-19 Thread Johannes Berg
On Mon, 2017-12-18 at 19:18 +0300, Sergey Matyukevich wrote: > Meanwhile now it is not yet clear to me what should be done for driver which > supports MAC-based ACL, but not full-fledged AP SME. Are you sure that such a device can even exist? It'd have to drop the auth frames, so they can't be ha

Re: [PATCH 2/3] rtlwifi: Add beacon check mechanism to check if AP settings changed.

2017-12-19 Thread Johannes Berg
On Thu, 2017-12-14 at 10:06 -0600, Larry Finger wrote: > Does mac80211 have this facility? If so, how would we tap into it? If this > capability does not exist in mac80211, how would one add it? I have never > devoted much effort to looking at the internals of mac80211. It really should, and th

Re: [PATCH] wireless: Always rewrite generated files from scratch

2017-12-19 Thread Johannes Berg
On Thu, 2017-12-14 at 14:33 +0100, Thierry Reding wrote: > From: Thierry Reding > > Currently the certs C code generation appends to the generated files, > which is most likely a leftover from commit 715a12334764 ("wireless: > don't write C files on failures"). This causes duplicate code in the >

Re: [PATCH v3 1/3] mac80211: Add TXQ scheduling API

2017-12-19 Thread Johannes Berg
On Thu, 2017-12-14 at 13:44 +0100, Felix Fietkau wrote: > > First we should revert these patches. FWIW, I've just done that, if only to make the mt76 merge possible. > We can respin them shortly after in a modified form where > ieee80211_next_txq takes a 'queue' argument. I'll leave the two of

Re: [PATCH 1/2] cfg80211/nl80211: Optional authentication offload to userspace

2017-12-19 Thread Johannes Berg
On Fri, 2017-12-15 at 08:51 +, Srinivas Dasari wrote: > > don’t we actually need a flag in NL80211_CMD_CONNECT that indicates that > > userspace is able to actually handle NL80211_CMD_EXTERNAL_AUTH. It is nice > > >that there is feature for userspace to see if the driver supports it, but > >

Re: [PATCH] mac80211: Fix setting TX power on monitor interfaces

2017-12-19 Thread Johannes Berg
Hi, > Since monitor_sdata->vif.type is also NL80211_IFTYPE_MONITOR, > the warning would still appear with the patch to cfg.c, so I excluded > that case from the WARN_ON_ONCE condition. > > I hope that makes sense?! Yeah, looks good. > if (wdev) { > sdata = IEEE80211_WDEV_TO

pull-request: mac80211 2017-12-19

2017-12-19 Thread Johannes Berg
e sleep-in-atomic bug in hwsim_get_radio_nl Johannes Berg (2): nl80211: fix nl80211_send_iface() error paths cfg80211: ship certificates as hex files Jonathan Corbet (1): nl80211: Remove obsolete kerneldoc line Thierry Reding (1): cfg80211: always rewrite generated files fr

Re: oops on cloned-mac 802.11s stations

2017-12-19 Thread Johannes Berg
On Mon, 2017-12-18 at 03:44 +0100, Gui Iribarren wrote: > Steps to reproduce: > join a 802.11s mesh with a nodeA, and then join the same 802.11s mesh > with another nodeB, so that both nodes MAC addresses are exactly the > same (i.e. nodeB is "cloning" nodeA MAC) > > Expected result: > nodeA and n

Re: [PATCH 10/10] qtnfmac: support MAC address based access control

2017-12-19 Thread Johannes Berg
Hi, > I guess it should be possible to do some kind of source address filtering > in hardware. But it looks like your question is whether it makes sense > or not. Probably not, I have no idea. Either way, I see no reason to support it if nobody has a driver for it :) > By the way, what do you th

Re: [PATCH 10/10] qtnfmac: support MAC address based access control

2017-12-19 Thread Johannes Berg
On Tue, 2017-12-19 at 13:42 +0300, Sergey Matyukevich wrote: > Not yet. At the moment enum nl80211_ap_sme_features in uapi/linux/nl80211.h > is commented out. For MAC-based ACL the following things are being checked > on wiphy registration: complete flag WIPHY_FLAG_HAVE_AP_SME, non-zero > max_acl_

Re: [PATCH 10/10] qtnfmac: support MAC address based access control

2017-12-19 Thread Johannes Berg
On Tue, 2017-12-19 at 13:37 +0100, Arend van Spriel wrote: > On 12/19/2017 12:19 PM, Sergey Matyukevich wrote: > > > > Not yet. At the moment enum nl80211_ap_sme_features in > > > > uapi/linux/nl80211.h > > > > is commented out. For MAC-based ACL the following things are being > > > > checked > >

Re: [RFC PATCH 2/2] nl80211: implement beacon change notifier

2017-12-19 Thread Johannes Berg
Hi Sergey, Sorry for the long delay. On Tue, 2017-12-05 at 23:31 +0300, Sergey Matyukevich wrote: > > By the way, speaking about GET_CMD_BEACON and its possible users in the > community. There is already a stub for it in nl80211 uapi headers. What > was the original idea for that ? Or was it jus

Re: [PATCH for-4.15] wireless: create, don't append, to shipped-certs.c

2017-12-19 Thread Johannes Berg
On Tue, 2017-12-19 at 11:23 -0800, Brian Norris wrote: > > In practice, this is seen often by having a separate source and build > directory, where the build artifacts remain but the source tree changes > (even if Seth's cert doesn't change, it might get created/removed when > checking out differe

Re: [PATCH 0/6] wireless-regdb: Support for new binary database format

2017-12-22 Thread Johannes Berg
On Fri, 2017-12-22 at 00:02 -0600, Seth Forshee wrote: > This series starts with Johannes' patch for generating regulatory > databases using the new format and adds various fixes and pieces which > were missing such as installation to the firmware path, manual page > updates, etc. It also restores

Re: [RFC 0/4] EAPoL over NL80211

2018-01-02 Thread Johannes Berg
On Fri, 2017-12-29 at 12:29 -0600, Denis Kenzior wrote: > Agreed, requiring both attributes is less than ideal, but I tried to > make the initial RFC as minimal as possible. It also helped that iwd > uses SOCKET_OWNER by default. What can be done is to always set > conn_owner_nlportid and int

Re: [RFC 4/4] nl80211: Implement TX of control port frames

2018-01-02 Thread Johannes Berg
On Thu, 2017-12-28 at 11:58 -0600, Denis Kenzior wrote: > This commit implements the TX side of NL80211_CMD_CONTROL_PORT_FRAME. > Userspace provides the raw EAPoL frame using NL80211_ATTR_FRAME. A > skbuf is built and then injected onto the netdev of the wireless device. > The CONTROL_PORT_ETHERTY

Re: [RFC 4/4] nl80211: Implement TX of control port frames

2018-01-02 Thread Johannes Berg
On Tue, 2018-01-02 at 12:22 -0600, Denis Kenzior wrote: > > There are cases where CONTROL_PORT_ETHERTYPE_NO_ENCRYPT should be > > unset, but specific frames still shouldn't be encrypted. > > > > So I think for this particular path it would be better to deprecate > > CONTROL_PORT_ETHERTYPE_NO_ENCR

Re: [RFC 4/4] nl80211: Implement TX of control port frames

2018-01-03 Thread Johannes Berg
Hi, > > > If so, can we do something like what ieee80211_process_sa_query_req in > > > net/mac80211/rx.c or ieee80211_tdls_prep_mgmt_packet in > > > net/mac80211/tdls.c do? E.g. use ieee80211_tx_skb or > > > __ieee80211_subif_start_xmit or similar to inject the skb with the > > > DONT_ENCRYPT fla

Re: [PATCH v2 1/3] cfg80211/nl80211: Optional authentication offload to userspace

2018-01-04 Thread Johannes Berg
Hi, Sorry for the delay - mostly was on vacation while/since you sent this. > * @ASSOC_REQ_USE_RRM: Declare RRM capability in this association > + * @CONNECT_REQ_EXTERNAL_AUTH_SUPP: User space indicates external > authentication > + * capability. Drivers can offload authentication to userspac

Re: [PATCH v2 2/3] nl80211: Allow SAE Authentication for NL80211_CMD_CONNECT

2018-01-04 Thread Johannes Berg
On Fri, 2017-12-22 at 18:33 +0200, Jouni Malinen wrote: > From: Srinivas Dasari > > This commit allows SAE Authentication for NL80211_CMD_CONNECT > interface, provided this is supported by the host driver. Now this is interesting - there could potentially be a case where you request SAE, but don

Re: [PATCH v2 3/3] nl80211: Introduce scan flags to emphasize requested scan behavior

2018-01-04 Thread Johannes Berg
On Fri, 2017-12-22 at 18:33 +0200, Jouni Malinen wrote: > From: Sunil Dutt > > This commit defines new scan flags (LOW_SPAN, LOW_POWER, HIGH_LATENCY) > to emphasize the requested scan behavior for the driver. These flags are > optional and are mutually exclusive. The implementation of the > respe

[PATCH] mac80211: mesh: drop frames appearing to be from us

2018-01-04 Thread Johannes Berg
From: Johannes Berg If there are multiple mesh stations with the same MAC address, they will both get confused and start throwing warnings. Obviously in this case nothing can actually work anyway, so just drop frames that look like they're from ourselves early on. Reported-by: Gui Irib

pull-request: mac80211 2018-01-04

2018-01-04 Thread Johannes Berg
ribute for existence Hao Chen (1): nl80211: Check for the required netlink attribute presence Johannes Berg (1): mac80211: mesh: drop frames appearing to be from us net/mac80211/rx.c | 2 ++ net/wireless/nl8021

pull-request: mac80211-next 2018-01-04

2018-01-04 Thread Johannes Berg
R. Silva (1): mac80211: mark expected switch fall-throughs Johannes Berg (6): mac80211: avoid looking up tid_tx/tid_rx from timers mac80211: make __ieee80211_start_rx_ba_session static nl80211: add a few extended error strings to key parsing mac80211: don't wa

Re: [PATCH] nl80211: Check for the required netlink attribute presence

2018-01-04 Thread Johannes Berg
On Wed, 2018-01-03 at 11:00 +0800, Hao Chen wrote: > nl80211_nan_add_func() does not check if the required attribute > NL80211_NAN_FUNC_FOLLOW_UP_DEST is present when processing > NL80211_CMD_ADD_NAN_FUNCTION request. This request can be issued > by users with CAP_NET_ADMIN privilege and may result

Re: [PATCH v4 31/36] mac80211_hwsim: Replace hrtimer tasklet with softirq hrtimer

2018-01-04 Thread Johannes Berg
On Thu, 2017-12-21 at 11:42 +0100, Anna-Maria Gleixner wrote: > From: Thomas Gleixner > > Switch the timer to HRTIMER_MODE_SOFT, which executed the timer I've pointed out before that this should say HRTIMER_MODE_REL_SOFT. Anyway, since it still doesn't apply on my tree, somebody else will have

Re: UBSAN: Undefined behaviour in net/wireless/nl80211.c:718:4: -1665903437 * 100 cannot be represented in type 'int'

2018-01-04 Thread Johannes Berg
Hi, Can you reproduce this? > [ 54.426491] UBSAN: Undefined behaviour in net/wireless/nl80211.c:718:4 > [ 54.426492] signed integer overflow: > [ 54.426493] -1665903437 * 100 cannot be represented in type 'int' Obviously. However, it looks like the real reason is that there's some garbage

Re: [PATCH] nl80211: take RCU read lock when calling ieee80211_bss_get_ie()

2018-01-14 Thread Johannes Berg
Hi, > Fixes: 44905265bc15 ("nl80211: don't expose wdev->ssid for most interfaces") > Signed-off-by: Dominik Brodowski > --- > > This patch fixes the regression I reported in the last couple of weeks for > various v4.15-rcX revisions to netdev, where a "suspicious RCU usage" > showed up in net/wi

Re: [PATCH v2] nl80211: take RCU read lock when calling ieee80211_bss_get_ie()

2018-01-14 Thread Johannes Berg
On Sun, 2018-01-14 at 23:22 +0100, Dominik Brodowski wrote: > > + rcu_read_lock(); > ssid_ie = ieee80211_bss_get_ie(&wdev->current_bss->pub, > WLAN_EID_SSID); > if (!ssid_ie) > - break; nit-pi

[PATCH] cfg80211: fully initialize old channel for event

2018-01-15 Thread Johannes Berg
From: Johannes Berg Paul reported that he got a report about undefined behaviour that seems to me to originate in using uninitialized memory when the channel structure here is used in the event code in nl80211 later. He never reported whether this fixed it, and I wasn't able to trigger th

Re: [PATCH v3] nl80211: take RCU read lock when calling ieee80211_bss_get_ie()

2018-01-15 Thread Johannes Berg
On Mon, 2018-01-15 at 08:12 +0100, Dominik Brodowski wrote: > As ieee80211_bss_get_ie() derefences an RCU to return ssid_ie, both > the call to this function and any operation on this variable need > protection by the RCU read lock. > > Fixes: 44905265bc15 ("nl80211: don't expose wdev->ssid for mo

Re: WARNING in wiphy_register

2018-01-15 Thread Johannes Berg
Hi syzbot maintainers, Thanks for the report. > hwsim_new_radio_nl+0x5b7/0x7c0 drivers/net/wireless/mac80211_hwsim.c:3152 > genl_family_rcv_msg+0x7b7/0xfb0 net/netlink/genetlink.c:599 > genl_rcv_msg+0xb2/0x140 net/netlink/genetlink.c:624 You're getting into the kernel via generic netlink r

[PATCH] mac80211_hwsim: validate number of different channels

2018-01-15 Thread Johannes Berg
From: Johannes Berg When creating a new radio on the fly, hwsim allows this to be done with an arbitrary number of channels, but cfg80211 only supports a limited number of simultaneous channels, leading to a warning. Fix this by validating the number - this requires moving the define for the

<    11   12   13   14   15   16   17   18   19   20   >