summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/0005-netlink-portid/mac80211_hwsim.patch
blob: 407de9bd5ab51306f7aa31eea893dece339de15b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2064,10 +2064,10 @@ static int hwsim_register_received_nl(st
 	if (info == NULL)
 		goto out;
 
-	wmediumd_portid = info->snd_portid;
+	wmediumd_portid = genl_info_snd_portid(info);
 
 	printk(KERN_DEBUG "mac80211_hwsim: received a REGISTER, "
-	       "switching to wmediumd mode with pid %d\n", info->snd_portid);
+	       "switching to wmediumd mode with pid %d\n", genl_info_snd_portid(info));
 
 	return 0;
 out:
@@ -2104,7 +2104,7 @@ static int mac80211_hwsim_netlink_notify
 	if (state != NETLINK_URELEASE)
 		return NOTIFY_DONE;
 
-	if (notify->portid == wmediumd_portid) {
+	if (netlink_notify_portid(notify) == wmediumd_portid) {
 		printk(KERN_INFO "mac80211_hwsim: wmediumd released netlink"
 		       " socket, switching to perfect channel medium\n");
 		wmediumd_portid = 0;