Changeset 14105
- Timestamp:
- 03/14/10 14:44:33 (3 years ago)
- File:
-
- 1 edited
-
src/router/libutils/wl.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/router/libutils/wl.c
r14075 r14105 621 621 622 622 #endif 623 /* 624 * struct iw_statistics *wlcompat_get_wireless_stats(struct net_device *dev) 625 * { wl_bss_info_t *bss_info = (wl_bss_info_t *) buf; get_pktcnt_t pkt; 626 * unsigned int rssi, noise, ap; 627 * 628 * memset(&wstats, 0, sizeof(wstats)); memset(&pkt, 0, sizeof(pkt)); 629 * memset(buf, 0, sizeof(buf)); bss_info->version = 0x2000; wl_ioctl(dev, 630 * WLC_GET_BSS_INFO, bss_info, WLC_IOCTL_MAXLEN); wl_ioctl(dev, 631 * WLC_GET_PKTCNTS, &pkt, sizeof(pkt)); 632 * 633 * rssi = 0; if ((wl_ioctl(dev, WLC_GET_AP, &ap, sizeof(ap)) < 0) || ap) { if 634 * (wl_ioctl(dev, WLC_GET_PHY_NOISE, &noise, sizeof(noise)) < 0) noise = 0; } 635 * else { // somehow the structure doesn't fit here rssi = buf[82]; noise = 636 * buf[84]; } rssi = (rssi == 0 ? 1 : rssi); wstats.qual.updated = 0x10; if 637 * (rssi <= 1) wstats.qual.updated |= 0x20; if (noise <= 1) 638 * wstats.qual.updated |= 0x40; 639 * 640 * if ((wstats.qual.updated & 0x60) == 0x60) return NULL; 641 * 642 * wstats.qual.level = rssi; wstats.qual.noise = noise; wstats.discard.misc = 643 * pkt.rx_bad_pkt; wstats.discard.retries = pkt.tx_bad_pkt; 644 * 645 * return &wstats; } 646 */ 623 647 624 #else 648 625 #include <sys/types.h>
Note: See TracChangeset
for help on using the changeset viewer.
