Search Linux Wireless

Re: [RFC 6/9] mac80211: add ap channel switch command/event

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

 



On Thu, 2012-02-02 at 18:07 +0200, Goldenshtein, Victor wrote:
> On Tue, Jan 31, 2012 at 7:51 AM, Johannes Berg
> <johannes@xxxxxxxxxxxxxxxx> wrote:
> > On 1/26/2012 4:38 AM, Victor Goldenshtein wrote:
> >>
> >> New ieee80211_ap_process_chanswitch(), to handle a channel switch
> >> request for AP/GO.
> >>
> >> New 'post_switch_block_tx' parameter in 'ieee80211_channel_switch'
> >> structure, which indicates whether transmission must be blocked after
> >> the scheduled channel switch, it should be set if the target channel
> >> is DFS channel.
> >>
> >> New ieee80211_ap_ch_switch_complete_notify() which notifies upper
> >> layers about channel switch complete event.
> >
> >
> > Shouldn't mac80211 have some non-offload implementation for this?

> What do you mean by "non-offload"?

When the driver doesn't explicitly implement channel switch for this and
other things, mac80211 could (should?) manage it.

> The mechanism is different from the client-side channel switch, but
> the "ieee80211_channel_switch" struct is almost the same (new
> post_switch_block_tx). Do you prefer to create a new
> "ieee80211_ap_channel_switch" struct + new driver callback ? something
> like drv_ap_channel_switch ?

I think that would be cleaner in terms of API, since not all drivers
will support both.

> >> +static int ieee80211_ap_process_chanswitch(struct wiphy *wiphy,
> >> +                                          struct net_device *dev,
> >> +                                          u32 count, bool block_tx,
> >> +                                          bool post_switch_block_tx,
> >> +                                          u32 new_freq)
> >> +{
> >> +       struct ieee80211_sub_if_data *sdata =
> >> IEEE80211_DEV_TO_SUB_IF(dev);
> >> +       struct ieee80211_local *local = sdata->local;
> >> +       struct ieee80211_channel *new_ch;
> >> +       struct ieee80211_channel_switch ch_switch;
> >> +
> >> +       new_ch = ieee80211_get_channel(sdata->local->hw.wiphy, new_freq);
> >> +       if (!new_ch || new_ch->flags&  IEEE80211_CHAN_DISABLED) {
> >>
> >> +               wiphy_debug(local->hw.wiphy,
> >> +                           "failed channel switch on freq: %d\n",
> >> new_freq);
> >> +               return -EINVAL;
> >> +       }
> >
> >
> > That code should obviously be in cfg80211.
> >
> 
> Why ? and where exactly ?

Why? because all drivers will need to make this check. Wherever cfg80211
calls into this, of course, and then you'd cal in with a channel pointer
rather than the new freq.

johannes

--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux