Re: [PATCH] mac80211: implement critical protocol protection
From: Emmanuel Grumbach <hidden>
Date: 2013-08-01 06:07:10
quoted
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 <redacted> Signed-off-by: Johannes Berg <redacted>[...]quoted
+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)" ?
You're obviously right...
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.
yeah - that could make it. I'll be unavailable in the coming 2 weeks though.