Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' mustbe NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

From: Johannes Berg
Date: Mon Dec 02 2013 - 09:49:26 EST


On Sun, 2013-12-01 at 14:38 -0800, Joe Perches wrote:
> On Sun, 2013-12-01 at 10:35 +0100, Johannes Berg wrote:
> > Good try, but no, now ap_sdata isn't even assigned. :)
>
> Right. Oh well. There's no improving this without
> significant rewrite. Even then, there may not be much
> overall improvement.

I could see an improvement if we were to actually make changes to assign
the pointer based on the iftype, when that changes, so that each
function only has to handle the right type and we don't need the switch
statement at all...

But that's tricky to get right and I'm between vacations and holidays
and all that ...

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/