hostcan problem

William Tai williamt
Fri Aug 22 18:28:11 PDT 2003


----- Original Message ----- 
From: "Jouni Malinen" <jkmaline at cc.hut.fi>
To: <hostap at shmoo.com>
Sent: Friday, August 22, 2003 5:55 PM
Subject: Re: hostcan problem


> On Fri, Aug 22, 2003 at 05:40:15PM -0700, William Tai wrote:
> 
> > I try to scan all neighboring APs.
> > However the number of APs I scanned is less than the number scanned by
> > another clients.
> 
> Please include more information.. 
Which Host AP version did you use?

Sorry I do not know.

> What commands did you use to request a scan and how did you read the
> results?

request a scan
int hostap_read_ap_info(struct device *dev)
{
 struct hfa384x_hostscan_request scan_req;
 u16 rate;
 int ret = 0;
 INT oldLevel;
 local_info_t *local = (local_info_t *) dev->priv;

 memset(&scan_req, 0, sizeof(scan_req));
 scan_req.channel_list = __constant_cpu_to_le16(0x000f/*0x3fff*/);
 rate = 2;//HFA384X_RATES_1MBPS;

 scan_req.txrate = cpu_to_le16(rate);
 /* leave SSID empty to accept all SSIDs */
oldLevel = NU_Control_Interrupts(NU_DISABLE_INTERRUPTS);
 if (local->iw_mode == IW_MODE_MASTER) {
  if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE,
        HFA384X_PORTTYPE_BSS) ||
      local->func->reset_port(dev))
   printf("Leaving Host AP mode for HostScan failed\n\r");
 }
 if (local->func->set_rid(dev, HFA384X_RID_HOSTSCAN, &scan_req,
     sizeof(scan_req))) {
  printf("HOSTSCAN failed\n\r");
  ret = -EINVAL;
 }
NU_Control_Interrupts(oldLevel);
 NU_Sleep(400);
oldLevel = NU_Control_Interrupts(NU_DISABLE_INTERRUPTS);
 if (local->iw_mode == IW_MODE_MASTER) {
  if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE,
        HFA384X_PORTTYPE_HOSTAP) ||
      local->func->reset_port(dev))
   printf("Returning to Host AP mode after HostScan failed\n\r");
 }
NU_Control_Interrupts(oldLevel);

 return ret;
}

read the result
#ifndef PRISM2_NO_DEBUG
 case HFA384X_INFO_HOSTSCANRESULTS:
  prism2_info_hostscanresults(local, buf, left);
  break;
#endif /* PRISM2_NO_DEBUG */


>Are you using Master (Host AP) or Managed (station) mode? What
> is your station firmware version?
>

HOSTAP mode


Thanx 
> -- 
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
> 




More information about the Hostap mailing list