Linux wireless drivers development
 help / color / mirror / Atom feed
From: James Prestwood <james.prestwood@linux.intel.com>
To: linux-wireless@vger.kernel.org
Subject: ROC event when CMD_FRAME duration expires
Date: Tue, 11 Jun 2019 13:51:12 -0700	[thread overview]
Message-ID: <b2df99eab3cd3c287187dcf91725530dfa000213.camel@linux.intel.com> (raw)

Hi,

I see that the event CMD_CANCEL_REMAIN_ON_CHANNEL is emitted when a
CMD_REMAIN_ON_CHANNEL duration expires, but this is not true for
CMD_FRAME when sending offchannel and providing a duration. I see
wpa_supplicant handles this with its own timeout, but couldn't the same
event be emitted for CMD_FRAME if the duration expires?

Looking in mac80211/offchannel.c: ieee80211_roc_notify_destroy:

if (!roc->mgmt_tx_cookie)
	cfg80211_remain_on_channel_expired(&roc->sdata->wdev,
					   roc->cookie, roc->chan,
					   GFP_KERNEL);

In the case of CMD_FRAME, mgmt_tx_cookie is set, so this event does not
get emitted. Could the same expire event be emitted when mgmt_tx_cookie
is set as well? This would eliminate the need for userspace to keep a
timeout tracking this.

If this is ok I can send a patch (Looks like all I would need to do is
remove the if, and include the correct cookie, roc->cookie or roc-
>mgmt_tx_cookie).

Thanks,
James


             reply	other threads:[~2019-06-11 20:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 20:51 James Prestwood [this message]
2019-06-12 19:11 ` ROC event when CMD_FRAME duration expires Johannes Berg
2019-06-12 19:18   ` James Prestwood
2019-06-12 19:31     ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2df99eab3cd3c287187dcf91725530dfa000213.camel@linux.intel.com \
    --to=james.prestwood@linux.intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox