d80211 constants inside d80211_common.h

6 messages, 2 authors, 2006-12-27 · open the first message on its own page

d80211 constants inside d80211_common.h

From: "Nick Kossifidis" <mickflemm@gmail.com>
Date: 2006-12-27 08:32:52

ieee80211_msg_type, ieee80211_phytype and ieee80211_ssi_type should be
in capitals as they are constants and must not be mistaken for vars...


enum ieee80211_msg_type {
        IEEE80211_MSG_NORMAL            = 0,
        IEEE80211_MSG_TX_CALLBACK_ACK   = 1,
        IEEE80211_MSG_TX_CALLBACK_FAIL  = 2,
        IEEE80211_MSG_PASSIVE_SCAN      = 3,
        IEEE80211_MSG_WEP_FRAME_UNKNOWN_KEY = 4,
        IEEE80211_MSG_MICHAEL_MIC_FAIL  = 5,
        /* hole at 6, was monitor but never sent to userspace */
        IEEE80211_MSG_STA_NOT_ASSOC     = 7,
        IEEE80211_MSG_SET_AID_FOR_STA   = 8 /* used by Intersil MVC driver */,
        IEEE80211_MSG_KEY_THRESHOLD_NOTIFICATION = 9,
        IEEE80211_MSG_RADAR             = 11,
};


enum ieee80211_phytype {
        IEEE80211_PHYTYPE_FHSS_DOT11_97  = 1,
        IEEE80211_PHYTYPE_DSSS_DOT11_97  = 2,
        IEEE80211_PHYTYPE_IRBASEBAND     = 3,
        IEEE80211_PHYTYPE_DSSS_DOT11_B   = 4,
        IEEE80211_PHYTYPE_PBCC_DOT11_B   = 5,
        IEEE80211_PHYTYPE_OFDM_DOT11_G   = 6,
        IEEE80211_PHYTYPE_PBCC_DOT11_G   = 7,
        IEEE80211_PHYTYPE_OFDM_DOT11_A   = 8,
        IEEE80211_PHYTYPE_DSSS_DOT11_TURBOG = 255,
        IEEE80211_PHYTYPE_DSSS_DOT11_TURBO = 256,
};


enum ieee80211_ssi_type {
        IEEE80211_SSI_NONE = 0,
        IEEE80211_SSI_NORM = 1, /* normalized, 0-1000 */
        IEEE80211_SSI_DBM = 2,
        IEEE80211_SSI_RAW = 3, /* raw SSI */
};

I did a grep inside drivers/net/wireless/d80211/* and they are not
used yet in drivers. Can you plz fix it before drivers start using
them ?


Thanx for your time
Nick

Re: d80211 constants inside d80211_common.h

From: Michael Wu <hidden>
Date: 2006-12-27 16:08:18

On Wednesday 27 December 2006 03:32, Nick Kossifidis wrote:
I did a grep inside drivers/net/wireless/d80211/* and they are not
used yet in drivers. Can you plz fix it before drivers start using
them ?
Already fixed, just waiting for wireless-dev to get it.

http://kernel.org/git/?p=linux/kernel/git/jbenc/dscape.git;a=commitdiff;h=4ae94181f808da96352478c6d4102e3b0b5dfaac

-Michael Wu

Re: d80211 constants inside d80211_common.h

From: "Nick Kossifidis" <mickflemm@gmail.com>
Date: 2006-12-27 17:26:04

We need those definitions for setting up the rate tables in dadwifi,
phytypes are needed inside drivers, take a look here ->
http://madwifi.org/browser/branches/dadwifi-openhal/openhal/ar5xxx.h?rev=1867

Even if it does get out, constants should be in capitals.


Thanx for your time
Nick

2006/12/27, Michael Wu [off-list ref]:
On Wednesday 27 December 2006 03:32, Nick Kossifidis wrote:
quoted
I did a grep inside drivers/net/wireless/d80211/* and they are not
used yet in drivers. Can you plz fix it before drivers start using
them ?
Already fixed, just waiting for wireless-dev to get it.

http://kernel.org/git/?p=linux/kernel/git/jbenc/dscape.git;a=commitdiff;h=4ae94181f808da96352478c6d4102e3b0b5dfaac

-Michael Wu

Re: d80211 constants inside d80211_common.h

From: "Nick Kossifidis" <mickflemm@gmail.com>
Date: 2006-12-27 18:01:18

Anyway it's not a problem to get phytypes outside dadwifi, but i think
it's low level stuff that's generaly needed. The main cause for my
mail was to capitalize them, anywhere they get inside kernel source.


Thanx for your time
Nick

2006/12/27, Nick Kossifidis [off-list ref]:
We need those definitions for setting up the rate tables in dadwifi,
phytypes are needed inside drivers, take a look here ->
http://madwifi.org/browser/branches/dadwifi-openhal/openhal/ar5xxx.h?rev=1867

Even if it does get out, constants should be in capitals.


Thanx for your time
Nick

2006/12/27, Michael Wu [off-list ref]:
quoted
On Wednesday 27 December 2006 03:32, Nick Kossifidis wrote:
quoted
I did a grep inside drivers/net/wireless/d80211/* and they are not
used yet in drivers. Can you plz fix it before drivers start using
them ?
Already fixed, just waiting for wireless-dev to get it.

http://kernel.org/git/?p=linux/kernel/git/jbenc/dscape.git;a=commitdiff;h=4ae94181f808da96352478c6d4102e3b0b5dfaac

-Michael Wu

Re: d80211 constants inside d80211_common.h

From: Michael Wu <hidden>
Date: 2006-12-27 19:12:57

On Wednesday 27 December 2006 12:26, Nick Kossifidis wrote:
We need those definitions for setting up the rate tables in dadwifi,
phytypes are needed inside drivers, take a look here ->
http://madwifi.org/browser/branches/dadwifi-openhal/openhal/ar5xxx.h?rev=18
67
MODE_IEEE80211A/B/G and IEEE80211_RATE_* not enough? The definitions in 
d80211_common.h are used for communications with userspace, not drivers. If 
you are using the ieee80211_phytype_* in things that are passed to d80211, it 
is wrong. If you are not, you can switch to MODE_IEEE80211A/B/G and 
IEEE80211_RATE_*, though I think MODE_IEEE80211A/B/G should be all you need.
Even if it does get out, constants should be in capitals.
Sure. Submit a patch. :)

-Michael Wu

Re: d80211 constants inside d80211_common.h

From: "Nick Kossifidis" <mickflemm@gmail.com>
Date: 2006-12-27 20:58:15

Thank you, i'll use directly IEEE80211_RATE_* ;-)


Nick

2006/12/27, Michael Wu [off-list ref]:
On Wednesday 27 December 2006 12:26, Nick Kossifidis wrote:
quoted
We need those definitions for setting up the rate tables in dadwifi,
phytypes are needed inside drivers, take a look here ->
http://madwifi.org/browser/branches/dadwifi-openhal/openhal/ar5xxx.h?rev=18
67
MODE_IEEE80211A/B/G and IEEE80211_RATE_* not enough? The definitions in
d80211_common.h are used for communications with userspace, not drivers. If
you are using the ieee80211_phytype_* in things that are passed to d80211, it
is wrong. If you are not, you can switch to MODE_IEEE80211A/B/G and
IEEE80211_RATE_*, though I think MODE_IEEE80211A/B/G should be all you need.
quoted
Even if it does get out, constants should be in capitals.
Sure. Submit a patch. :)

-Michael Wu

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help