diff options
author | Jouni Malinen <j@w1.fi> | 2012-09-05 17:07:03 +0300 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2012-09-09 12:39:46 -0700 |
commit | 1e6c57fee4a56b421cc20f6dc0785c9138b21337 (patch) | |
tree | d3264d1435916dcc019be0878849e087fb03d4b2 /wpa_supplicant | |
parent | 205f2142134d2f3475fe1f893575df8f809eede4 (diff) | |
download | external_wpa_supplicant_8-1e6c57fee4a56b421cc20f6dc0785c9138b21337.zip external_wpa_supplicant_8-1e6c57fee4a56b421cc20f6dc0785c9138b21337.tar.gz external_wpa_supplicant_8-1e6c57fee4a56b421cc20f6dc0785c9138b21337.tar.bz2 |
nl80211: Register read_sta_data() handler for station only builds
This driver_op can now be used in station mode, too, to fetch
information about the connection with the AP, so allow this to be used
even if wpa_supplicant is built without AP mode support.
Change-Id: Ibef1d27ed0e2df312e715a88d500500c661860d1
Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r-- | wpa_supplicant/ctrl_iface.c | 5 | ||||
-rw-r--r-- | wpa_supplicant/driver_i.h | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 059c586..dbf8a84 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -4331,6 +4331,7 @@ static int wpa_supplicant_signal_poll(struct wpa_supplicant *wpa_s, char *buf, return ret; } + static int wpa_supplicant_pktcnt_poll(struct wpa_supplicant *wpa_s, char *buf, size_t buflen) { @@ -4342,8 +4343,8 @@ static int wpa_supplicant_pktcnt_poll(struct wpa_supplicant *wpa_s, char *buf, return -1; ret = os_snprintf(buf, buflen, "TXGOOD=%lu\nTXBAD=%lu\nRXGOOD=%lu\n", - sta.tx_packets, sta.tx_retry_failed, sta.rx_packets); - if (ret < 0 || (unsigned int) ret > buflen) + sta.tx_packets, sta.tx_retry_failed, sta.rx_packets); + if (ret < 0 || (size_t) ret > buflen) return -1; return ret; } diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h index ee9f6b0..bc148ca 100644 --- a/wpa_supplicant/driver_i.h +++ b/wpa_supplicant/driver_i.h @@ -467,7 +467,8 @@ static inline int wpa_drv_pktcnt_poll(struct wpa_supplicant *wpa_s, struct hostap_sta_driver_data *sta) { if (wpa_s->driver->read_sta_data) - return wpa_s->driver->read_sta_data(wpa_s->drv_priv, sta, wpa_s->bssid); + return wpa_s->driver->read_sta_data(wpa_s->drv_priv, sta, + wpa_s->bssid); return -1; } |