From patchwork Sat Nov 19 12:39:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 126581 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 8210EB7222 for ; Sat, 19 Nov 2011 23:44:46 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 1BF7D9C18B; Sat, 19 Nov 2011 07:44: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 mYguPhCZocfI; Sat, 19 Nov 2011 07:44:42 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id BEF199C1FB; Sat, 19 Nov 2011 07:42:20 -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 E62809D1E0 for ; Sat, 19 Nov 2011 07:42:19 -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 Z1g2+YSkdSGH for ; Sat, 19 Nov 2011 07:42:15 -0500 (EST) Received: from sipsolutions.net (he.sipsolutions.net [78.46.109.217]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 7EF0E9C18B for ; Sat, 19 Nov 2011 07:41:24 -0500 (EST) Received: by sipsolutions.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.77) (envelope-from ) id 1RRkEV-0002d9-E6 for hostap@lists.shmoo.com; Sat, 19 Nov 2011 13:41:23 +0100 Message-Id: <20111119123953.592402279@sipsolutions.net> User-Agent: quilt/0.48-1 Date: Sat, 19 Nov 2011 13:39:24 +0100 From: Johannes Berg To: hostap@lists.shmoo.com Subject: [PATCH v3 14/15] driver_nl80211: listen to unexpected 4addr events References: <20111119123910.783418920@sipsolutions.net> Content-Disposition: inline; filename=0014-driver_nl80211-listen-to-unexpected-4addr-events.patch Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From: Johannes Berg Monitor-less AP mode had lost the ability to do 4addr WDS, this adds it back. Signed-hostap: Johannes Berg --- src/drivers/driver_nl80211.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index f0af181..e99aa7f 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -1958,8 +1958,8 @@ static void nl80211_client_probe_event(struct wpa_driver_nl80211_data *drv, } -static void nl80211_spurious_class3_frame(struct i802_bss *bss, - struct nlattr **tb) +static void nl80211_spurious_frame(struct i802_bss *bss, struct nlattr **tb, + int wds) { struct wpa_driver_nl80211_data *drv = bss->drv; union wpa_event_data event; @@ -1974,6 +1974,7 @@ static void nl80211_spurious_class3_frame(struct i802_bss *bss, os_memset(&event, 0, sizeof(event)); event.rx_from_unknown.bssid = bssid; event.rx_from_unknown.addr = nla_data(tb[NL80211_ATTR_MAC]); + event.rx_from_unknown.wds = wds; wpa_supplicant_event(drv->ctx, EVENT_RX_FROM_UNKNOWN, &event); } @@ -2162,7 +2163,10 @@ static int process_bss_event(struct nl_msg *msg, void *arg) tb[NL80211_ATTR_COOKIE]); break; case NL80211_CMD_UNEXPECTED_FRAME: - nl80211_spurious_class3_frame(bss, tb); + nl80211_spurious_frame(bss, tb, 0); + break; + case NL80211_CMD_UNEXPECTED_4ADDR_FRAME: + nl80211_spurious_frame(bss, tb, 1); break; default: wpa_printf(MSG_DEBUG, "nl80211: Ignored unknown event "