summaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-15 14:40:31 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-02-15 15:46:37 +0100
commitbf7cd94dcc71682cd6af4a9028f95307b7db41c5 (patch)
tree66b4573619eaebf52c0a298969a9756eb0059266 /net/mac80211/tx.c
parent93c78c5debeb9c7101ecc73347d4730c26a98c05 (diff)
downloadop-kernel-dev-bf7cd94dcc71682cd6af4a9028f95307b7db41c5.zip
op-kernel-dev-bf7cd94dcc71682cd6af4a9028f95307b7db41c5.tar.gz
mac80211: clean up mesh code
There's various code with strange indentation, questionable loop and locking constructs, etc. The bigger change is moving the "sdata" argument to the first argument of all functions, like all other mac80211 functions that have one. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index fe644f9..5b9602b 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1495,7 +1495,7 @@ void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
if (ieee80211_vif_is_mesh(&sdata->vif)) {
if (ieee80211_is_data(hdr->frame_control) &&
is_unicast_ether_addr(hdr->addr1)) {
- if (mesh_nexthop_resolve(skb, sdata))
+ if (mesh_nexthop_resolve(sdata, skb))
return; /* skb queued: don't free */
} else {
ieee80211_mps_set_frame_flags(sdata, NULL, hdr);
@@ -1844,9 +1844,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
}
if (!is_multicast_ether_addr(skb->data)) {
- mpath = mesh_path_lookup(skb->data, sdata);
+ mpath = mesh_path_lookup(sdata, skb->data);
if (!mpath)
- mppath = mpp_path_lookup(skb->data, sdata);
+ mppath = mpp_path_lookup(sdata, skb->data);
}
/*
@@ -1859,8 +1859,8 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
!(mppath && !ether_addr_equal(mppath->mpp, skb->data))) {
hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc,
skb->data, skb->data + ETH_ALEN);
- meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr,
- sdata, NULL, NULL);
+ meshhdrlen = ieee80211_new_mesh_header(sdata, &mesh_hdr,
+ NULL, NULL);
} else {
/* DS -> MBSS (802.11-2012 13.11.3.3).
* For unicast with unknown forwarding information,
@@ -1879,18 +1879,14 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
mesh_da, sdata->vif.addr);
if (is_multicast_ether_addr(mesh_da))
/* DA TA mSA AE:SA */
- meshhdrlen =
- ieee80211_new_mesh_header(&mesh_hdr,
- sdata,
- skb->data + ETH_ALEN,
- NULL);
+ meshhdrlen = ieee80211_new_mesh_header(
+ sdata, &mesh_hdr,
+ skb->data + ETH_ALEN, NULL);
else
/* RA TA mDA mSA AE:DA SA */
- meshhdrlen =
- ieee80211_new_mesh_header(&mesh_hdr,
- sdata,
- skb->data,
- skb->data + ETH_ALEN);
+ meshhdrlen = ieee80211_new_mesh_header(
+ sdata, &mesh_hdr, skb->data,
+ skb->data + ETH_ALEN);
}
chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
OpenPOWER on IntegriCloud