Re: [PATCH 2/2] mac80211: 802.11p OCB mode support

From: Johannes Berg
Date: Fri Oct 31 2014 - 09:29:28 EST


On Thu, 2014-10-30 at 11:42 +0100, Rostislav Lisovy wrote:

> +int ieee80211_ocb_join(struct ieee80211_sub_if_data *sdata,
> + struct ocb_setup *setup)
> +{
> + struct ieee80211_local *local = sdata->local;
> + struct ieee80211_if_ocb *ifocb = &sdata->u.ocb;
> + u32 changed = BSS_CHANGED_OCB;
> + int err;
> +
> + if (ifocb->joined == true)
> + return -EINVAL;

You could, potentially, use the fact that you have a channel context
assigned instead. However, locking might make that awkward, and this is
perfectly fine as well of course. It's probably not worth changing it.

Looks good to me.

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/