[RFC 2/2] cfg80211: reg: remove support for built-in regdb

2015-10-15 Thread Johannes Berg
From: Johannes Berg Parsing and building C structures from a regdb is no longer needed since the "firmware" file (regulatory.db) can be linked into the kernel image to achieve the same effect. Signed-off-by: Johannes Berg --- Documentation/networking/regulatory.txt | 22 + ne

[PATCH 05/12] cfg80211: reg: remove useless reg_timeout scheduling

2015-10-15 Thread Johannes Berg
From: Johannes Berg When the functions reg_set_rd_driver() and reg_set_rd_country_ie() return with an error, the calling function already restores data by calling restore_regulatory_settings(), so there's no need to also schedule a timeout (which would lead to other side effects su

[PATCH 12/12] cfg80211: reg: fix reg_ignore_cell_hint return type

2015-10-15 Thread Johannes Berg
From: Johannes Berg The return type should be enum reg_request_treatment for both branches of the #ifdef. Signed-off-by: Johannes Berg --- net/wireless/reg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index ef327236e0f0

[PATCH 06/12] cfg80211: reg: make CRDA support optional

2015-10-15 Thread Johannes Berg
From: Johannes Berg If there's a built-in regulatory database, there may be little point in also calling out to CRDA and failing if the system is configured that way. Allow removing CRDA support to save ~1K kernel size. Signed-off-by: Johannes Berg --- net/wireless/Kconfig | 10 +

[RFC 1/2] cfg80211: support loading regulatory database as firmware file

2015-10-15 Thread Johannes Berg
From: Johannes Berg As the current regulatory database is only about 4k big, and already difficult to extend, we decided that overall it would be better to get rid of the complications with CRDA and load the database into the kernel directly, but in a new format that is extensible. The new file

[PATCH] wireless-regdb: fix gHz to GHz

2015-10-15 Thread Johannes Berg
From: Johannes Berg There's no "g" prefix, only "G" (1e9) that was clearly intended here. Signed-off-by: Johannes Berg --- db.txt | 80 +- 1 file changed, 40 insertions(+), 40 deletions(-) diff --gi

Re: [PATCH 5/6] cfg80211: reg: make CRDA support optional

2015-10-15 Thread Johannes Berg
> > config CFG80211_INTERNAL_REGDB > > > > +config CFG80211_CRDA_SUPPORT > > Is there a way to force the kernel builder to select at least one of > these if they're building cfg80211? > I'd actually thought about that, but I think there are two reasons not to. 1) it may actually be a valid co

Re: [RFC PATCH 1/2] cfg80211: Add support for ITS-G5 band (5.9 GHz)

2015-10-16 Thread Johannes Berg
On Fri, 2015-10-16 at 13:28 +0200, Jan Kaisrlik wrote: > The patch adds support for Intelligent Transportation System (ITS-G5) > band as defined by ETSI EN 302 663 standard. This band is enabled by > a new configuration option CFG80211_REG_ITSG5_BAND, which depends on > CFG80211_CERTIFICATION_ONUS.

Re: [RFC PATCH 1/2] cfg80211: Add support for ITS-G5 band (5.9 GHz)

2015-10-16 Thread Johannes Berg
Hi, > I thought that the regdb is for unlicensed bands with unrestricted use. > The 5.9 GHz band is not licensed but it is restricted for ITS > applications. It kind of is, at least the current one is. > In http://marc.info/?l=linux-wireless&m=140183393707445&w=2 > Luis Rodriguez suggested that

Re: new regdb file format

2015-10-19 Thread Johannes Berg
On Mon, 2015-10-19 at 14:28 +0300, Eliad Peller wrote: > while at it - is there any way to indicate exclusion of some > channels? > e.g. channels 38/42 in US (the current rule is "(5170 - 5250 @ 40)", > which doesn't seem to forbid them) > Hm? Why would you want to do that, if you are allowed t

Re: new regdb file format

2015-10-19 Thread Johannes Berg
On Mon, 2015-10-19 at 14:52 +0300, Eliad Peller wrote: > > > Hm? Why would you want to do that, if you are allowed to use that > > band? > > > The spec seems to indicate the allowed channel set for each operating > class, and some channels are allowed only in some countries (tables > E-1 vs. E-2

[PATCH 1/3] mac80211: remove sta->last_ack_signal

2015-10-20 Thread Johannes Berg
From: Johannes Berg This file only feeds a debugfs file that isn't very useful, so remove it. If necessary, we can add other ways to get this information, for example in the NL80211_CMD_PROBE_CLIENT response. Signed-off-by: Johannes Berg --- net/mac80211/debugfs_sta.c | 2 -- net/mac

[PATCH 3/3] mac80211: move station statistics into sub-structs

2015-10-20 Thread Johannes Berg
From: Johannes Berg Group station statistics by where they're (mostly) updated (TX, RX and TX-status) and group them into sub-structs of the struct sta_info. Also rename the variables since the grouping now makes it obvious where they belong. This makes it easier to identify wher

[PATCH 2/3] mac80211: move beacon_loss_count into ifmgd

2015-10-20 Thread Johannes Berg
From: Johannes Berg There's little point in keeping (and even sending to userspace) the beacon_loss_count value per station, since it can only apply to the AP on a managed-mode connection. Move the value to ifmgd, advertise it only in managed mode, and remove it from ethtool as it's

Re: [PATCH] iw: Fix segfault when no args are given to offchannel

2015-10-21 Thread Johannes Berg
On Wed, 2015-10-21 at 14:02 +0200, Ola Olsson wrote: > The offchannel command assumes that frequency and duration > are given as arguments, otherwise iw segfaults - fix that > by printing help text instead. > Thanks! Applied, but I removed the unnecessary braces. johannes -- To unsubscribe from t

Re: [PATCH] iw: remove superfluous includes

2015-10-21 Thread Johannes Berg
I'm always a bit scared of patches like this in case we just start relying on an include file including something else, but I'll apply it and we'll see what happens :) johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.k

Re: [PATCH] iw: Print help text to "set bitrates" in case of no args

2015-10-21 Thread Johannes Berg
This is incorrect - the help states: "Not passing any arguments would clear the existing mask (if any)." johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/major

Re: [PATCH] mesh: show mesh parameters when no args are given

2015-10-21 Thread Johannes Berg
On Wed, 2015-10-21 at 14:13 +0200, Ola Olsson wrote: > The help text in " mesh_param" says that > available parameters will be shown if no args are given > but that is not the case - fix that. > > Also, add help text if a parameter is given but not found. > Applied, thanks. johannes -- To unsubs

pull-request: mac80211-next 2015-10-21

2015-10-21 Thread Johannes Berg
mac80211: Do not restart scheduled scan if multiple scan plans are set Dmitry Shmidt (1): nl80211: allow BSS data to include CLOCK_BOOTTIME timestamp Felix Fietkau (1): mac80211: add missing struct ieee80211_txq tid field initialization Johannes Berg (25): Merge remote-tracking bran

[PATCH] cfg80211/mac80211: clarify RSSI CQM reporting requirements

2015-10-22 Thread Johannes Berg
From: Johannes Berg The previous patch changed mac80211 to always report an event after a CQM RSSI reconfiguration. Document that as expected behaviour in both the cfg80211 and mac80211 API. Currently, iwlmvm already implements that behaviour; the other drivers implementing CQM RSSI events may

[PATCH] mac80211: allow driver to prevent two stations w/ same address

2015-10-22 Thread Johannes Berg
From: Johannes Berg Some devices or drivers cannot deal with having the same station address for different virtual interfaces, say as a client to two virtual AP interfaces. Rather than requiring each driver with a limitation like that to enforce it, add a hardware flag for it. Signed-off-by

[PATCH 3/3] mac80211: treat bad WMM parameters more gracefully

2015-10-22 Thread Johannes Berg
From: Johannes Berg As WMM is required for HT/VHT operation, treat bad WMM parameters more gracefully by falling back to default parameters instead of not using WMM assocation. This makes it possible to still use HT or VHT, although potentially with reduced quality of service due to unintended

[PATCH 1/3] mac80211: make enable_qos parameter to ieee80211_set_wmm_default()

2015-10-22 Thread Johannes Berg
From: Johannes Berg The function currently determines this value, for use in bss_info.qos, based on the interface type itself. Make it a parameter instead and set it with the same logic for now. Signed-off-by: Johannes Berg --- net/mac80211/ibss.c| 2 +- net/mac80211/ieee80211_i.h

[PATCH 2/3] mac80211: fixup AIFSN instead of disabling WMM

2015-10-22 Thread Johannes Berg
-off-by: Johannes Berg --- net/mac80211/mlme.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 0d0ce5cc371d..0aaac951a32c 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1816,6 +1816,13 @@ static bool

[PATCH] cfg80211: replace ieee80211_ie_split() with an inline

2015-10-23 Thread Johannes Berg
From: Johannes Berg The function is a very simple wrapper around another one, just adds a few default parameters, so replace it with a static inline instead of using EXPORT_SYMBOL, reducing the module size slightly. Signed-off-by: Johannes Berg --- include/net/cfg80211.h | 7 +-- net

Re: [PATCH 1/2] cfg80211: Add support for aborting an ongoing scan

2015-10-30 Thread Johannes Berg
> * > + * @NL80211_CMD_ABORT_SCAN: stop an ongoing scan. Returns -ENOENT if a scan > is > + * not running. I think we might need to indicate in nl80211 exported capabilities whether or not this command is available? The return code requirement should probably also be documented in cfg80211

Re: [PATCH 2/2] mac80211: Add support for aborting an ongoing scan

2015-10-30 Thread Johannes Berg
On Thu, 2015-10-29 at 13:16 +0530, Sunil Dutt wrote: > From: Vidyullatha Kanchanapally > > This commit adds implementation for abort scan in mac80211. > > Reviewed-by: Jouni Malinen > Signed-off-by: Vidyullatha Kanchanapally > Signed-off-by: Sunil Dutt > --- > net/mac80211/cfg.c | 11 +++

Re: Undocumented Sleep Requirements for ieee80211_ops

2015-10-30 Thread Johannes Berg
On Thu, 2015-10-29 at 12:16 +0530, Krishna Chaitanya wrote: > Hi, > > From the documentation:(mac80211.h) For the ieee80211_ops > (un)assign_vif_chanctx, there is no mention of explicit sleep > requirements (allowed/disallwoed) for the callback. Same goes for drv_switch_vif_chanctx(). > From a q

Re: [PATCH 1/2] mac80211: add support to set_coalesce

2015-10-30 Thread Johannes Berg
> +++ b/net/mac80211/driver-ops.h > @@ -1355,4 +1355,16 @@ static inline void drv_wake_tx_queue(struct > ieee80211_local *local, > local->ops->wake_tx_queue(&local->hw, &txq->txq); > } > > +static inline int drv_set_coalesce(struct ieee80211_local *local, > +

Re: [PATCH 2/2] ath9k: implement set_coalesce callback

2015-10-30 Thread Johannes Berg
On Sat, 2015-10-24 at 11:50 -0700, Olav Haugan wrote: > implement set_coalesce ieee80211_ops callback. Add default > wiphy_coalesce_support rules for 9k. These rules are not being used > by 9k since 9k can just toggle coalesce as on/off. > This seems extremely strange to me - like you're trying t

Re: [PATCH 1/2] cfg80211: Add support for aborting an ongoing scan

2015-10-30 Thread Johannes Berg
On Fri, 2015-10-30 at 12:37 +0200, Jouni Malinen wrote: > > The currently identified use cases do not seem to care much about the > actual result of this command since there is going to be a wait for > the > scan completed event anyway and the call is not even used unless > there > is a known on

Re: [WEXT/nl80211] few API questions

2015-11-02 Thread Johannes Berg
> The iw code has been helpful, and I have used bits of it so far. When it comes > to kernel components, though, I don't understand that code well enough; so I'd > appreciate help with the following: > > 1. Signal Level Units > This refers to station signal level in status ASSOCIATED, AUTHEN

Re: [RFC] mac80211_hwsim: Adds parameter use_hwsim_mon which can be used to disable hwism0

2015-11-02 Thread Johannes Berg
On Fri, 2015-10-30 at 17:05 -0400, arwe...@cert.org wrote: > From: Adam Welle > > A new parameter, use_hwsim_mon has been created to implement new > functionalilty. use_hwsim_mon defaults to true so that normal > operation remains the same. When set to false, the hwsim0 device is > not created

Re: [RFC] mac80211_hwsim: Implements a check for ATTR_FREQ inside hwsim_cloned_frame_received_nl

2015-11-02 Thread Johannes Berg
On Fri, 2015-10-30 at 17:00 -0400, arwe...@cert.org wrote: > From: Adam Welle > > If a frame is received from netlink with this value set it is checked > against the current radio's frequency and discarded if different. Please line-break the commit log to <=72 characters/line. > + /* Check

Re: [PATCH 01/14] mac80211: fix divide by zero when NOA update

2015-11-03 Thread Johannes Berg
On Tue, 2015-10-27 at 08:35 +0100, Janusz Dziedzic wrote: > In case of one shot NOA the interval could be 0. > Applied, thanks! johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http:

Re: [PATCH 03/10] mac80211: use freezable workqueue for restart work

2015-11-03 Thread Johannes Berg
On Sun, 2015-10-25 at 10:59 +0200, Emmanuel Grumbach wrote: > From: Eliad Peller > > Requesting hw restart during suspend might result > in the restart work being executed after mac80211 > and the hw are suspended. > Applied. johannes -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 06/10] mac80211: Fix local deauth while associating

2015-11-03 Thread Johannes Berg
On Sun, 2015-10-25 at 10:59 +0200, Emmanuel Grumbach wrote: > From: Andrei Otcheretianski > > Local request to deauthenticate wasn't handled while associating, > thus > the association could continue even when the user space required to > disconnect. > Applied. johannes -- To unsubscribe from

Re: [PATCH] nl80211: Fix potential memory leak from parse_acl_data

2015-11-03 Thread Johannes Berg
On Thu, 2015-10-29 at 07:04 +0100, Ola Olsson wrote: > If parse_acl_data succeeds but the subsequent parsing of smps > attributes fails, there will be a memory leak due to early returns. > Fix that. > Applied, thanks! johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wir

Re: [PATCH 08/10] mac80211: Remove WARN_ON_ONCE in ieee80211_recalc_smps

2015-11-03 Thread Johannes Berg
On Sun, 2015-10-25 at 10:59 +0200, Emmanuel Grumbach wrote: > From: Andrei Otcheretianski > > The recalc_smps work can run after the station disassociates. > At this stage we already released the channel, but the work > will be cancelled only when the interface stops. > In this scenario we can hi

Re: [PATCH 09/10] mac80211: allow null chandef in tracing

2015-11-03 Thread Johannes Berg
On Sun, 2015-10-25 at 10:59 +0200, Emmanuel Grumbach wrote: > From: Arik Nemtsov > > In TDLS channel-switch operations the chandef can sometimes be NULL. > Avoid an oops in the trace code for these cases and just print a > chandef full of zeros. > Applied, thanks. johannes -- To unsubscribe fro

Re: [PATCH 01/10] mac80211: don't reconfigure sched scan in case of wowlan

2015-11-03 Thread Johannes Berg
On Sun, 2015-10-25 at 10:59 +0200, Emmanuel Grumbach wrote: > From: Eliad Peller > > Scheduled scan has to be reconfigured only if wowlan wasn't > configured, since otherwise it should continue to run (with > the 'any' trigger) or be aborted. > > The current code will end up asking the driver to

Re: [PATCH 04/10] mac80211: call drv_stop only if driver is started

2015-11-03 Thread Johannes Berg
On Sun, 2015-10-25 at 10:59 +0200, Emmanuel Grumbach wrote: > From: Eliad Peller > > If drv_start() fails during hw_restart, all the running > interfaces are being closed/stopped, which results in > drv_stop() being called, although the driver was never > started successfully. > Applied. johann

Re: [PATCH] mac80211: fix crash on mesh local link ID generation with VIFs

2015-11-03 Thread Johannes Berg
On Sat, 2015-10-24 at 21:25 +0200, Matthias Schiffer wrote: > llid_in_use needs to be limited to stations of the same VIF, > otherwise it > will cause a NULL deref as the sta_info of non-mesh-VIFs don't have > sta->mesh set. > Applied, thanks. johannes -- To unsubscribe from this list: send the

Re: [PATCH 02/10] mac80211: TDLS: add proper HT-oper IE

2015-11-03 Thread Johannes Berg
On Sun, 2015-10-25 at 10:59 +0200, Emmanuel Grumbach wrote: > From: Arik Nemtsov > > When 11n peers performs a TDLS connection on a legacy BSS, the HT > operation IE must be specified according to IEEE802.11-2012 section > 9.23.3.2. Otherwise HT-protection is compromised and the medium > becomes

Re: [PATCH] mac80211: Handle sleep requirements for channel context ops.

2015-11-03 Thread Johannes Berg
On Fri, 2015-10-30 at 23:16 +0530, Chaitanya T K wrote: > From: Chaitanya T K > > Channel context OPs can sleep, so add might_sleep() and > also document sleep requirements for those OPs. > Applied. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the bod

Re: [PATCH] cfg80211: Enable update of properties for unassociated station.

2015-11-03 Thread Johannes Berg
On Fri, 2015-10-23 at 11:20 +0300, Emmanuel Grumbach wrote: > From: Ayala Beker > > Currently, cfg80211 rejects updates of AID and listen interval > parameters > for existing entries. This information is known only at association > stage, > and as a result it's impossible to update entries that

Re: [PATCH] iw: Fix memory leak if nla_put fails

2015-11-03 Thread Johannes Berg
On Sat, 2015-10-24 at 00:33 +0200, Ola Olsson wrote: > The NLA_PUT macro will automatically goto nla_put_failure if > the underlying nla_put fails. This will in turn leak our malloced > memory in both the scan and wowlan commands. > Fix that by not using the macro in the cases where we have > alloc

pull-request: mac80211 2015-11-03

2015-11-03 Thread Johannes Berg
: mac80211: fixup AIFSN instead of disabling WMM janusz.dzied...@tieto.com (1): mac80211: fix divide by zero when NOA update Johannes Berg (4): cfg80211/mac80211: clarify RSSI CQM reporting requirements mac80211: make enable_qos parameter to ieee80211_set_wmm_default()

Re: Intel 7260 - limited in 5GHz spectrum

2015-11-03 Thread Johannes Berg
On Tue, 2015-11-03 at 08:08 -0800, Tim Harvey wrote: > > Out of curiosity, can you explain what you mean about 'regulatory > concerns'? There are channels in the 5GHz band that can be used in > FCC > with and without DFS. Is it that certification in the 5GHz band is > optional and Intel didn't wa

Re: [PATCH 2/2] iw: Removed the libnl-tiny >= 1 requirement

2015-11-03 Thread Johannes Berg
On Wed, 2015-11-04 at 08:31 +0200, Dima Krasner wrote: > Hi, > > Recent libnl-tiny revisions do not specify a version in the pkg > -config data. This patch corrects libnl-tiny support added in the > previous patch in the series, so it works with the latest revision > too. You need to resend the

Re: Intel 7260 - limited in 5GHz spectrum

2015-11-03 Thread Johannes Berg
On Tue, 2015-11-03 at 09:43 -0800, Tim Harvey wrote: > No surprise that its sold outside the US, but why should that mean it > should exclude 5GHz support? They all have their regulatory domains > and my understanding is that the intersection of the reg domain rules > and card capabilities should

[PATCH] mac80211: don't advertise NL80211_FEATURE_FULL_AP_CLIENT_STATE

2015-11-04 Thread Johannes Berg
From: Johannes Berg For now, this feature doesn't actually work. To avoid shipping a kernel that has it enabled but where it can't be used disable it for now - we can re-enable it when it's fixed. This partially reverts 44674d9c2267 ("mac80211: advertise support for full

Re: [PATCH 3/4] ipv4: add option to drop gratuitous ARP packets

2015-11-04 Thread Johannes Berg
On Sat, 2015-04-11 at 13:59 +0300, Julian Anastasov wrote: >  > May be only arptable_filter can help here to > protect ARP? > Finally reviving an ancient thread ... I checked, butI don't see a way to match tip==sip. You can match on each, but not against each other. johannes -- To unsub

[PATCH v2 3/4] ipv4: add option to drop gratuitous ARP packets

2015-11-04 Thread Johannes Berg
From: Johannes Berg In certain 802.11 wireless deployments, there will be ARP proxies that use knowledge of the network to correctly answer requests. To prevent gratuitous ARP frames on the shared medium from being a problem, on such deployments wireless needs to drop them. Enable this by

[PATCH v2 2/4] ipv6: add option to drop unicast encapsulated in L2 multicast

2015-11-04 Thread Johannes Berg
From: Johannes Berg In order to solve a problem with 802.11, the so-called hole-196 attack, add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if enabled, causes the stack to drop IPv6 unicast packets encapsulated in link-layer multi- or broadcast frames. Such frames

[PATCH v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-04 Thread Johannes Berg
From: Johannes Berg In order to solve a problem with 802.11, the so-called hole-196 attack, add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if enabled, causes the stack to drop IPv4 unicast packets encapsulated in link-layer multi- or broadcast frames. Such frames

[PATCH v2 4/4] ipv6: add option to drop unsolicited neighbor advertisements

2015-11-04 Thread Johannes Berg
From: Johannes Berg In certain 802.11 wireless deployments, there will be NA proxies that use knowledge of the network to correctly answer requests. To prevent unsolicitd advertisements on the shared medium from being a problem, on such deployments wireless needs to drop them. Enable this by

Re: [PATCH] iw: Added libnl-tiny support (regenerated)

2015-11-04 Thread Johannes Berg
On Wed, 2015-11-04 at 19:16 +0200, Dima Krasner wrote: > johannes - here's a single, regenerated patch. > Thanks, you should drop that extra data etc. (From 4f..., date, subject in the message body) - but I could edit that. much more important is that you sign off on the change. Thanks, johannes

Re: [PATCH v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-04 Thread Johannes Berg
On Wed, 2015-11-04 at 22:59 +0200, Julian Anastasov wrote: >  > Patches 1 and 3 look correct to me, > > Reviewed-by: Julian Anastasov Thanks for checking! > If the patches are lost in the merge window you > can also consider one minor optimization, see below... Oh, yeah, they p

Re: Configurable scan dwell time?

2015-11-04 Thread Johannes Berg
On Thu, 2015-11-05 at 07:41 +0100, Michal Kazior wrote: > On 5 November 2015 at 00:58, Ben Greear > wrote: > > It looks to me like the channel dwell time when scanning (SW > > scanning, > > mac80211) > > is fixed at 1/9 of a second.  I'd like to make this > > configurable...is that > > something >

[PATCH v3 2/4] ipv4: add option to drop gratuitous ARP packets

2015-11-05 Thread Johannes Berg
From: Johannes Berg In certain 802.11 wireless deployments, there will be ARP proxies that use knowledge of the network to correctly answer requests. To prevent gratuitous ARP frames on the shared medium from being a problem, on such deployments wireless needs to drop them. Enable this by

[PATCH v3 4/4] ipv6: add option to drop unsolicited neighbor advertisements

2015-11-05 Thread Johannes Berg
From: Johannes Berg In certain 802.11 wireless deployments, there will be NA proxies that use knowledge of the network to correctly answer requests. To prevent unsolicitd advertisements on the shared medium from being a problem, on such deployments wireless needs to drop them. Enable this by

[PATCH v3 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-05 Thread Johannes Berg
From: Johannes Berg In order to solve a problem with 802.11, the so-called hole-196 attack, add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if enabled, causes the stack to drop IPv4 unicast packets encapsulated in link-layer multi- or broadcast frames. Such frames

[PATCH v3 3/4] ipv6: add option to drop unicast encapsulated in L2 multicast

2015-11-05 Thread Johannes Berg
From: Johannes Berg In order to solve a problem with 802.11, the so-called hole-196 attack, add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if enabled, causes the stack to drop IPv6 unicast packets encapsulated in link-layer multi- or broadcast frames. Such frames

Re: [PATCH] mac80211: add new IEEE80211_VIF_GET_NOA_UPDATE flag

2015-11-05 Thread Johannes Berg
On Thu, 2015-11-05 at 14:48 +0100, Janusz Dziedzic wrote: > Any comments? :) > Looks OK - I'm not merging for -next right now since we're in the merge window. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.o

Re: Configurable scan dwell time?

2015-11-05 Thread Johannes Berg
On Thu, 2015-11-05 at 08:01 -0800, Ben Greear wrote: > My issue is that APs can be set to beacon at longer beacon times, and > then passive scanning at ~110ms intervals is not going to find the APs > very often (and with bad luck, technically it could *never* find the AP > due to scanning at unluc

Re: Configurable scan dwell time?

2015-11-05 Thread Johannes Berg
> > The thing though is that there are now use cases in the standard(s) > > that want/require doing this. So just adding it as a hint will run the > > risk of userspace (like wpa_s) using this "hint" for implementing newer > > spec functionality, testing on ath9k and hwsim and declaring that it >

Re: [PATCH-v2 1/2] mac80211: Take bitrates into account when building IEs.

2015-11-05 Thread Johannes Berg
On Thu, 2015-11-05 at 10:47 -0800, Ben Greear wrote: >  > Any comments on these patches? > As I said to Janusz earlier, I haven't been looking much due to kernel summit and now the merge window. I'll resume next week or so once the trees have stabilized a bit. johannes -- To unsubscribe from thi

[PATCH] mac80211: mesh: print MAC address instead of pointer

2015-11-06 Thread Johannes Berg
From: Johannes Berg There's no point in printing the mpath pointer since it can't be used for anything - print the MAC address instead (like in the forwarding case.) Signed-off-by: Johannes Berg --- net/mac80211/mesh_pathtbl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

[PATCH] mac80211_hwsim: stop using pointers as cookies

2015-11-06 Thread Johannes Berg
From: Johannes Berg Instead of using pointers, use sequentially assigned cookies. This is easier to understand while debugging and also avoids problems when the pointer is reused for the next allocation. Signed-off-by: Johannes Berg --- drivers/net/wireless/mac80211_hwsim.c | 18

[PATCH] mac80211: remove string from unaligned packet warning

2015-11-06 Thread Johannes Berg
From: Johannes Berg This really should never happen except very early in the process of bringing up a new driver, at which point you'll have to add more debugging in the driver and this string isn't useful. Remove it and save some size (when it's even compiled in.) Signed-off-by

[PATCH] lib80211: ratelimit key index mismatch

2015-11-06 Thread Johannes Berg
From: Johannes Berg This indicates a driver key selection issue, but even then there's no point in printing it all the time, so ratelimit it. Also remove the priv pointer from it -- people debugging will only have a single device anyway and it's useless as anything but a cookie. Sig

[PATCH v2] mac80211: remove string from unaligned packet warning

2015-11-06 Thread Johannes Berg
From: Johannes Berg This really should never happen except very early in the process of bringing up a new driver, at which point you'll have to add more debugging in the driver and this string isn't useful. Remove it and save some size (when it's even compiled in.) Signed-off-by

Re: [PATCH] nl80211: clarify NL80211_ATTR_SCHED_SCAN_DELAY usage with net-detect

2015-11-09 Thread Johannes Berg
On Mon, 2015-11-09 at 12:11 +0200, Luca Coelho wrote: > From: Luca Coelho > > In this attribute's documentation, it was not clear whether the delay > started counting when WoWLAN net-detect was enabled or when the > system > was suspended.  The correct answer is that it starts when the system > s

[RFC 0/4] mac80211: jump labels for hw flags

2015-11-09 Thread Johannes Berg
This was an experiment I thought of yesterday ... As also explained in the log for patch 3, we have a lot of behaviour differences in mac80211 based on which driver we're working against. In many cases (say OpenWRT router, or a phone/tablet, ChromeBook, etc.) we only have a single driver built int

[RFC 1/4] mac80211: add ieee80211_hw_clear()

2015-11-09 Thread Johannes Berg
From: Johannes Berg There are a few hardware flags that *are* valid to change, at least under certain circumstances. Since drivers are doing that, add an inline to make it easier to do correctly. They still need to take care of locking themselves. While at it, remove the pointless return in

[RFC 3/4] mac80211: use static keys for hw flags

2015-11-09 Thread Johannes Berg
From: Johannes Berg There are many drivers with different behaviour, but in a lot of systems only a single driver will ever be built. In that case we could practically get rid of the code for the paths that this driver/device doesn't need. Doing that, however, would be rather dangerous.

[RFC 4/4] mac80211: test the static key code

2015-11-09 Thread Johannes Berg
From: Johannes Berg Make hwsim select a few on/off symbols and check that the result is as expected: * before 'registering' a device the branches are according to the Kconfig default only * 'registering' a device fixes that up to actually check the hardware flags * &

[RFC 2/4] mac80211: introduce ieee80211_local_check()

2015-11-09 Thread Johannes Berg
From: Johannes Berg This will later allow introducing different behaviour between driver and hw checks. Make mac80211 use the new check function almost everywhere - one place cannot (rate control) and two of them shouldn't get the behaviour I want to introduce (in hw registration.) Signe

Re: [RFC 0/4] mac80211: jump labels for hw flags

2015-11-09 Thread Johannes Berg
On Mon, 2015-11-09 at 23:42 +0100, Peter Zijlstra wrote: > On Mon, Nov 09, 2015 at 11:02:33PM +0100, Johannes Berg wrote: > > As far as the code is concerned, there are two really ugly things: > >  1) I still use struct static_key - couldn't quite figure it out > >   

[RFC v2 0/4] mac80211: jump labels for hw flags

2015-11-10 Thread Johannes Berg
Changes since v1: * use struct static_key_false * get rid of all those generated macros and use the optimiser - This was an experiment I thought of on Sunday ... As also explained in the log for patch 3, we have a lot of behaviour differences in mac80211 based on which driver we're working

[RFC v2 2/4] mac80211: introduce ieee80211_local_check()

2015-11-10 Thread Johannes Berg
From: Johannes Berg This will later allow introducing different behaviour between driver and hw checks. Make mac80211 use the new check function almost everywhere - one place cannot (rate control) and two of them shouldn't get the behaviour I want to introduce (in hw registration.) Signe

[RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-10 Thread Johannes Berg
From: Johannes Berg There are many drivers with different behaviour, but in a lot of systems only a single driver will ever be built. In that case we could practically get rid of the code for the paths that this driver/device doesn't need. Doing that, however, would be rather dangerous.

[RFC v2 1/4] mac80211: add ieee80211_hw_clear()

2015-11-10 Thread Johannes Berg
From: Johannes Berg There are a few hardware flags that *are* valid to change, at least under certain circumstances. Since drivers are doing that, add an inline to make it easier to do correctly. They still need to take care of locking themselves. While at it, remove the pointless return in

[RFC v2 4/4] mac80211: test the static key code

2015-11-10 Thread Johannes Berg
From: Johannes Berg Make hwsim select a few on/off symbols and check that the result is as expected: * before 'registering' a device the branches are according to the Kconfig default only * 'registering' a device fixes that up to actually check the hardware flags * &

[RFC v2 5/4] mac80211: generate hw flags from include file

2015-11-10 Thread Johannes Berg
From: Johannes Berg Instead of having to list all the hw flags in many places, just list the macro to generate everything in a new include file and include it in the proper places. Unfortunately this breaks docbook processing since that doesn't pre-process the file. It also doesn't ge

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-10 Thread Johannes Berg
On Wed, 2015-11-11 at 02:22 +0200, Luca Coelho wrote: >  > Now that you have all these options in Kconfig, wouldn't it be > possible > to remove the calls to the "static" ieee80211_hw_set() in the drivers > and somehow set all the flags that are defined in Kconfig > automatically? > Since Kconfig

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-11 Thread Johannes Berg
On Wed, 2015-11-11 at 08:34 -0500, Steven Rostedt wrote: > > config MY_DRIVER > > depends on MAC80211 > > increment MAC80211_NUM_DRIVERS > > increment MAC80211_HW_MYFLAG > > If you don't need to check more that >0 why not just use SELECT? > > if (CONFIG_MAC80211_HW_MYFLAG == 0) > >

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-11 Thread Johannes Berg
OnOn Wed, 11 Nov 2015 14:39:16 +0100 > Johannes Berg wrote: > > > On Wed, 2015-11-11 at 08:34 -0500, Steven Rostedt wrote: > > > > > > config MY_DRIVER > > > > depends on MAC80211 > > > > increment MAC80211_NU

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-11 Thread Johannes Berg
On Wed, 2015-11-11 at 09:45 -0500, Steven Rostedt wrote: >  > config FLAG_ALL_SET >   default y >   depends on MY_DRIVER_1 && !MY_DRIVER_2 && ... && MY_DRIVER_N Right. But then I have to list all the drivers, which is rather annoying. I'd have to add more magic so that you somehow can't build with

[RFC v3 1/8] mac80211: add ieee80211_hw_clear()

2015-11-11 Thread Johannes Berg
From: Johannes Berg There are a few hardware flags that *are* valid to change, at least under certain circumstances. Since drivers are doing that, add an inline to make it easier to do correctly. They still need to take care of locking themselves. While at it, remove the pointless return in

[RFC v3 5/8] mac80211: generate hw flags from include file

2015-11-11 Thread Johannes Berg
From: Johannes Berg Instead of having to list all the hw flags in many places, just list the macro to generate everything in a new include file and include it in the proper places. Unfortunately this breaks docbook processing since that doesn't pre-process the file. It also doesn't ge

[RFC v3 0/8] mac80211: jump labels for HW flags

2015-11-11 Thread Johannes Berg
Changes since v2: * introduce Kconfig count and use it instead of _ON/_OFF in the first few patches and described below (I'll squash that later if I don't abandon the whole thing) Changes since v1: * use struct static_key_false * get rid of all those generated macros and use the optimiser

[RFC v3 4/8] mac80211: test the static key code

2015-11-11 Thread Johannes Berg
From: Johannes Berg Make hwsim select a few on/off symbols and check that the result is as expected: * before 'registering' a device the branches are according to the Kconfig default only * 'registering' a device fixes that up to actually check the hardware flags * &

[RFC v3 2/8] mac80211: introduce ieee80211_local_check()

2015-11-11 Thread Johannes Berg
From: Johannes Berg This will later allow introducing different behaviour between driver and hw checks. Make mac80211 use the new check function almost everywhere - one place cannot (rate control) and two of them shouldn't get the behaviour I want to introduce (in hw registration.) Signe

[RFC v3 3/8] mac80211: use static keys for hw flags

2015-11-11 Thread Johannes Berg
From: Johannes Berg There are many drivers with different behaviour, but in a lot of systems only a single driver will ever be built. In that case we could practically get rid of the code for the paths that this driver/device doesn't need. Doing that, however, would be rather dangerous.

[RFC v3 6/8] kconfig: introduce "count"

2015-11-11 Thread Johannes Berg
From: Johannes Berg "count" works similar to "select"; take, for example, this snippet: config MY_COUNTER int config MY_DRIVER_1 bool "my driver 1" count MY_COUNTER config MY_DRIVER_2 bool "my dri

[RFC v3 7/8] kconfig: regenerate the shipped files

2015-11-11 Thread Johannes Berg
From: Johannes Berg Unfortunately, I again used a different version of the tools, so the changes are rather large. Signed-off-by: Johannes Berg --- scripts/kconfig/zconf.hash.c_shipped | 10 +- scripts/kconfig/zconf.lex.c_shipped | 62 +- scripts/kconfig/zconf.tab.c_shipped | 1600

[RFC v3 8/8] mac80211: use Kconfig counters to determine feature optimisation

2015-11-11 Thread Johannes Berg
From: Johannes Berg Drivers that would like to have feature flag optimisations are currently required to select _ON and _OFF symbols for each one, indicating whether they'd like to be optimised for being on or off respectively. This handles badly, if a new feature flag is added then all

Re: [RFC v3 6/8] kconfig: introduce "count"

2015-11-12 Thread Johannes Berg
On Wed, 2015-11-11 at 23:15 +0100, Johannes Berg wrote: >  > +static unsigned long long count_or_symbols(struct expr *e) > +{ > + switch (e->type) { > + case E_SYMBOL: > + return 1; Oh, this is obviously bogus - I need to count the *enabled* sym

<    14   15   16   17   18   19   20   21   22   23   >