Search Linux Wireless

Re: [PATCH 3/3] mac80211: compute chanctx refcount dynamically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7 March 2014 12:19, Michal Kazior <michal.kazior@xxxxxxxxx> wrote:
> It doesn't make much sense to have a manually
> managed chanctx refcount. It isn't performance
> critical and it can't be even used outside the
> protection of chanctx_mtx.
>
> With future enhancements to channel contenxt
> (namely reservations) refcount accounting will
> become more complex and having manually managed
> refcount is going to be error-prone and confusing.
>
> The refcount is now equal to the number of vifs it
> is assigned to. However in the future this will
> change so keep the refcount/num_assigned_vifs
> functions split now.
>
> Signed-off-by: Michal Kazior <michal.kazior@xxxxxxxxx>

Self-NACK.

I totally missed how ieee80211_remove_interfaces() works. It removes
all interfaces from the list in one go before each is actually
stopped. This means refcount computes 0. IOW If you unload a driver
with multiple interfaces running you get a nice general protection
fault (multiple ieee80211_free_chanctx calls).

I'm planning on adding `struct list_head` to sdata and chanctx to be
able to iterate over assigned (and reserved, in the future) chanctx.
What do you think? Do you have other ideas?


Michał
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux