Skip to contentSkip to conversation

mac80211_hwsim: Rename pid to portid to avoid confusion

PATCH New Jaewan Kim 1 participant 1 message Jan 30, 2023

Subsystems (3)
lore
Share & tools
lore

Jaewan Kim

author
#0 lore raw

PATCH 1/1 mac80211_hwsim: 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 that hold port identifiers portid instead of pid.

This change replicates following commit:
commit 15e473046cb6 ("netlink: Rename pid to portid to avoid confusion")

---
 drivers/net/wireless/mac80211_hwsim.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/mac80211_hwsim.c +3 -3
index c57c8903b7c0..4cc4eaf80b14 100644
@@ -2034,7 +2034,7 @@ static void mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
 				    struct ieee80211_channel *chan)
 {
 	struct mac80211_hwsim_data *data = hw->priv;
-	u32 _pid = READ_ONCE(data->wmediumd);
+	u32 _portid = READ_ONCE(data->wmediumd);
 
 	if (ieee80211_hw_check(hw, SUPPORTS_RC_TABLE)) {
 		struct ieee80211_tx_info *txi = IEEE80211_SKB_CB(skb);
@@ -2045,8 +2045,8 @@ static void mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
 
 	mac80211_hwsim_monitor_rx(hw, skb, chan);
 
-	if (_pid || hwsim_virtio_enabled)
-		return mac80211_hwsim_tx_frame_nl(hw, skb, _pid, chan);
+	if (_portid || hwsim_virtio_enabled)
+		return mac80211_hwsim_tx_frame_nl(hw, skb, _portid, chan);
 
 	data->tx_pkts++;
 	data->tx_bytes += skb->len;
Signature · 1 line
2.39.1.456.gfc5497dd1b-goog