Re: CALL for TEST [HOSTAP] run(4) ralink usb wireless

From: Ganbold Tsagaankhuu <ganbold_at_gmail.com>
Date: Thu, 27 May 2010 18:02:12 +0800
AK-san,

On Thu, May 27, 2010 at 5:57 PM, PseudoCylon <moonlightakkiy_at_yahoo.ca>wrote:

> ----- Original Message ----
> > From: Ganbold <ganbold_at_gmail.com>
> > To: PseudoCylon <moonlightakkiy_at_yahoo.ca>
> > Cc: freebsd-current_at_freebsd.org; Ganbold Tsagaankhuu <ganbold_at_mobicom.mn
> >
> > 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.
>


I didn't try DHCP on client, just used static IP. Anyhow I will try your
patch later tonight and let you know.

thanks a lot,

Ganbold



>
>
> -- 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
> _at__at_ -2053,6 +2053,17 _at__at_ 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 --
>
>
>
Received on Thu May 27 2010 - 08:02:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:03 UTC