summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_ioctl.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-09-15 22:28:07 +0000
committersam <sam@FreeBSD.org>2003-09-15 22:28:07 +0000
commitc9c933e78b7f78237d8012aa7fd7e0f113823c5a (patch)
tree0e47a901ca00cc77a28a919bce48d95fbd978a11 /sys/net80211/ieee80211_ioctl.c
parent9ba7155cfe8dabb2beb540ffb24b3d14e17f357d (diff)
downloadFreeBSD-src-c9c933e78b7f78237d8012aa7fd7e0f113823c5a.zip
FreeBSD-src-c9c933e78b7f78237d8012aa7fd7e0f113823c5a.tar.gz
Generalize the per-node RSSI data so drivers can do more interesting
things than record a single value. o add a per-node method for returning the "current RSSI" for a node o create a default method that returns ni_rssi which is the rssi for the last received frame o use the per-node "get rssi" method to return data for the RID's submitted by wicontrol, et. al. Loosely based on work by Tom Marshall <tommy@home.tig-grr.com> for MADWIFI.
Diffstat (limited to 'sys/net80211/ieee80211_ioctl.c')
-rw-r--r--sys/net80211/ieee80211_ioctl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index 4ae0401..46b0a23 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -140,7 +140,8 @@ ieee80211_cfgget(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
case WI_RID_COMMS_QUALITY:
wreq.wi_val[0] = 0; /* quality */
- wreq.wi_val[1] = htole16(ic->ic_bss->ni_rssi); /* signal */
+ wreq.wi_val[1] =
+ htole16((*ic->ic_node_getrssi)(ic, ic->ic_bss));
wreq.wi_val[2] = 0; /* noise */
wreq.wi_len = 3;
break;
@@ -278,7 +279,7 @@ ieee80211_cfgget(struct ifnet *ifp, u_long cmd, caddr_t data)
ni->ni_esslen);
}
ap->channel = ieee80211_chan2ieee(ic, ni->ni_chan);
- ap->signal = ni->ni_rssi;
+ ap->signal = (*ic->ic_node_getrssi)(ic, ni);
ap->capinfo = ni->ni_capinfo;
ap->interval = ni->ni_intval;
rs = &ni->ni_rates;
@@ -313,7 +314,7 @@ ieee80211_cfgget(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
res->wi_chan = ieee80211_chan2ieee(ic, ni->ni_chan);
res->wi_noise = 0;
- res->wi_signal = ni->ni_rssi;
+ res->wi_signal = (*ic->ic_node_getrssi)(ic, ni);
IEEE80211_ADDR_COPY(res->wi_bssid, ni->ni_bssid);
res->wi_interval = ni->ni_intval;
res->wi_capinfo = ni->ni_capinfo;
@@ -339,7 +340,7 @@ ieee80211_cfgget(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
IEEE80211_ADDR_COPY(wsc.macsrc, ni->ni_macaddr);
memset(&wsc.ipsrc, 0, sizeof(wsc.ipsrc));
- wsc.signal = ni->ni_rssi;
+ wsc.signal = (*ic->ic_node_getrssi)(ic, ni);
wsc.noise = 0;
wsc.quality = 0;
memcpy((caddr_t)wreq.wi_val + sizeof(wsc) * i,
OpenPOWER on IntegriCloud