Search Linux Wireless

Re: [RFC 08/21] mac80211: improve chanctx reservation lookup

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

 



On 18 March 2014 17:57, Eliad Peller <eliad@xxxxxxxxxx> wrote:
> On Tue, Mar 18, 2014 at 3:53 PM, Michal Kazior <michal.kazior@xxxxxxxxx> wrote:
>> Use a separate function to look for reservation
>> chanctx. For multi-interface/channel reservation
>> search sematics differ slightly.
>>
>> The new routine allows reservations to be merged
>> with chanctx that are already reserved by other
>> interface(s).
>>
>> Signed-off-by: Michal Kazior <michal.kazior@xxxxxxxxx>
>> ---
> [...]
>
>> +static const struct cfg80211_chan_def *
>> +ieee80211_chanctx_non_reserved_chandef(struct ieee80211_local *local,
>> +                                      struct ieee80211_chanctx *ctx,
>> +                                      const struct cfg80211_chan_def *compat)
>> +{
>> +       struct ieee80211_sub_if_data *sdata;
>> +
>> +       lockdep_assert_held(&local->chanctx_mtx);
>> +
>> +       list_for_each_entry(sdata, &ctx->assigned_vifs,
>> +                           assigned_chanctx_list) {
>> +               if (rcu_access_pointer(sdata->reserved_chanctx) != NULL)
>> +                       continue;
> this is not rcu pointer...

Good catch, thanks! I must've missed this while rebasing.


>> +static bool
>> +ieee80211_chanctx_can_reserve_chandef(struct ieee80211_local *local,
>> +                                     struct ieee80211_chanctx *ctx,
>> +                                     const struct cfg80211_chan_def *def)
>> +{
>> +       lockdep_assert_held(&local->chanctx_mtx);
>> +
>> +       if (ieee80211_chanctx_combined_chandef(local, ctx, NULL) &&
>> +           ieee80211_chanctx_combined_chandef(local, ctx, def))
>> +               return true;
>> +
> what's the reason for calling it with NULL?
>
>> +       if (!list_empty(&ctx->reserved_vifs) &&
>> +           ieee80211_chanctx_reserved_chandef(local, ctx, NULL) &&
>> +           ieee80211_chanctx_reserved_chandef(local, ctx, def))
>> +               return true;
> and this seems redundant as _combined_chandef() should already check for it?

Hmm, good point. I'll get rid of these redundant checks.


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