Re: [RFC PATCH 1/3] mac80211: restructure disassoc/deauth flows

Johannes Berg
2008-09-06T23:34:39Z

[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]

On Sun, 2008-09-07 at 02:24 +0300, Tomas Winkler wrote:
> On Sun, Sep 7, 2008 at 1:42 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> > On Sun, 2008-09-07 at 01:32 +0300, Tomas Winkler wrote:
> >> On Sun, Sep 7, 2008 at 1:25 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> >> >
> >> >>
> >> >> +static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
> >> >> + struct ieee80211_if_sta *ifsta, int deauth,
> >> >> + int self_disconnected, u16 reason)
> >> >
> >> > I think you should use bool for those two (deauth, self)
> >>
> >> I'm thinking rather using some enum values just for readability
> >> foo(DEAUTH, ORIGIN_SELF) vs foo(tree,true)
> >> foo(DISASSOC, ORIGIN_PEER) vs foo(false, false)
> >
> > That works too, sure, though seems a little overkill, the function is
> > called what, three times? Anyway, whatever you prefer, I just don't like
> > bare "int" as a bool.
>
> Do u think it is sane using IEEE80211_STYPE_DISASSOC and
> IEEE80211_STYPE_DEAUTH for this?

Dunno, were you thinking of unifying ieee80211_send_disassoc and
ieee80211_send_deauth into a single function? That might be worthwhile
anyway, the frames are identical...

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]