summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-10-25 23:28:04 +0000
committersam <sam@FreeBSD.org>2008-10-25 23:28:04 +0000
commita9e61ea29791467a32d5e40b4836528b191efd09 (patch)
tree0e97849afa772556b354d374c7a984c4e3a1e4fe /sys
parent27b294c5a8896fdaccb0eee660e01dd7ff266beb (diff)
downloadFreeBSD-src-a9e61ea29791467a32d5e40b4836528b191efd09.zip
FreeBSD-src-a9e61ea29791467a32d5e40b4836528b191efd09.tar.gz
fix associd check for adhoc mode
Reviewed by: jhay
Diffstat (limited to 'sys')
-rw-r--r--sys/net80211/ieee80211_output.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 9df35f3..467fda8 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -203,24 +203,19 @@ ieee80211_start(struct ifnet *ifp)
continue;
}
/* XXX AUTH'd */
- if (ni->ni_associd == 0) {
- /*
- * Destination is not associated; must special
- * case DWDS where we point iv_bss at the node
- * for the associated station.
- * XXX adhoc mode?
- */
- if (ni != vap->iv_bss || IS_DWDS(vap)) {
- IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_OUTPUT,
- eh->ether_dhost, NULL,
- "sta not associated (type 0x%04x)",
- htons(eh->ether_type));
- vap->iv_stats.is_tx_notassoc++;
- ifp->if_oerrors++;
- m_freem(m);
- ieee80211_free_node(ni);
- continue;
- }
+ /* XXX mark vap to identify if associd is required */
+ if (ni->ni_associd == 0 &&
+ (vap->iv_opmode == IEEE80211_M_STA ||
+ vap->iv_opmode == IEEE80211_M_HOSTAP || IS_DWDS(vap))) {
+ IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_OUTPUT,
+ eh->ether_dhost, NULL,
+ "sta not associated (type 0x%04x)",
+ htons(eh->ether_type));
+ vap->iv_stats.is_tx_notassoc++;
+ ifp->if_oerrors++;
+ m_freem(m);
+ ieee80211_free_node(ni);
+ continue;
}
if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) &&
(m->m_flags & M_PWR_SAV) == 0) {
OpenPOWER on IntegriCloud