} while (len >= sizeof(struct ieee80211req_sta_info));
}
- *buf = (rate == 0 || rate_count == 0) ? 0 : (rate / rate_count);
+ *buf = (rate == 0 || rate_count == 0) ? 0 : (rate / rate_count) * 1000;
return 0;
}
if(wext_ioctl(ifname, SIOCGIWRATE, &wrq) >= 0)
{
- *buf = (wrq.u.bitrate.value / 1000000);
+ *buf = (wrq.u.bitrate.value / 1000);
return 0;
}
}
-static inline int wext_fill_entry(struct stream_descr *stream, struct iw_event *event,
+static inline void wext_fill_entry(struct stream_descr *stream, struct iw_event *event,
struct iw_range *iw_range, int has_range, struct iwinfo_scanlist_entry *e)
{
int i;
break;
}
-
- return 0;
}
{
struct iwreq wrq;
struct iw_scan_req scanopt; /* Options for 'set' */
- //int scanflags = 0; /* Flags for scan */
unsigned char *buffer = NULL; /* Results */
int buflen = IW_SCAN_MAX_DATA; /* Min for compat WE<17 */
struct iw_range range;
int entrylen = 0;
struct iwinfo_scanlist_entry e;
- //IWINFO_BUFSIZE
wrq.u.data.pointer = (caddr_t) ⦥
wrq.u.data.length = sizeof(struct iw_range);
wrq.u.data.flags = 0;
int rate = 0;
if( !(ret = wl_ioctl(ifname, WLC_GET_RATE, &rate, sizeof(rate))) && (rate > 0))
- *buf = rate / 2;
+ *buf = ((rate / 2) * 1000) + ((rate & 1) ? 500 : 0);
return ret;
}