cfg80211: Provision to pass probe response ie along with remain on channel request
PATCH 1/1 cfg80211: Provision to pass probe response ie along with remain on channel request
The probe response ie should be set in driver before the listen state for a listen only P2P device. Right now probe response ie is set using driver specific private command implementations. This commit enhances the remain_on_channel command handler to pass probe response ie along with rest of the arguments.
Another approach is the addition of a new nl80211 command specific to pass ies to driver. This will give more flexibilty to upper layer.
--- include/net/cfg80211.h | 24 +++++++++++++++++++++--- net/wireless/nl80211.c | 42 ++++++++++++++++++++++++++++++++++-------- net/wireless/rdev-ops.h | 11 +++++------ 3 files changed, 60 insertions(+), 17 deletions(-)
include/net/cfg80211.h +21 -3
@@ -1425,6 +1425,26 @@ struct cfg80211_sched_scan_request { };/** +* struct cfg80211_roc_request - remain on channel request description +* +* @chandef: defines the channel to remain on +* @duration: duration in milliseconds that the driver intents to remain on the +* channel +* @ie: optional information element(s) to add into Probe Response or %NULL +* @ie_len: length of ie in octets +* @cookie: the request cookie to be filled by the driver +*/ +struct cfg80211_roc_request { +struct cfg80211_chan_def chandef; +unsigned int duration; +const u8 *ie; +size_t ie_len; + +/* keep last */ +u64 *cookie; +}; + +/** * enum cfg80211_signal_type - signal type * * @CFG80211_SIGNAL_TYPE_NONE: no signal strength information available
@@ -2313,9 +2333,7 @@ struct cfg80211_ops {int (*remain_on_channel)(struct wiphy *wiphy,struct wireless_dev *wdev, -struct ieee80211_channel *chan, -unsigned int duration, -u64 *cookie); +struct cfg80211_roc_request *request);int (*cancel_remain_on_channel)(struct wiphy *wiphy,struct wireless_dev *wdev,u64 cookie);
net/wireless/nl80211.c +34 -8
76 lines not on this page · raw message
net/wireless/rdev-ops.h +5 -6
@@ -600,14 +600,13 @@ static inline int rdev_flush_pmksa(struct cfg80211_registered_device *rdev,static inline int rdev_remain_on_channel (struct cfg80211_registered_device *rdev,struct wireless_dev *wdev, -struct ieee80211_channel *chan, -unsigned int duration,u64 *cookie) +struct cfg80211_roc_request *request) {int ret; -trace_rdev_remain_on_channel (&rdev->wiphy, wdev, chan, duration); - ret = rdev->ops->remain_on_channel (&rdev->wiphy, wdev, chan, - duration, cookie); -trace_rdev_return_int_cookie (&rdev->wiphy, ret, *cookie); +trace_rdev_remain_on_channel (&rdev->wiphy, wdev, request->chandef.chan, + request->duration); + ret = rdev->ops->remain_on_channel (&rdev->wiphy, wdev, request); +trace_rdev_return_int_cookie (&rdev->wiphy, ret, *request->cookie);return ret; }
Signature · 1 line
1.7.9.5
Johannes Berg
maintainerQuoted 8 lines · Sreenath Sharma
The probe response ie should be set in driver before the listen state for a listen only P2P device. Right now probe response ie is set using driver specific private command implementations. This commit enhances the
remain_on_channelcommand handler to pass probe response ie along with rest of the arguments.Another approach is the addition of a new nl80211 command specific to pass ies to driver. This will give more flexibilty to upper layer.
Umm, no, nack. this is totally bogus. You're implementing something like "P2P-listen offload" but hiding it inside the "remain-on-channel" command. That's totally the wrong way to go about it.
NACK. Not going to accept this.
johannes