Re: CVS commit: src/sys/net80211

2018-01-21 Thread Maxime Villard

Le 20/01/2018 à 20:40, Mindaugas Rasiukevicius a écrit :

Hi,

David Young  wrote:

On Tue, Jan 16, 2018 at 08:39:29AM +, Maxime Villard wrote:

Module Name:src
Committed By:   maxv
Date:   Tue Jan 16 08:39:29 UTC 2018

Modified Files:
src/sys/net80211: ieee80211_input.c



...

IMO, changes like this are important and overdue, however, do keep in
mind the provenance of this code: NetBSD -> FreeBSD.

Maybe you have written off ever re-synching with FreeBSD?  If so, do
you have a plan for integrating useful features like virtual stations
independently of their code?


I can just echo this part.  It is completely unrealistic that NetBSD can
maintain its own 802.11 stack these days. 


Well, I agree, but:


A better approach would be to sync the code with FreeBSD and treat is as
an upstream, trying to merge the fixes back there.  Not sure if diverging
will help syncing the code.


My point, in the changes I made, was to fix several bugs, and along the way,
put the code in a state where it is at least readable a little.

That's not incompatible with syncing the code with FreeBSD afterwards. We
don't have more features as a result of my changes, but at least the ones we
have are less buggy.

Maxime


Re: CVS commit: src/sys/net80211

2018-01-20 Thread maya
I don't think there is any objection, even if adopting the freebsd code
results in kiling less important drivers.

Note that freebsd has similar bugs to what maxv just fixed (I emailed
security-officer@freebsd about the one I saw).


Re: CVS commit: src/sys/net80211

2018-01-20 Thread Mindaugas Rasiukevicius
Hi,

David Young  wrote:
> On Tue, Jan 16, 2018 at 08:39:29AM +, Maxime Villard wrote:
> > Module Name:src
> > Committed By:   maxv
> > Date:   Tue Jan 16 08:39:29 UTC 2018
> > 
> > Modified Files:
> > src/sys/net80211: ieee80211_input.c
> > 
> 
> ...
> 
> IMO, changes like this are important and overdue, however, do keep in
> mind the provenance of this code: NetBSD -> FreeBSD.
> 
> Maybe you have written off ever re-synching with FreeBSD?  If so, do
> you have a plan for integrating useful features like virtual stations
> independently of their code?

I can just echo this part.  It is completely unrealistic that NetBSD can
maintain its own 802.11 stack these days.  A better approach would be to
sync the code with FreeBSD and treat is as an upstream, trying to merge
the fixes back there.  Not sure if diverging will help syncing the code.

IMO, 802.11n (and there is some FreeBSD code for 802.11ac) is much more
useful feature, as it would allow NetBSD users to use decent WiFI speeds.
Currently supported throughput is pretty miserable for these days..

-- 
Mindaugas


Re: CVS commit: src/sys/net80211

2018-01-17 Thread Roy Marples

On 17/01/2018 01:57, m...@netbsd.org wrote:

On Tue, Jan 16, 2018 at 06:35:08PM -0600, David Young wrote:

I have said it before, that I do think the "concept architecture" of
802.11 VAP is rather broken, but let's be honest: nobody, especially not
I, have had the time in 10+ years to independently implement anything
comparable. *shrug*


What is your issue with VAPs?


My main beef with early VAP implementations is that the user had to 
create a VAP from the physical interface/radio just to get client 
association working.


Thankfully those days have now passed it seems.

But frankly it's just easier to get another interface/radio.

Roy


Re: CVS commit: src/sys/net80211

2018-01-17 Thread Maxime Villard

Le 17/01/2018 à 01:35, David Young a écrit :

On Tue, Jan 16, 2018 at 08:39:29AM +, Maxime Villard wrote:

Module Name:src
Committed By:   maxv
Date:   Tue Jan 16 08:39:29 UTC 2018

Modified Files:
src/sys/net80211: ieee80211_input.c

Log Message:
Split ieee80211_input into three sub-functions, that parse received
packets depending on their type:

DATA   -> ieee80211_input_data
MANAGEMENT -> ieee80211_input_management
CONTROL-> ieee80211_input_control

No real functional change, but makes the code much clearer.


IMO, changes like this are important and overdue, however, do keep in
mind the provenance of this code: NetBSD -> FreeBSD.


I know.


Maybe you have written off ever re-synching with FreeBSD?  If so, do
you have a plan for integrating useful features like virtual stations
independently of their code?


No, I'm not planning on re-synching with FreeBSD. Their code has very
significantly changed, and we're miles away from that. I'm just clarifying
the code, fixing bugs along the way, without touching the "features"
themselves.

Maxime


Re: CVS commit: src/sys/net80211

2018-01-16 Thread maya
On Tue, Jan 16, 2018 at 06:35:08PM -0600, David Young wrote:
> I have said it before, that I do think the "concept architecture" of
> 802.11 VAP is rather broken, but let's be honest: nobody, especially not
> I, have had the time in 10+ years to independently implement anything
> comparable. *shrug*

What is your issue with VAPs?


Re: CVS commit: src/sys/net80211

2018-01-16 Thread David Young
On Tue, Jan 16, 2018 at 08:39:29AM +, Maxime Villard wrote:
> Module Name:  src
> Committed By: maxv
> Date: Tue Jan 16 08:39:29 UTC 2018
> 
> Modified Files:
>   src/sys/net80211: ieee80211_input.c
> 
> Log Message:
> Split ieee80211_input into three sub-functions, that parse received
> packets depending on their type:
> 
>   DATA   -> ieee80211_input_data
>   MANAGEMENT -> ieee80211_input_management
>   CONTROL-> ieee80211_input_control
> 
> No real functional change, but makes the code much clearer.

IMO, changes like this are important and overdue, however, do keep in
mind the provenance of this code: NetBSD -> FreeBSD.

Maybe you have written off ever re-synching with FreeBSD?  If so, do
you have a plan for integrating useful features like virtual stations
independently of their code?

I have said it before, that I do think the "concept architecture" of
802.11 VAP is rather broken, but let's be honest: nobody, especially not
I, have had the time in 10+ years to independently implement anything
comparable. *shrug*

Dave

-- 
David Young
dyo...@pobox.comUrbana, IL(217) 721-9981


Re: CVS commit: src/sys/net80211

2016-04-08 Thread Roy Marples
On 06/04/2016 17:31, David Young wrote:
> On Wed, Apr 06, 2016 at 02:42:16PM +, Roy Marples wrote:
>> Module Name: src
>> Committed By:roy
>> Date:Wed Apr  6 14:42:16 UTC 2016
>>
>> Modified Files:
>>  src/sys/net80211: ieee80211_ioctl.h ieee80211_node.c ieee80211_node.h
>>  ieee80211_rssadapt.h ieee80211_var.h
>>
>> Log Message:
>> ieee80211 users in Other OS export rssi and noise as int8_t.
>> We should not be the odd one out for no good reason and the majority
>> of the ieee80211 drivers treat rssi as int8_t.
> 
> This may be a more difficult change to make properly than you
> anticipated.  Drivers like rtw(4) assume 0 <= RSSI <= UINT8_MAX.  If you
> put those RSSI into an int8_t, then for high signal strengths the number
> may change sign instead of increase in magnitude.

You're correct, sorry about that.
Still, in the hope that one day I can display my pretty bars we need
some way of telling userland something about the units of RSSI as known
to the driver - maybe we can expose some driver capabilities and do it
there?

struct ieee80211_drivercaps_req {
uint32_tdc_drivercaps;
uint32_tdc_cryptocaps;
uint8_t dc_rssi_min;
uint8_t dc_rssi_max;
}
#define IEEE80211_C_RSSI_DBM

So userland can know the minimum and maximum values for RSSI and
optionally what they mean - in this case I want to know that my iwi(4)
and iwn(4) report values in dBm.

Ideally I want to extend ieee80211_input to accept noise (if known) as
well. FreeBSD simply dropped rstamp in the function whereas OpenBSD
converted the last field to a struct which has rssi and rstamp, but
obviously nosie could be added there as well.

Thoughts on this are welcome.

Roy


Re: CVS commit: src/sys/net80211

2016-04-06 Thread Roy Marples
On 06/04/2016 17:31, David Young wrote:
> On Wed, Apr 06, 2016 at 02:42:16PM +, Roy Marples wrote:
>> Module Name: src
>> Committed By:roy
>> Date:Wed Apr  6 14:42:16 UTC 2016
>>
>> Modified Files:
>>  src/sys/net80211: ieee80211_ioctl.h ieee80211_node.c ieee80211_node.h
>>  ieee80211_rssadapt.h ieee80211_var.h
>>
>> Log Message:
>> ieee80211 users in Other OS export rssi and noise as int8_t.
>> We should not be the odd one out for no good reason and the majority
>> of the ieee80211 drivers treat rssi as int8_t.
> 
> This may be a more difficult change to make properly than you
> anticipated.  Drivers like rtw(4) assume 0 <= RSSI <= UINT8_MAX.  If you
> put those RSSI into an int8_t, then for high signal strengths the number
> may change sign instead of increase in magnitude.

A fair point.
But would this not also be true for drivers like iwn(4) who assume rssi
can be negative?

Roy


Re: CVS commit: src/sys/net80211

2016-04-06 Thread David Young
On Wed, Apr 06, 2016 at 02:42:16PM +, Roy Marples wrote:
> Module Name:  src
> Committed By: roy
> Date: Wed Apr  6 14:42:16 UTC 2016
> 
> Modified Files:
>   src/sys/net80211: ieee80211_ioctl.h ieee80211_node.c ieee80211_node.h
>   ieee80211_rssadapt.h ieee80211_var.h
> 
> Log Message:
> ieee80211 users in Other OS export rssi and noise as int8_t.
> We should not be the odd one out for no good reason and the majority
> of the ieee80211 drivers treat rssi as int8_t.

This may be a more difficult change to make properly than you
anticipated.  Drivers like rtw(4) assume 0 <= RSSI <= UINT8_MAX.  If you
put those RSSI into an int8_t, then for high signal strengths the number
may change sign instead of increase in magnitude.

Dave

-- 
David Young
dyo...@pobox.comUrbana, IL(217) 721-9981


Re: CVS commit: src/sys/net80211

2013-04-01 Thread Thomas Klausner
Now current/GENERIC doesn't compile:
In file included from ../../../../net80211/ieee80211_var.h:62:0,
 from ../../../../dev/ic/an.c:108:
 ../../../../net80211/ieee80211_proto.h: In function ‘ieee80211_hdrsize’:
 ../../../../net80211/ieee80211_proto.h:109:2: error: implicit declaration of 
function ‘IEEE80211_QOS_HAS_SEQ’
 *** Error code 1


  Thomas
 
On Fri, Mar 29, 2013 at 11:25:47PM -0400, Christos Zoulas wrote:
 Module Name:  src
 Committed By: christos
 Date: Sat Mar 30 03:25:47 UTC 2013
 
 Modified Files:
   src/sys/net80211: ieee80211.h
 
 Log Message:
 remove obsolete macro
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.24 -r1.25 src/sys/net80211/ieee80211.h
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Re: CVS commit: src/sys/net80211

2013-03-30 Thread David Young
On Fri, Mar 29, 2013 at 09:05:49PM -0400, Christos Zoulas wrote:
 Module Name:  src
 Committed By: christos
 Date: Sat Mar 30 01:05:49 UTC 2013
 
 Modified Files:
   src/sys/net80211: ieee80211.h ieee80211_proto.h
 
 Log Message:
 EDCA and QOS additions from OpenBSD

Beware: our net80211 derives from FreeBSD's.  IIUC, OpenBSD's and
FreeBSD's are (or were?) quite divergent.

Excessive whitespace probably comes from FreeBSD, too. :-)

Dave

-- 
David Young
dyo...@pobox.comUrbana, IL(217) 721-9981


Re: CVS commit: src/sys/net80211

2013-03-30 Thread Christos Zoulas
In article 20130330221106.gm1...@pobox.com,
David Young  dyo...@pobox.com wrote:

Beware: our net80211 derives from FreeBSD's.  IIUC, OpenBSD's and
FreeBSD's are (or were?) quite divergent.

Excessive whitespace probably comes from FreeBSD, too. :-)

I know :-) I really miss having 'N' too, and if you remember, I have synced
once the code with FreeBSD's and never finished. The opposing force is that
many of the wireless drivers are written for OpenBSD.

christos



Re: CVS commit: src/sys/net80211

2013-03-29 Thread NONAKA Kimihiro
Hi,

2013/3/30 Christos Zoulas chris...@netbsd.org:

 Module Name:src
 Committed By:   christos
 Date:   Sat Mar 30 01:05:49 UTC 2013

 Modified Files:
 src/sys/net80211: ieee80211.h ieee80211_proto.h

 Log Message:
 EDCA and QOS additions from OpenBSD

You have to add the following lines. It seems same as WME_AC_ *.

-
 /*
+ * EDCA Access Categories.
+ */
+enum ieee80211_edca_ac {
+ EDCA_AC_BK  = 1, /* Background */
+ EDCA_AC_BE  = 0, /* Best Effort */
+ EDCA_AC_VI  = 2, /* Video */
+ EDCA_AC_VO  = 3 /* Voice */
+};
+#define EDCA_NUM_AC 4
+
-

WME_AC_ *
- sys/net80211/ieee80211.h
#define WME_AC_BE 0 /* best effort */
#define WME_AC_BK 1 /* background */
#define WME_AC_VI 2 /* video */
#define WME_AC_VO 3 /* voice */
-

Regards,
--
NONAKA Kimihiro


Re: CVS commit: src/sys/net80211

2013-03-29 Thread Christos Zoulas
In article cam+xf6bdtr4hjg5z7jwojhwgig5e24zq2ujiy_nijsl60pz...@mail.gmail.com,
NONAKA Kimihiro  nona...@gmail.com wrote:
Hi,

2013/3/30 Christos Zoulas chris...@netbsd.org:

 Module Name:src
 Committed By:   christos
 Date:   Sat Mar 30 01:05:49 UTC 2013

 Modified Files:
 src/sys/net80211: ieee80211.h ieee80211_proto.h

 Log Message:
 EDCA and QOS additions from OpenBSD

You have to add the following lines. It seems same as WME_AC_ *.

-
 /*
+ * EDCA Access Categories.
+ */
+enum ieee80211_edca_ac {
+ EDCA_AC_BK  = 1, /* Background */
+ EDCA_AC_BE  = 0, /* Best Effort */
+ EDCA_AC_VI  = 2, /* Video */
+ EDCA_AC_VO  = 3 /* Voice */
+};
+#define EDCA_NUM_AC 4
+
-

WME_AC_ *
- sys/net80211/ieee80211.h
#define WME_AC_BE 0 /* best effort */
#define WME_AC_BK 1 /* background */
#define WME_AC_VI 2 /* video */
#define WME_AC_VO 3 /* voice */
-

They are there? I should gc the old one I guess.

christos



Re: CVS commit: src/sys/net80211

2011-02-25 Thread Christoph Egger

On 02/25/11 11:45, Matthias Scheler wrote:

Module Name:src
Committed By:   tron
Date:   Fri Feb 25 10:45:57 UTC 2011

Modified Files:
src/sys/net80211: ieee80211_radiotap.h

Log Message:
Remove duplicate definitions which break the build.


Thanks. I was about testing a fix but your release build finished 
earlier than mine.


Christoph


Re: CVS commit: src/sys/net80211

2011-02-25 Thread David Young
On Fri, Feb 25, 2011 at 08:01:50AM +, Christoph Egger wrote:
 Module Name:  src
 Committed By: cegger
 Date: Fri Feb 25 08:01:49 UTC 2011
 
 Modified Files:
   src/sys/net80211: ieee80211_radiotap.h
 
 Log Message:
 sync with FreeBSD rev 1.11. No binary changes.

Careful:  NetBSD follows the standard,
http://www.radiotap.net/defined-fields, and field 18 has not been
standardized.  Please back out this change (and all of the subsequent
changes) and send a patch for review to tech-net.

Dave

-- 
David Young OJC Technologies
dyo...@ojctech.com  Urbana, IL * (217) 344-0444 x24


Re: CVS commit: src/sys/net80211

2011-02-25 Thread Christoph Egger
On 25.02.11 17:15, David Young wrote:
 On Fri, Feb 25, 2011 at 08:01:50AM +, Christoph Egger wrote:
 Module Name: src
 Committed By:cegger
 Date:Fri Feb 25 08:01:49 UTC 2011

 Modified Files:
  src/sys/net80211: ieee80211_radiotap.h

 Log Message:
 sync with FreeBSD rev 1.11. No binary changes.
 
 Careful:  NetBSD follows the standard,
 http://www.radiotap.net/defined-fields, and field 18 has not been
 standardized.  Please back out this change (and all of the subsequent
 changes) and send a patch for review to tech-net.

Do you mean that bit field or the whole revision ?

Christoph