Search Linux Wireless

Re: [PATCH] mac80211: implement critical protocol protection

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

 



On Fri, Jul 26, 2013 at 11:08 AM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> From: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx>
>
> This new API add in cfg80211 wasn't implemented in mac80211.
> Advertise the capabilities based on the device's
> implementation (possibly NULL) of crit_prot mac80211 ops.
>
> This callback will be called by cfg80211 when hinted by
> userspace that a critical protocol is happening, e.g. it can
> be EAPOL, DHCP.
>
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx>
> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
[...]
> +static int ieee80211_crit_proto_start(struct wiphy *wiphy,
> +                                     struct wireless_dev *wdev,
> +                                     enum nl80211_crit_proto_id protocol,
> +                                     u16 duration)
> +{
> +       struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
> +       struct ieee80211_local *local = wiphy_priv(wiphy);
> +       int ret;
> +
> +       ret = drv_crit_proto(local, sdata, protocol, true);
> +       if (!ret)
> +               return ret;

Shouldn't this be "if (ret)" ?

Also maybe the low-level driver should get the duration and indicate
completion on its own? (similar to what Eliad suggested).
Seems to me very similar to ROC, and would probably be implemented as
such for some drivers.

> +
> +       ieee80211_queue_delayed_work(&sdata->local->hw,
> +                                    &sdata->crit_prot_end_wk,
> +                                    msecs_to_jiffies(duration));
> +       return 0;
> +}

Arik
--
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