aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/mlme.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-09-07 16:12:54 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-10 15:30:41 -0400
commit15e473046cb6e5d18a4d0057e61d76315230382b (patch)
tree893d2df5d46a6ce156933ac57a1398f0ad22b889 /net/wireless/mlme.c
parent9f00d9776bc5beb92e8bfc884a7e96ddc5589e2e (diff)
netlink: Rename pid to portid to avoid confusion
It is a frequent mistake to confuse the netlink port identifier with a process identifier. Try to reduce this confusion by renaming fields that hold port identifiers portid instead of pid. I have carefully avoided changing the structures exported to userspace to avoid changing the userspace API. I have successfully built an allyesconfig kernel with this change. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r--net/wireless/mlme.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 8fd0242ee169..ec7fcee5bad6 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -615,7 +615,7 @@ EXPORT_SYMBOL(cfg80211_del_sta);
615struct cfg80211_mgmt_registration { 615struct cfg80211_mgmt_registration {
616 struct list_head list; 616 struct list_head list;
617 617
618 u32 nlpid; 618 u32 nlportid;
619 619
620 int match_len; 620 int match_len;
621 621
@@ -624,7 +624,7 @@ struct cfg80211_mgmt_registration {
624 u8 match[]; 624 u8 match[];
625}; 625};
626 626
627int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_pid, 627int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid,
628 u16 frame_type, const u8 *match_data, 628 u16 frame_type, const u8 *match_data,
629 int match_len) 629 int match_len)
630{ 630{
@@ -672,7 +672,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_pid,
672 672
673 memcpy(nreg->match, match_data, match_len); 673 memcpy(nreg->match, match_data, match_len);
674 nreg->match_len = match_len; 674 nreg->match_len = match_len;
675 nreg->nlpid = snd_pid; 675 nreg->nlportid = snd_portid;
676 nreg->frame_type = cpu_to_le16(frame_type); 676 nreg->frame_type = cpu_to_le16(frame_type);
677 list_add(&nreg->list, &wdev->mgmt_registrations); 677 list_add(&nreg->list, &wdev->mgmt_registrations);
678 678
@@ -685,7 +685,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_pid,
685 return err; 685 return err;
686} 686}
687 687
688void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid) 688void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlportid)
689{ 689{
690 struct wiphy *wiphy = wdev->wiphy; 690 struct wiphy *wiphy = wdev->wiphy;
691 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 691 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
@@ -694,7 +694,7 @@ void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid)
694 spin_lock_bh(&wdev->mgmt_registrations_lock); 694 spin_lock_bh(&wdev->mgmt_registrations_lock);
695 695
696 list_for_each_entry_safe(reg, tmp, &wdev->mgmt_registrations, list) { 696 list_for_each_entry_safe(reg, tmp, &wdev->mgmt_registrations, list) {
697 if (reg->nlpid != nlpid) 697 if (reg->nlportid != nlportid)
698 continue; 698 continue;
699 699
700 if (rdev->ops->mgmt_frame_register) { 700 if (rdev->ops->mgmt_frame_register) {
@@ -710,8 +710,8 @@ void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid)
710 710
711 spin_unlock_bh(&wdev->mgmt_registrations_lock); 711 spin_unlock_bh(&wdev->mgmt_registrations_lock);
712 712
713 if (nlpid == wdev->ap_unexpected_nlpid) 713 if (nlportid == wdev->ap_unexpected_nlportid)
714 wdev->ap_unexpected_nlpid = 0; 714 wdev->ap_unexpected_nlportid = 0;
715} 715}
716 716
717void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev) 717void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev)
@@ -872,7 +872,7 @@ bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm,
872 /* found match! */ 872 /* found match! */
873 873
874 /* Indicate the received Action frame to user space */ 874 /* Indicate the received Action frame to user space */
875 if (nl80211_send_mgmt(rdev, wdev, reg->nlpid, 875 if (nl80211_send_mgmt(rdev, wdev, reg->nlportid,
876 freq, sig_mbm, 876 freq, sig_mbm,
877 buf, len, gfp)) 877 buf, len, gfp))
878 continue; 878 continue;