From owner-freebsd-current@FreeBSD.ORG Thu Jun 17 10:01:49 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 BD1091065677 for ; Thu, 17 Jun 2010 10:01:49 +0000 (UTC) (envelope-from moonlightakkiy@yahoo.ca) Received: from web51802.mail.re2.yahoo.com (web51802.mail.re2.yahoo.com [206.190.38.233]) by mx1.freebsd.org (Postfix) with SMTP id 653EB8FC2A for ; Thu, 17 Jun 2010 10:01:48 +0000 (UTC) Received: (qmail 68506 invoked by uid 60001); 17 Jun 2010 10:01:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1276768907; bh=hIG9za7LsxUW0/82iCFiMbr1HUeWpNDxa2NtApOqeQA=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=ymIEZFFSwjBGykHZEeciqq5i9RO5kzTZYhuVr3KZocTIgTswKDYTl8fSyKtZ6M94ysuh9ssJjaZ1EEeObDJ2jb6ZiR9zdRWGmQb9kkqUoeYKs04aBmbDQKlbylpc76guC7tZQVSpo+F+IFFZ4wWA1k1V97MvblZajTOTz16EDhs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=af7I4FCvrctLjS2v09qcKsfvgJieknHJhIiklxXQ1KxlrsaO76t/xLtdIAuyiUg9hK2YvWYaAG42rz0M9fNgVh2kCTtUog9U3pxyzAV1l2XMcJ4FBVDSOz60GzxTApUvqLNmhm91uWcnXsG8wgPiHEN1NX8OuPHZbvHE2cViB6E=; Message-ID: <726063.68104.qm@web51802.mail.re2.yahoo.com> X-YMail-OSG: RheYRHEVM1nKiX0_awLjFYIKWHjaBll8pedKvT7O9a10jpy ElP51pqy0ZR4FaWgSx2nY4ZVlRnbvRFDQ_Kz9dNCbPZfEpasEJuqAJarrgCN tpIYd5SXNzAS59wQzebx4Hn.Iqqle4LJQWXjwCQLbaDMkFAAEP7gXxsFPeAD gwQOM_5DIXyhpzd2P7Jy3wl0QgwY8eFavZWcdZ0nLQ6F331mspxDxZMdjPHh f8aeuHQDavZ31SHDg.98lNFhgSfg2yfDnpV9Yl6WxqemMA.lWVrL0ducWXQJ peGveK60HijlBMQ1YnDSvdN8_KQezFAFv1ArfeAWMwaGZt47n_ALC5AVZvdU QyD4dAaJ9Hmi_I_La Received: from [173.183.132.20] by web51802.mail.re2.yahoo.com via HTTP; Thu, 17 Jun 2010 03:01:47 PDT X-Mailer: YahooMailRC/397.8 YahooMailWebService/0.8.104.274457 References: <16641.96608.qm@web51806.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> <4C0FAEA2.7010204@gmail.com> <94007.38072.qm@web51807.mail.re2.yahoo.com> <4C11188A.1040002@gmail.com> <447555.80295.qm@web51803.mail.re2.yahoo.com> <4C16499A.3050808@gmail.com> <337427.44900.qm@web51804.mail.re2.yahoo.com> <4C1787DA.2070308@gmail.com> <819523.41498.qm@web51805.mail.re2.yahoo.com> <4C18C4AB.6040205@gmail.com> Date: Thu, 17 Jun 2010 03:01:47 -0700 (PDT) From: PseudoCylon To: Ganbold In-Reply-To: <4C18C4AB.6040205@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Thu, 17 Jun 2010 10:01:49 -0000 ----- Original Message ---- >> From: Ganbold >> To: PseudoCylon >> Cc: freebsd-current@freebsd.org; Ganbold Tsagaankhuu >> Sent: Wed, June 16, 2010 6:33:47 AM >> Subject: Re: CALL for TEST [HOSTAP] run(4) ralink usb wireless >> >> AK-san, > >PseudoCylon wrote: >>>> >>> > >Strange, looks like this time works as expected, but sometimes it >doesn't work. > >In some cases it doesn't work and you can find complete tcpdump output > from very beginning to the modem hang: > Hello, Are following true? When manually load/reload hostapd, works When loaded by rc.conf, doesn't work If so, please try attached patch. (patch to if_run.c only) Or, here is a patched file. http://gitorious.org/run/run/blobs/raw/cmdq_fix/dev/usb/wlan/if_run.c When auto-loading, the driver is brought up and down a few times. It might be the cause. So, when you test, please reboot rspro and let rc.conf handle init process rather than manually start driver/hostapd. And #arp -d -a on rspro, freebsd laptop. and macbook would help for testing. (If it works on mac) So, that clients have to send arp request. If macbook receives "who-has 192.168.1.50" arp request packets, it should work. If macbook supports # tcpdump -vv -xxx -i wlan0 'arp' and see if macbook gets this. 19:34:30.469720 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.50 tell 192.168.1.1, length 46 0x0000: ffff ffff ffff 0030 5462 3d24 0806 0001 0x0010: 0800 0604 0001 0030 5462 3d24 c0a8 0101 0x0020: 0000 0000 0000 c0a8 0132 0000 0000 0000 0x0030: 0000 0000 0000 0000 0000 0000 AK -- begin patch -- diff --git a/dev/usb/wlan/if_run.c b/dev/usb/wlan/if_run.c index e4fc8d2..f302246 100644 --- a/dev/usb/wlan/if_run.c +++ b/dev/usb/wlan/if_run.c @@ -17,7 +17,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/wlan/if_run.c,v 1.11 2010/06/14 23:01:50 jkim Exp $"); +__FBSDID("$FreeBSD$"); /*- * Ralink Technology RT2700U/RT2800U/RT3000U chipset driver. @@ -830,9 +830,6 @@ run_vap_create(struct ieee80211com *ic, if(sc->rvp_cnt++ == 0) ic->ic_opmode = opmode; -if(opmode == IEEE80211_M_HOSTAP) -sc->cmdq_run = RUN_CMDQ_GO; - DPRINTF("rvp_id=%d bmap=%x rvp_cnt=%d\n", rvp->rvp_id, sc->rvp_bmap, sc->rvp_cnt); @@ -894,7 +891,9 @@ run_cmdq_cb(void *arg, int pending) for(i = sc->cmdq_exec; sc->cmdq[i].func && pending; i = sc->cmdq_exec, pending--){ DPRINTFN(6, "cmdq_exec=%d pending=%d\n", i, pending); -if(sc->cmdq_run == RUN_CMDQ_GO){ +if(sc->cmdq_run == RUN_CMDQ_GO || + (sc->cmdq_key_set == RUN_CMDQ_GO && + sc->cmdq[i].func == run_key_set_cb)){ /* * If arg0 is NULL, callback func needs more * than one arg. So, pass ptr to cmdq struct. @@ -4798,7 +4797,7 @@ run_stop(void *arg) ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); sc->ratectl_run = RUN_RATECTL_OFF; -sc->cmdq_run = sc->cmdq_key_set; +sc->cmdq_run = RUN_CMDQ_ABORT; RUN_UNLOCK(sc); -- end patch --