Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279002
b: refs/heads/master
c: a1910f9
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Dec 16, 2011
1 parent d4460aa commit f530731
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b2538b2ab8f37e55b91b3cce98d2df5c126125d
refs/heads/master: a1910f9cad2b4b9cc0d5d326aa65632a23c16088
21 changes: 10 additions & 11 deletions trunk/drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ MODULE_AUTHOR("Jouni Malinen");
MODULE_DESCRIPTION("Software simulator of 802.11 radio(s) for mac80211");
MODULE_LICENSE("GPL");

int wmediumd_pid;
static u32 wmediumd_pid;

static int radios = 2;
module_param(radios, int, 0444);
MODULE_PARM_DESC(radios, "Number of simulated radios");
Expand Down Expand Up @@ -665,7 +666,7 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
{
bool ack;
struct ieee80211_tx_info *txi;
int _pid;
u32 _pid;

mac80211_hwsim_monitor_rx(hw, skb);

Expand All @@ -676,7 +677,7 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
}

/* wmediumd mode check */
_pid = wmediumd_pid;
_pid = ACCESS_ONCE(wmediumd_pid);

if (_pid)
return mac80211_hwsim_tx_frame_nl(hw, skb, _pid);
Expand Down Expand Up @@ -764,7 +765,7 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
struct ieee80211_hw *hw = arg;
struct sk_buff *skb;
struct ieee80211_tx_info *info;
int _pid;
u32 _pid;

hwsim_check_magic(vif);

Expand All @@ -781,7 +782,7 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
mac80211_hwsim_monitor_rx(hw, skb);

/* wmediumd mode check */
_pid = wmediumd_pid;
_pid = ACCESS_ONCE(wmediumd_pid);

if (_pid)
return mac80211_hwsim_tx_frame_nl(hw, skb, _pid);
Expand Down Expand Up @@ -1254,7 +1255,7 @@ static void hwsim_send_ps_poll(void *dat, u8 *mac, struct ieee80211_vif *vif)
struct hwsim_vif_priv *vp = (void *)vif->drv_priv;
struct sk_buff *skb;
struct ieee80211_pspoll *pspoll;
int _pid;
u32 _pid;

if (!vp->assoc)
return;
Expand All @@ -1275,7 +1276,7 @@ static void hwsim_send_ps_poll(void *dat, u8 *mac, struct ieee80211_vif *vif)
memcpy(pspoll->ta, mac, ETH_ALEN);

/* wmediumd mode check */
_pid = wmediumd_pid;
_pid = ACCESS_ONCE(wmediumd_pid);

if (_pid)
return mac80211_hwsim_tx_frame_nl(data->hw, skb, _pid);
Expand All @@ -1292,7 +1293,7 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,
struct hwsim_vif_priv *vp = (void *)vif->drv_priv;
struct sk_buff *skb;
struct ieee80211_hdr *hdr;
int _pid;
u32 _pid;

if (!vp->assoc)
return;
Expand All @@ -1314,7 +1315,7 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,
memcpy(hdr->addr3, vp->bssid, ETH_ALEN);

/* wmediumd mode check */
_pid = wmediumd_pid;
_pid = ACCESS_ONCE(wmediumd_pid);

if (_pid)
return mac80211_hwsim_tx_frame_nl(data->hw, skb, _pid);
Expand Down Expand Up @@ -1634,8 +1635,6 @@ static int hwsim_init_netlink(void)
int rc;
printk(KERN_INFO "mac80211_hwsim: initializing netlink\n");

wmediumd_pid = 0;

rc = genl_register_family_with_ops(&hwsim_genl_family,
hwsim_ops, ARRAY_SIZE(hwsim_ops));
if (rc)
Expand Down

0 comments on commit f530731

Please sign in to comment.