mirror of
https://github.com/proski/madwifi
synced 2024-11-22 06:21:47 +03:00
* Update comments on find_*node functions to specifically note node reference acquirement
* Update ieee80211 XR mode to use ieee80211_parent_queue_xmit git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2838 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
parent
d07ba1953d
commit
be343965ed
@ -1088,6 +1088,7 @@ _ieee80211_find_wds_node(struct ieee80211_node_table *nt, const u_int8_t *macadd
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* NB: A node reference is acquired here; the caller MUST release it. */
|
||||||
static struct ieee80211_node *
|
static struct ieee80211_node *
|
||||||
#ifdef IEEE80211_DEBUG_REFCNT
|
#ifdef IEEE80211_DEBUG_REFCNT
|
||||||
_ieee80211_find_node_debug(struct ieee80211_node_table *nt,
|
_ieee80211_find_node_debug(struct ieee80211_node_table *nt,
|
||||||
@ -1257,11 +1258,11 @@ ieee80211_add_neighbor(struct ieee80211vap *vap, const struct ieee80211_frame *w
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Locate the node for sender, track state, and then pass the
|
* Return the node for the sender of a frame; if the sender is unknown return
|
||||||
* (referenced) node up to the 802.11 layer for its use. We
|
* NULL. The caller is expected to deal with this. (The frame is sent to all
|
||||||
* return NULL when the sender is unknown; the driver is required
|
* VAPs in this case).
|
||||||
* locate the appropriate virtual ap in that case; possibly
|
*
|
||||||
* sending it to all (using ieee80211_input_all).
|
* NB: A node reference is acquired here; the caller MUST release it.
|
||||||
*/
|
*/
|
||||||
struct ieee80211_node *
|
struct ieee80211_node *
|
||||||
#ifdef IEEE80211_DEBUG_REFCNT
|
#ifdef IEEE80211_DEBUG_REFCNT
|
||||||
@ -1300,8 +1301,10 @@ EXPORT_SYMBOL(ieee80211_find_rxnode);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return a reference to the appropriate node for sending
|
* Return the appropriate node for sending a data frame. This handles node
|
||||||
* a data frame. This handles node discovery in adhoc networks.
|
* discovery in adhoc networks.
|
||||||
|
*
|
||||||
|
* NB: A node reference is acquired here; the caller MUST release it.
|
||||||
*/
|
*/
|
||||||
struct ieee80211_node *
|
struct ieee80211_node *
|
||||||
#ifdef IEEE80211_DEBUG_REFCNT
|
#ifdef IEEE80211_DEBUG_REFCNT
|
||||||
@ -1322,7 +1325,7 @@ ieee80211_find_txnode(struct ieee80211vap *vap, const u_int8_t *mac)
|
|||||||
if (vap->iv_opmode == IEEE80211_M_STA || IEEE80211_IS_MULTICAST(mac))
|
if (vap->iv_opmode == IEEE80211_M_STA || IEEE80211_IS_MULTICAST(mac))
|
||||||
return ieee80211_ref_node(vap->iv_bss);
|
return ieee80211_ref_node(vap->iv_bss);
|
||||||
|
|
||||||
/* XXX can't hold lock across dup_bss due to recursive locking */
|
/* XXX: Can't hold lock across dup_bss due to recursive locking. */
|
||||||
nt = &vap->iv_ic->ic_sta;
|
nt = &vap->iv_ic->ic_sta;
|
||||||
IEEE80211_NODE_TABLE_LOCK_IRQ(nt);
|
IEEE80211_NODE_TABLE_LOCK_IRQ(nt);
|
||||||
ni = _ieee80211_find_node(nt, mac);
|
ni = _ieee80211_find_node(nt, mac);
|
||||||
|
@ -223,7 +223,7 @@ ieee80211_hardstart(struct sk_buff *skb, struct net_device *dev)
|
|||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
|
||||||
cb = (struct ieee80211_cb *) skb->cb;
|
cb = (struct ieee80211_cb *)skb->cb;
|
||||||
memset(cb, 0, sizeof(struct ieee80211_cb));
|
memset(cb, 0, sizeof(struct ieee80211_cb));
|
||||||
|
|
||||||
if (vap->iv_opmode == IEEE80211_M_MONITOR) {
|
if (vap->iv_opmode == IEEE80211_M_MONITOR) {
|
||||||
@ -270,40 +270,35 @@ ieee80211_hardstart(struct sk_buff *skb, struct net_device *dev)
|
|||||||
* We'll get the frame back when the time is right.
|
* We'll get the frame back when the time is right.
|
||||||
*/
|
*/
|
||||||
ieee80211_pwrsave(ni, skb);
|
ieee80211_pwrsave(ni, skb);
|
||||||
ieee80211_unref_node(&ni); /* matches ieee80211_find_txnode */
|
ieee80211_unref_node(&ni);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ATH_SUPERG_XR
|
#ifdef ATH_SUPERG_XR
|
||||||
/*
|
/* Broadcast/multicast packets need to be sent on XR vap in addition to
|
||||||
* broadcast/multicast packets need to be sent on XR vap in addition to
|
* normal vap. */
|
||||||
* normal vap.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* FIXME: ieee80211_parent_queue_xmit */
|
if (vap->iv_xrvap && (ni == vap->iv_bss) &&
|
||||||
if (vap->iv_xrvap && ni == vap->iv_bss &&
|
|
||||||
vap->iv_xrvap->iv_sta_assoc) {
|
vap->iv_xrvap->iv_sta_assoc) {
|
||||||
struct sk_buff *skb1;
|
struct sk_buff *skb1 = skb_clone(skb, GFP_ATOMIC);
|
||||||
skb1 = skb_clone(skb, GFP_ATOMIC);
|
|
||||||
if (skb1) {
|
if (skb1) {
|
||||||
cb = (struct ieee80211_cb *) skb1->cb;
|
cb = (struct ieee80211_cb *)skb1->cb;
|
||||||
|
memset(cb, 0, sizeof(struct ieee80211_cb));
|
||||||
cb->ni = ieee80211_find_txnode(vap->iv_xrvap,
|
cb->ni = ieee80211_find_txnode(vap->iv_xrvap,
|
||||||
eh->ether_dhost);
|
eh->ether_dhost);
|
||||||
cb->flags = 0;
|
ieee80211_parent_queue_xmit(skb1);
|
||||||
cb->next = NULL;
|
|
||||||
(void) dev_queue_xmit(skb1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ieee80211_parent_queue_xmit(skb);
|
ieee80211_parent_queue_xmit(skb);
|
||||||
ieee80211_unref_node(&ni); /* matches ieee80211_find_txnode */
|
ieee80211_unref_node(&ni);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
bad:
|
bad:
|
||||||
if (skb != NULL)
|
if (skb != NULL)
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb(skb);
|
||||||
if (ni != NULL)
|
if (ni != NULL)
|
||||||
ieee80211_unref_node(&ni); /* matches ieee80211_find_txnode */
|
ieee80211_unref_node(&ni);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user