From owner-freebsd-current@FreeBSD.ORG Wed Jun 9 15:09:57 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26778106568B for ; Wed, 9 Jun 2010 15:09:57 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id DECC28FC18 for ; Wed, 9 Jun 2010 15:09:56 +0000 (UTC) Received: by pvb32 with SMTP id 32so495179pvb.13 for ; Wed, 09 Jun 2010 08:09:56 -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 :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=wCStt9PI6vQUw1rr6wat8SNhfihi9nBnj9rsPrUCFWM=; b=Rnl5fmmaLN3928+TYQax7aX2dAzFOeAgqZPmQZQV7n0gXhnMMu3yuSvF8DBC2bzgHU LvizWp/flxuF6Z+CSJE9NeAjZW1yq8ES9vYvX3yS6qnMTSh+MeMiNwpu4zieAeH6m7nm IjWpKOeVNSm+FB259EDsFpXuqGJsrqDHpjNxw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=KM0AFOnDbdJR66/KgEgdd6bizhvBoizxUaSRom5d9b+IM8NHfaatNvDS8VP2i7+Arn yY0mTuov9GLPBjah9lmzhihp+PW+CWa/nK/BYfAjcU+0LnpHtnbvIeBDlXrI4SgETbD2 ypSKr9/9HwwzwZfYGOHQg1aQxdukAnepmk3GY= Received: by 10.115.100.15 with SMTP id c15mr14387335wam.11.1276096196151; Wed, 09 Jun 2010 08:09:56 -0700 (PDT) Received: from beastie.micom.mng.net ([202.179.21.129]) by mx.google.com with ESMTPS id r20sm65331931wam.17.2010.06.09.08.09.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 09 Jun 2010 08:09:52 -0700 (PDT) Message-ID: <4C0FAEA2.7010204@gmail.com> Date: Wed, 09 Jun 2010 23:09:22 +0800 From: Ganbold User-Agent: Thunderbird 2.0.0.23 (X11/20091011) MIME-Version: 1.0 To: PseudoCylon References: <16641.96608.qm@web51806.mail.re2.yahoo.com> <4B9FA3E0.4050702@micom.mng.net> <633929.41041.qm@web51802.mail.re2.yahoo.com> <4BA22B8D.9030700@micom.mng.net> <375331.74876.qm@web51804.mail.re2.yahoo.com> <4BA38B26.6050208@micom.mng.net> <989377.89740.qm@web51802.mail.re2.yahoo.com> <4BAE01AC.7000509@gmail.com> <623907.37074.qm@web51803.mail.re2.yahoo.com> <4BB3575D.4040506@gmail.com> <87836.79143.qm@web51804.mail.re2.yahoo.com> <4BBB372C.1060302@gmail.com> <665283.95271.qm@web51802.mail.re2.yahoo.com> <4BBDEC8F.9050803@gmail.com> <490521.32714.qm@web51804.mail.re2.yahoo.com> <4BD307DE.5080507@gmail.com> <332448.8676.qm@web51801.mail.re2.yahoo.com> <4BD3F2D4.8000007@gmail.com> <702632.81988.qm@web51803.mail.re2.yahoo.com> <4BDEE393.4080206@gmail.com> <660085.11669.qm@web51802.mail.re2.yahoo.com> <4BFD4806.8070001@gmail.com> <618770.37649.qm@web51807.mail.re2.yahoo.com> In-Reply-To: <618770.37649.qm@web51807.mail.re2.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Ganbold Tsagaankhuu , freebsd-current@freebsd.org Subject: Re: CALL for TEST [HOSTAP] run(4) ralink usb wireless X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2010 15:09:57 -0000 AK-san, PseudoCylon wrote: > ----- Original Message ---- > >> From: Ganbold >> To: PseudoCylon >> Cc: freebsd-current@freebsd.org; Ganbold Tsagaankhuu >> Sent: Wed, May 26, 2010 10:10:46 AM >> Subject: Re: CALL for TEST [HOSTAP] run(4) ralink usb wireless >> >> It looks like either bridge or wlan/run driver is not >> forwarding/allowing incoming arp request for wireless client behind this >> access point. >> Wireless client is not getting any arp request and after sending several >> arp request to wireless client ADSL modem stops responding (had to >> restart modem). >> Any idea? >> >> thanks, >> >> Ganbold >> > > > Hello again Ganbold, > > This time I can reproduce the problem on my computer. Please try attached patch. (patch to if_run.c) I suppose arp is for during dhcp negotiation. So, client does associate but cannot get IP address. > > The device won't talk with other devices until 2-way handshake has happens. I thought it happens after 4-way handshake, but hostapd with -d option shows it happens several minutes later. I added code to set some registers ahead of it. So, no need to wait renegotiation happens. > > > -- patch begin -- > > diff --git a/dev/usb/wlan/if_run.c b/dev/usb/wlan/if_run.c > index 61784d9..9beb582 100644 > --- a/dev/usb/wlan/if_run.c > +++ b/dev/usb/wlan/if_run.c > @@ -2053,6 +2053,17 @@ run_key_set_cb(void *arg) > attr = (attr & ~0xf) | (mode << 1) | RT2860_RX_PKEY_EN; > if(run_write(sc, RT2860_WCID_ATTR(wcid), attr)) > return; > + > +if(vap->iv_opmode == IEEE80211_M_HOSTAP){ > +if(run_read(sc, RT2860_SKEY_MODE_0_7, &attr)) > +return; > +attr &= ~(0xf << (1 * 4)); > +attr &= ~(0xf << (2 * 4)); > +attr |= mode << (1 * 4); > +attr |= mode << (2 * 4); > +if(run_write(sc, RT2860_SKEY_MODE_0_7, attr)) > +return; > +} > } > > /* TODO create a pass-thru key entry? */ > > -- patch end -- > > > > Any update on driver side? Please let me know. thanks, Ganbold -- Gray's Law of Programming: 'n+1' trivial tasks are expected to be accomplished in the same time as 'n' tasks. Logg's Rebuttal to Gray's Law: 'n+1' trivial tasks take twice as long as 'n' trivial tasks.