From owner-freebsd-mobile@FreeBSD.ORG Thu Sep 25 18:59:38 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 131071065690 for ; Thu, 25 Sep 2008 18:59:38 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by mx1.freebsd.org (Postfix) with ESMTP id D87AD8FC1E for ; Thu, 25 Sep 2008 18:59:37 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so491565rvf.43 for ; Thu, 25 Sep 2008 11:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=KgaXvdKmrgrzO0E4RnYvLlbwPK8ksPnmOK2KzKskMS8=; b=Q+yTvqWIDVqlyEVFF3yr0x79lX7om25Vb90ftdwKHk0HN1AUC6cqfgWrQB0AqcxmUh 490+6NqCGDCFgINzBQLujBmy5MWEia3LrewmEoLrPcLoDD7qpRB0cvsQwgzFHM4EYMXn BabZY5yTzUAAk4i+Ycat1hUpgZRJGsaiAOCm4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=vIk1SuiGoJ76+bGG3WBdvMDGqzT2Zz94xG3lh1UI7mRDigU+nmY3KoXMOI9gZv/fOU dywF82RXCAP9K7qo/+avXfgfF8RUXa3P8fNYlKZXCUL+eLU1W40zpybZlfJTBZTpijEL GtGeHx0OrLbUm8QolO3RBep/s+KiITcZ13U4M= Received: by 10.141.52.5 with SMTP id e5mr71320rvk.125.1222369177455; Thu, 25 Sep 2008 11:59:37 -0700 (PDT) Received: by 10.141.189.15 with HTTP; Thu, 25 Sep 2008 11:59:37 -0700 (PDT) Message-ID: <3a142e750809251159p3f5f3bam11243b3f144859c2@mail.gmail.com> Date: Thu, 25 Sep 2008 20:59:37 +0200 From: "Paul B. Mahol" To: "John Hay" In-Reply-To: <20080925161338.GA69284@zibbi.meraka.csir.co.za> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080922132500.GA25677@zibbi.meraka.csir.co.za> <3a142e750809250741j7b9003e4q539618d1c9407def@mail.gmail.com> <20080925161338.GA69284@zibbi.meraka.csir.co.za> Cc: freebsd-mobile@freebsd.org Subject: Re: setting bssid in adhoc mode X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2008 18:59:38 -0000 On 9/25/08, John Hay wrote: > On Thu, Sep 25, 2008 at 04:41:30PM +0200, Paul B. Mahol wrote: >> On 9/22/08, John Hay wrote: >> > Hi >> > >> > I'm trying out the new ath/wlan stuff in current. Should one still be >> > able to set the bssid in adhoc mode? We normally lock the bssid in >> > an adhoc network because of problems that the network split and does >> > not merge, if you do not do it. >> > >> > What I have done is this: >> > >> > # ifconfig wlan0 create wlandev ath0 wlanmode adhoc >> > # ifconfig wlan0 ssid ptamesh up >> > >> > Up to here works well. It will scan and if it finds another node with >> > the >> > same ssid, it will "lock" on that channel and use the correct bssid. >> > >> > If it does not find another node with the same ssid, it will start it >> > own thing on channel 10. But it looks like one cannot set the bssid. >> > >> > # ifconfig wlan0 bssid 02:07:ca:fe:ba:be >> > ifconfig: 02:07:ca:fe:ba:be: bad value >> >> I had similar experience with STA mode, instead I use ap (ap is alias >> for bssid, at least it works in STA mode) >> I never bothered is this bug in manual page, ifconfig or in something else >> ... > > Ah, thanks yes, "ifconfig wlan0 ap 02:07:ca:fe:ba:be" works just fine. > Just do not try to unset it with "ifconfig wlan0 ap -". That is an > alias for "panic now" :-) Well, on my system it doesnt panic here. So more info to debug "your" panic is required ... > > So it looks like ifconfig is getting confused with the many different > uses of the keyword bssid. > > I must say I still do not understand what the other use for bssid is. > Close to the end of ifconfig/ifieee80211.c there are these: > > DEF_CMD_ARG("bssid", set80211bssid), > DEF_CMD_ARG("ap", set80211bssid), > ... > DEF_CLONE_CMD("bssid", 1, set80211clone_bssid), > DEF_CLONE_CMD("-bssid", 0, set80211clone_bssid), > > So my guess is that I was hitting the clone version when in fact I > needed the other version. Luckily ap does not have a clone version. > So when should the clone version be used? And how does ifconfig > decide which one to use?