Re: rt2x00/rt2500 support



On Fri, 2006-07-14 at 07:12 +1200, Eion Robb wrote:
> I've attached both the output of /proc/net/wireless (pretty much blank)  

Ok; this is because d80211 (at least as included in rt2x00 driver) isn't
setting the wireless stats handler, which I believe makes the device
show up in /proc/net/wireless.

See airo, for example:

static const struct iw_handler_def	airo_handler_def =
{
	.num_standard	= sizeof(airo_handler)/sizeof(iw_handler),
	.num_private	= sizeof(airo_private_handler)/sizeof(iw_handler),
	.num_private_args = sizeof(airo_private_args)/sizeof(struct iw_priv_args),
	.standard	= airo_handler,
	.private	= airo_private_handler,
	.private_args	= airo_private_args,
	.get_wireless_stats = airo_get_wireless_stats,
};

The ieee80211/ieee80211_ioctl.c file in the rt2x00 driver doesn't set
the ".get_wireless_stats" handler:

const struct iw_handler_def ieee80211_iw_handler_def =
{
	.num_standard	= sizeof(ieee80211_handler) / sizeof(iw_handler),
	.num_private	= sizeof(ieee80211_private_handler) /
			  sizeof(iw_handler),
	.num_private_args = sizeof(ieee80211_ioctl_priv) /
			    sizeof(struct iw_priv_args),
	.standard	= (iw_handler *) ieee80211_handler,
	.private	= (iw_handler *) ieee80211_private_handler,
	.private_args	= (struct iw_priv_args *) ieee80211_ioctl_priv,
};

Jiri, what's involved here?  The actual handler for get_wireless_stats
is quite simple; see below.  It returns a 'struct iw_statistics' for
which it looks like all the information is available in d80211
elsewhere.

static struct iw_statistics *airo_get_wireless_stats(struct net_device *dev)
{
	struct airo_info *local =  dev->priv;

	...
	airo_read_wireless_stats(local);
	...

	return &local->wstats;
}

Dan

> and another attempt at  the "tree /sys" output.
> 
> --Eion
> 
> >
> > AFAIK, HAL looks at /proc/net/wireless, parses the interface names, and
> > uses that to determine whether or not the device is a wireless device.
> > Since it appears that /proc/net/wireless is eventually going away, HAL
> > may need to get changed to recognize the /sys/class/ieee80211 directory
> > that dscape presents, or something like that.
> >
> > What does your /proc/net/wireless say when the card is plugged in and
> > the driver is loaded?
> >
> > Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]