On 1/4/2019 7:11 AM, Chi-Hsien Lin wrote:
From: Chung-Hsien Hsu <[email protected]>

Add NL80211_ATTR_IFINDEX attribute to port authorized event to indicate
the operating interface of the device.

Signed-off-by: Chung-Hsien Hsu <[email protected]>
Signed-off-by: Chi-Hsien Lin <[email protected]>
---
  net/wireless/nl80211.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 5e49492d5911..594aeba2982a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -14727,7 +14727,8 @@ void nl80211_send_port_authorized(struct 
cfg80211_registered_device *rdev,
                return;
        }
- if (nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid))
+       if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex) ||
+           nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid))
                goto nla_put_failure;

Maybe also put NL80211_ATTR_WIPHY in the notification to be consistent with the other MLME notifications.

Regards,
Arend

Reply via email to