From patchwork Wed Jun 19 20:11:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 252649 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]) by ozlabs.org (Postfix) with ESMTP id D50792C007E for ; Thu, 20 Jun 2013 06:14:09 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id AAF619C193; Wed, 19 Jun 2013 16:14:04 -0400 (EDT) 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 PkrH1NA6dmug; Wed, 19 Jun 2013 16:14:04 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 1950F9C194; Wed, 19 Jun 2013 16:13:49 -0400 (EDT) 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 532BE9C18B for ; Wed, 19 Jun 2013 16:13:46 -0400 (EDT) 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 E2zkeqNr74Kg for ; Wed, 19 Jun 2013 16:13:42 -0400 (EDT) Received: from diserzione.investici.org (diserzione.investici.org [82.221.99.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "smtp.autistici.org", Issuer "Autistici/Inventati Certification Authority" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 6C35D9C176 for ; Wed, 19 Jun 2013 16:13:41 -0400 (EDT) Received: from [82.221.99.153] (diserzione [82.221.99.153]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id 80354180BE3; Wed, 19 Jun 2013 20:13:39 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 diserzione.investici.org 80354180BE3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1371672819; bh=uHMKh6n5LtlBqSIE64Wd8VBVrhL1IH1UIdmtdppxwJs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=Ove7QAjZMFltmS+YmzKtlYwQVrrSLSVdO2dJYMErHmUh+ifUaE6WeFKyRR9C+Rmd2 rPgYOszT1YgFZAXAE62t7k+50q8RsW+C93fXP4f0agNtFgSuSbvex5hYhPcNeydoeh FlOo94AfF9MICWr9xePygCIDUq5bHFTuZYxK/FvU= From: Antonio Quartulli To: hostap Subject: [PATCH 1/3] Support not specifying the frame frequency. Date: Wed, 19 Jun 2013 22:11:32 +0200 Message-Id: <1371672694-1194-2-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1371672694-1194-1-git-send-email-ordex@autistici.org> References: <1371672694-1194-1-git-send-email-ordex@autistici.org> 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index e1e27ea..34c975d 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -8791,10 +8791,12 @@ 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); NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, bss->ifindex); - 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))