From patchwork Wed Nov 13 16:37:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 290990 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id F20E22C007E for ; Thu, 14 Nov 2013 03:38:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 36B189C143; Wed, 13 Nov 2013 11:38:11 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jC7R+3mUW25T; Wed, 13 Nov 2013 11:38:10 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id AC7349C144; Wed, 13 Nov 2013 11:37:45 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id E437B9C0DF for ; Wed, 13 Nov 2013 11:37:43 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id awepl8lJ+HNb for ; Wed, 13 Nov 2013 11:37:38 -0500 (EST) Received: from s3.neomailbox.net (s3.neomailbox.net [178.209.62.157]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "neomailbox.net", Issuer "Alpha CA" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id D1BBA9C0E4 for ; Wed, 13 Nov 2013 11:37:38 -0500 (EST) From: Antonio Quartulli To: hostap Subject: [PATCHv2 1/3] Support not specifying the frame frequency. Date: Wed, 13 Nov 2013 17:37:11 +0100 Message-Id: <1384360633-568-2-git-send-email-antonio@meshcoding.com> In-Reply-To: <1384360633-568-1-git-send-email-antonio@meshcoding.com> References: <1384360633-568-1-git-send-email-antonio@meshcoding.com> Cc: Nicolas Cavallari X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From: Nicolas Cavallari If the frequency is not specified the frame is now sent over the channel used by the current BSS. This will also log each sent CMD_FRAME. Signed-hostap: Nicolas Cavallari [antonio@open-mesh.com: commit message reworded] Signed-hostap: Antonio Quartulli --- src/drivers/driver_nl80211.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 0115533..728eaa8 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -9179,12 +9179,13 @@ static int nl80211_send_frame_cmd(struct i802_bss *bss, wpa_printf(MSG_MSGDUMP, "nl80211: CMD_FRAME freq=%u wait=%u no_cck=%d " "no_ack=%d offchanok=%d", freq, wait, no_cck, no_ack, offchanok); + wpa_hexdump(MSG_DEBUG, "CMD_FRAME", buf, buf_len); nl80211_cmd(drv, msg, 0, NL80211_CMD_FRAME); if (nl80211_set_iface_id(msg, bss) < 0) goto nla_put_failure; - - NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq); + if (freq) + NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq); if (wait) NLA_PUT_U32(msg, NL80211_ATTR_DURATION, wait); if (offchanok && (drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX))