]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Register read_sta_data() handler for station only builds
authorJouni Malinen <j@w1.fi>
Wed, 5 Sep 2012 14:07:03 +0000 (17:07 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 5 Sep 2012 14:07:03 +0000 (17:07 +0300)
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.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/drivers/driver.h
src/drivers/driver_nl80211.c

index cdf52983351ffa3b3d5fe9e602a9f137ca34b5f7..a9ca633707534fa1faa6c629d7c4475fe9402187 100644 (file)
@@ -1638,7 +1638,7 @@ struct wpa_driver_ops {
        int (*set_generic_elem)(void *priv, const u8 *elem, size_t elem_len);
 
        /**
-        * read_sta_data - Fetch station data (AP only)
+        * read_sta_data - Fetch station data
         * @priv: Private driver interface data
         * @data: Buffer for returning station information
         * @addr: MAC address of the station
index 180e2f9ddd3ed68f6f53ee070a45037dbb7724dc..1117d061401b1c8aa9d9100475d6f6501f84c261 100644 (file)
@@ -7360,6 +7360,8 @@ static int i802_flush(void *priv)
        return -ENOBUFS;
 }
 
+#endif /* HOSTAPD || CONFIG_AP */
+
 
 static int get_sta_handler(struct nl_msg *msg, void *arg)
 {
@@ -7440,6 +7442,8 @@ static int i802_read_sta_data(void *priv, struct hostap_sta_driver_data *data,
 }
 
 
+#if defined(HOSTAPD) || defined(CONFIG_AP)
+
 static int i802_set_tx_queue_params(void *priv, int queue, int aifs,
                                    int cw_min, int cw_max, int burst_time)
 {
@@ -9160,7 +9164,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
 #if defined(HOSTAPD) || defined(CONFIG_AP)
        .get_seqnum = i802_get_seqnum,
        .flush = i802_flush,
-       .read_sta_data = i802_read_sta_data,
        .get_inact_sec = i802_get_inact_sec,
        .sta_clear_stats = i802_sta_clear_stats,
        .set_rts = i802_set_rts,
@@ -9170,6 +9173,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
        .sta_deauth = i802_sta_deauth,
        .sta_disassoc = i802_sta_disassoc,
 #endif /* HOSTAPD || CONFIG_AP */
+       .read_sta_data = i802_read_sta_data,
        .set_freq = i802_set_freq,
        .send_action = wpa_driver_nl80211_send_action,
        .send_action_cancel_wait = wpa_driver_nl80211_send_action_cancel_wait,