[PATCH v2 13/17] driver_nl80211: send bssid info as parameter to nl80211_get_link_signal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add bssid as parameter to nl80211_get_link_signal() instead of using
bssid from driver structure. This is useful for calling the API per-MLO
link.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@xxxxxxxxxxx>
---
 src/drivers/driver_nl80211.c       | 5 +++--
 src/drivers/driver_nl80211.h       | 2 +-
 src/drivers/driver_nl80211_event.c | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 31aad927a..9a23ff823 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -1698,6 +1698,7 @@ static int get_link_signal(struct nl_msg *msg, void *arg)
 
 
 int nl80211_get_link_signal(struct wpa_driver_nl80211_data *drv,
+			    u8 *bssid,
 			    struct wpa_signal_info *sig)
 {
 	struct nl_msg *msg;
@@ -1706,7 +1707,7 @@ int nl80211_get_link_signal(struct wpa_driver_nl80211_data *drv,
 	sig->current_txrate = 0;
 
 	if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_GET_STATION)) ||
-	    nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, drv->bssid)) {
+	    nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid)) {
 		nlmsg_free(msg);
 		return -ENOBUFS;
 	}
@@ -8757,7 +8758,7 @@ static int nl80211_signal_poll(void *priv, struct wpa_signal_info *si)
 	int res;
 
 	os_memset(si, 0, sizeof(*si));
-	res = nl80211_get_link_signal(drv, si);
+	res = nl80211_get_link_signal(drv, drv->bssid, si);
 	if (res) {
 		if (drv->nlmode != NL80211_IFTYPE_ADHOC &&
 		    drv->nlmode != NL80211_IFTYPE_MESH_POINT)
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
index c84b21974..1eef755e0 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -268,7 +268,7 @@ struct i802_bss * get_bss_ifindex(struct wpa_driver_nl80211_data *drv,
 int is_ap_interface(enum nl80211_iftype nlmode);
 int is_sta_interface(enum nl80211_iftype nlmode);
 int wpa_driver_nl80211_authenticate_retry(struct wpa_driver_nl80211_data *drv);
-int nl80211_get_link_signal(struct wpa_driver_nl80211_data *drv,
+int nl80211_get_link_signal(struct wpa_driver_nl80211_data *drv, u8 *bssid,
 			    struct wpa_signal_info *sig);
 int nl80211_get_link_noise(struct wpa_driver_nl80211_data *drv,
 			   struct wpa_signal_info *sig_change);
diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
index 6c321741c..00ef51413 100644
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
@@ -1604,7 +1604,7 @@ static void nl80211_cqm_event(struct wpa_driver_nl80211_data *drv,
 	 * nl80211_get_link_signal() and nl80211_get_link_noise() set default
 	 * values in case querying the driver fails.
 	 */
-	res = nl80211_get_link_signal(drv, &ed.signal_change);
+	res = nl80211_get_link_signal(drv, drv->bssid, &ed.signal_change);
 	if (res == 0) {
 		wpa_printf(MSG_DEBUG, "nl80211: Signal: %d dBm  txrate: %d",
 			   ed.signal_change.current_signal,
-- 
2.25.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux