From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96C8DC31E44 for ; Tue, 11 Jun 2019 20:51:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 783A120684 for ; Tue, 11 Jun 2019 20:51:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406921AbfFKUvs (ORCPT ); Tue, 11 Jun 2019 16:51:48 -0400 Received: from mga09.intel.com ([134.134.136.24]:34331 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406629AbfFKUvq (ORCPT ); Tue, 11 Jun 2019 16:51:46 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jun 2019 13:51:46 -0700 X-ExtLoop1: 1 Received: from jprestwo-test.jf.intel.com ([10.54.74.49]) by orsmga008.jf.intel.com with ESMTP; 11 Jun 2019 13:51:45 -0700 Message-ID: Subject: ROC event when CMD_FRAME duration expires From: James Prestwood To: linux-wireless@vger.kernel.org Date: Tue, 11 Jun 2019 13:51:12 -0700 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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