From patchwork Mon Jul 6 21:49:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Copeland X-Patchwork-Id: 6728151 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D085CC05AC for ; Mon, 6 Jul 2015 21:49:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF053205E8 for ; Mon, 6 Jul 2015 21:49:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A92F205E7 for ; Mon, 6 Jul 2015 21:49:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZCEGq-0007es-Lf; Mon, 06 Jul 2015 21:49:48 +0000 Received: from mail-ie0-f180.google.com ([209.85.223.180]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZCEGn-0007am-NN for ath10k@lists.infradead.org; Mon, 06 Jul 2015 21:49:46 +0000 Received: by iecuq6 with SMTP id uq6so122456618iec.2 for ; Mon, 06 Jul 2015 14:49:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=kGgN49mExMRgc2SjLIFuuAUnHIHw6T9J5V4q3EKpvzg=; b=FymZ/CYLaL3gI/KjM3Z0oLkTcsNlcOhFaI1+ED4f+4smA0YmE1x4cTaKk2Hy55nUoB bqoE5K59UyxuAkCRuxXoalvaWX/+XgdaxA8u+Uhw9viqCikAnX7leW2f39dRJ76Dl30Y pzWhACXGubW3CICh/5mDANznR/2xzl27wWpKdvV5ZsoRSgjChMfNvkoFyeNdPSNklhbh C4nw1sSPQMstyUzaUGP2+Azu4VICW1XFCpJihQVvzFEG5l/2tPyJY08ZkrfSZ7D/KKRB sAh4Df20ZXQmaiYv1LVW/DHlpuRZDWogZEjwb6n9KSE6h0fAsjkuZi6WfO/iQtgvoHaq tmCQ== X-Gm-Message-State: ALoCoQn9m61lXKo/Hm+lA4zPmjDBGWf8gAmL/1AY7vRlIJcFCWsrzf7LFnDxlMfoehy9b813kr/E X-Received: by 10.43.89.72 with SMTP id bd8mr26498263icc.20.1436219363968; Mon, 06 Jul 2015 14:49:23 -0700 (PDT) Received: from hash ([2001:470:1d:6db:230:48ff:fe9d:9c89]) by mx.google.com with ESMTPSA id j3sm10498203igx.21.2015.07.06.14.49.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 14:49:23 -0700 (PDT) Received: from bob by hash with local (Exim 4.84) (envelope-from ) id 1ZCEGP-00051O-2r; Mon, 06 Jul 2015 17:49:21 -0400 Date: Mon, 6 Jul 2015 17:49:21 -0400 From: Bob Copeland To: Freddy Lee Subject: Re: attempting mesh on ath10k Message-ID: <20150706214921.GF23012@localhost> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150706_144945_807929_22414462 X-CRM114-Status: GOOD ( 21.78 ) X-Spam-Score: -2.6 (--) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ath10k@lists.infradead.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Jul 06, 2015 at 02:25:36PM -0700, Freddy Lee wrote: > Hi Bob, > > I applied the mesh fix to OpenWRT (r45590 and r62020). It works great > (thanks, Bob!), but with a potentially unforeseen consequence: When an > Archer C7 with these changes is configured to be a 5GHz AP, clients > are unable to connect normally. Experiments show that the client is > registered as a station, but pings don't complete (in many cases, not > even DHCP completes). Tested clients include one commercial phone > (Samsung Galaxy S5 running Lollipop) and another Archer C7. > > Without these changes, these same clients can connect to the AP all day long. Hmm, well, there were definitely some hacks in that version, like setting the SSID to "A" for all vif types :) Here's the latest patch-in-progress but I haven't tested it; it also requires the AID series I sent to l-w last week (and still requires the filters be disabled). Once I get an hour to run it through the paces and also fix the filter issue then I plan to send upstream. From 2b7ad687190dce02bd3082b6e7145a4e01f9fb11 Mon Sep 17 00:00:00 2001 From: Bob Copeland Date: Sun, 5 Jul 2015 08:03:28 -0400 Subject: [PATCH] ath10k: implement mesh support Add support for mesh to ath10k. We simply use an AP virtual interface in the firmware in order to enable beaconing without TSF adoption, and use the raw (802.11) transmit mode. Some basic tests with TCP iperf using 2 ath10k devices and a couple of ath9k devices: 2-node VHT mesh: 4-node linear multihop HT20 (ath9k -> ath10k -> ath9k -> ath10k): Signed-off-by: Bob Copeland --- drivers/net/wireless/ath/ath10k/mac.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 609ca86..2501c47 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3136,7 +3136,8 @@ ath10k_tx_h_get_txmode(struct ath10k *ar, struct ieee80211_vif *vif, const struct ieee80211_hdr *hdr = (void *)skb->data; __le16 fc = hdr->frame_control; - if (!vif || vif->type == NL80211_IFTYPE_MONITOR) + if (!vif || vif->type == NL80211_IFTYPE_MONITOR || + vif->type == NL80211_IFTYPE_MESH_POINT) return ATH10K_HW_TXRX_RAW; if (ieee80211_is_mgmt(fc)) @@ -4184,6 +4185,9 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, case NL80211_IFTYPE_ADHOC: arvif->vdev_type = WMI_VDEV_TYPE_IBSS; break; + case NL80211_IFTYPE_MESH_POINT: + arvif->vdev_type = WMI_VDEV_TYPE_AP; + break; case NL80211_IFTYPE_AP: arvif->vdev_type = WMI_VDEV_TYPE_AP; @@ -4550,6 +4554,13 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw, if (ret) ath10k_warn(ar, "failed to update beacon template: %d\n", ret); + + if (vif->type == NL80211_IFTYPE_MESH_POINT) { + /* mesh doesn't use SSID but firmware needs it */ + strlcpy(arvif->u.ap.ssid, "mesh", + sizeof(arvif->u.ap.ssid)); + arvif->u.ap.ssid_len = 4; + } } if (changed & BSS_CHANGED_AP_PROBE_RESP) { @@ -5285,6 +5296,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, } else if (old_state == IEEE80211_STA_AUTH && new_state == IEEE80211_STA_ASSOC && (vif->type == NL80211_IFTYPE_AP || + vif->type == NL80211_IFTYPE_MESH_POINT || vif->type == NL80211_IFTYPE_ADHOC)) { /* * New association. @@ -5320,6 +5332,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, } else if (old_state == IEEE80211_STA_ASSOC && new_state == IEEE80211_STA_AUTH && (vif->type == NL80211_IFTYPE_AP || + vif->type == NL80211_IFTYPE_MESH_POINT || vif->type == NL80211_IFTYPE_ADHOC)) { /* * Disassociation. @@ -6572,6 +6585,9 @@ static const struct ieee80211_iface_limit ath10k_if_limits[] = { { .max = 7, .types = BIT(NL80211_IFTYPE_AP) +#ifdef CONFIG_MAC80211_MESH + | BIT(NL80211_IFTYPE_MESH_POINT) +#endif }, }; @@ -6579,6 +6595,9 @@ static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = { { .max = 8, .types = BIT(NL80211_IFTYPE_AP) +#ifdef CONFIG_MAC80211_MESH + | BIT(NL80211_IFTYPE_MESH_POINT) +#endif }, }; @@ -6871,6 +6890,7 @@ int ath10k_mac_register(struct ath10k *ar) ar->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | + BIT(NL80211_IFTYPE_MESH_POINT) | BIT(NL80211_IFTYPE_AP); ar->hw->wiphy->available_antennas_rx = ar->supp_rx_chainmask;