Skip to contentSkip to conversation

ROC event when CMD_FRAME duration expires

DISCUSSION James Prestwood 2 participants 4 messages Jun 11, 2019 – Jun 12, 2019

lore
Share & tools
lore
#0 lore 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-

Quoted 1 line

mgmt_tx_cookie).

Thanks,
James

#1 lore raw
Quoted 7 lines · James Prestwood

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?

I guess? I guess this is for a case where you actually have a wait after the TX, for waiting for a response?

johannes

#2 lore raw
Quoted 10 lines · Johannes Berg
Quoted 8 lines · James Prestwood

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?

Quoted 3 lines

I guess? I guess this is for a case where you actually have a wait after
the TX, for waiting for a response?

Yes exactly. For example a GAS/ANQP request before association to some offchannel AP (that's at least our use case).

Thanks,
James

Quoted 3 lines

johannes

#3 lore raw
Quoted 11 lines · James Prestwood
Quoted 10 lines · Johannes Berg
Quoted 8 lines · James Prestwood

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?

Quoted 6 lines
Quoted 3 lines

I guess? I guess this is for a case where you actually have a wait after
the TX, for waiting for a response?

Yes exactly. For example a GAS/ANQP request before association to some offchannel AP (that's at least our use case).

Makes sense, I guess. Send a patch? Seems easy enough.

johannes