linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Copeland <me@bobcopeland.com>
To: Peter Oh <poh@codeaurora.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	Kalle Valo <kvalo@qca.qualcomm.com>,
	linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH 3/3] ath10k: implement mesh support
Date: Wed, 16 Sep 2015 08:32:44 -0400	[thread overview]
Message-ID: <20150916123244.GA2051@localhost> (raw)
In-Reply-To: <55F7C6FF.3050802@codeaurora.org>

On Tue, Sep 15, 2015 at 12:21:35AM -0700, Peter Oh wrote:
> Can we configure mesh point with hostapd or can we use mesh point without
> neither wpa_supplicant nor hostapd?
> Currently I'm trying to bring up mesh point, but whenever I run hostpad
> after creating mesh point (iw phy0 interface add mesh type mp), hostapd
> change the interface mode to managed.

Hostapd can't control the mesh interface, but wpa_supplicant can,
though I believe there's a little more work needed to support VHT for
mesh in wpa_supplicant.  If you want to run an unencrypted mesh, you can
start it with iw and the kernel will run the peering manager.

If you're asking about a mesh-enabled access point, you can run hostapd
separately from wpa_supplicant/iw, as in the below script.

(I've only tested that you can bring this up on ath10k, not actual
operation, though it should work as far as I know.  I've run similar
scripts on ath9k.)

#!/bin/bash -x
#
# Example of running a mesh-enabled access point with one radio.
#
killall hostapd > /dev/null
killall wpa_supplicant > /dev/null

pubip=`ip route get 8.8.8.8 | awk 'NR==1 {print $NF}'`
last8=`echo $pubip | awk -F . '{print $4}'`
meship=10.10.1.$last8
iface=wlan0
ap_iface=ap0
br_iface=br0
mesh_mac=42:00:00:00:00:`printf "%.2x" $last8`
channel=36
freq=5180

brctl delbr $br_iface
brctl addbr $br_iface

# add a new interface for ap operation
iw dev $ap_iface del
iw dev $iface interface add $ap_iface type managed
ip addr flush $ap_iface
ip link set $ap_iface down

# create hostapd conf for ath10k
cat <<__EOM > hostapd.conf
interface=$ap_iface
driver=nl80211
ssid=mesh-ap
hw_mode=a
channel=$channel
auth_algs=3
own_ip_addr=$meship
wpa=1
wpa_passphrase=my_password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
ht_capab=[HT40+]
ieee80211n=1
ieee80211ac=1
vht_oper_chwidth=1
vht_oper_centr_freq_seg0_idx=$((channel + 6))
bridge=$br_iface
__EOM

# configure main interface to run in mesh mode
ip addr flush $iface
ip link set $iface down
ip link set addr $mesh_mac dev $iface
iw dev $iface set type mp
ip link set $iface up

# start the mesh
# here you might instead run wpa_supplicant for an encrypted mesh
iw dev $iface set freq $freq 80 $((freq + 30))
iw dev $iface mesh join mesh-vht

sleep 5

# add mesh to bridge (hostapd adds AP interface to bridge)
brctl addif $br_iface $iface
ip addr add $meship/24 dev $br_iface
ip link set $br_iface up

# run hostapd
hostapd -dd hostapd.conf >hostapd.log 2>&1 &

-- 
Bob Copeland %% http://bobcopeland.com/

  reply	other threads:[~2015-09-16 12:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 10:57 [PATCH 0/3] mesh support for ath10k Bob Copeland
2015-08-27 10:57 ` [PATCH 1/3] ath10k: enable monitor when OTHER_BSS requested Bob Copeland
2015-08-27 10:57 ` [PATCH 2/3] ath10k: check for encryption before adding MIC_LEN Bob Copeland
2015-08-27 10:57 ` [PATCH 3/3] ath10k: implement mesh support Bob Copeland
2015-08-29 17:11   ` Jason Andryuk
2015-08-29 22:25     ` Bob Copeland
2015-08-30 17:43       ` Yeoh Chun-Yeow
2015-09-16 12:39         ` Bob Copeland
2015-09-17 17:48           ` Yeoh Chun-Yeow
2015-09-17 23:56             ` Peter Oh
2015-09-01  3:02       ` Jason Andryuk
2015-09-09  7:57   ` Kalle Valo
2015-09-09  9:10     ` Kalle Valo
2015-09-09 16:49       ` Bob Copeland
2015-09-10  5:46         ` Kalle Valo
2015-09-10  7:22         ` Johannes Berg
2015-09-15  7:21           ` Peter Oh
2015-09-16 12:32             ` Bob Copeland [this message]
2015-09-09 11:08     ` Bob Copeland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150916123244.GA2051@localhost \
    --to=me@bobcopeland.com \
    --cc=ath10k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=poh@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).