o add a capability for drivers that require 802.3 encapsulation of

frames passed down through the transmit path
o mark ndis requiring 802.3 encap'd frames

Reviewed by:	"Paul B. Mahol" <onemda@gmail.com>, thompsa
This commit is contained in:
Sam Leffler 2009-04-08 16:19:50 +00:00
parent 94fe30d0ca
commit 9fb0fccb89
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190850
3 changed files with 15 additions and 11 deletions

View File

@ -753,7 +753,8 @@ ndis_attach(dev)
ic->ic_ifp = ifp;
ic->ic_opmode = IEEE80211_M_STA;
ic->ic_phytype = IEEE80211_T_DS;
ic->ic_caps = IEEE80211_C_STA | IEEE80211_C_IBSS;
ic->ic_caps = IEEE80211_C_8023ENCAP |
IEEE80211_C_STA | IEEE80211_C_IBSS;
setbit(ic->ic_modecaps, IEEE80211_MODE_AUTO);
len = 0;
r = ndis_get_info(sc, OID_802_11_NETWORK_TYPES_SUPPORTED,

View File

@ -253,14 +253,16 @@ ieee80211_start(struct ifnet *ifp)
}
}
#endif /* IEEE80211_SUPPORT_SUPERG */
/*
* Encapsulate the packet in prep for transmission.
*/
m = ieee80211_encap(vap, ni, m);
if (m == NULL) {
/* NB: stat+msg handled in ieee80211_encap */
ieee80211_free_node(ni);
continue;
if (__predict_true((vap->iv_caps & IEEE80211_C_8023ENCAP) == 0)) {
/*
* Encapsulate the packet in prep for transmission.
*/
m = ieee80211_encap(vap, ni, m);
if (m == NULL) {
/* NB: stat+msg handled in ieee80211_encap */
ieee80211_free_node(ni);
continue;
}
}
/*

View File

@ -532,8 +532,9 @@ MALLOC_DECLARE(M_80211_VAP);
#define IEEE80211_FVEN_BITS "\20"
/* ic_caps/iv_caps: device driver capabilities */
/* 0x2f available */
/* 0x2e available */
#define IEEE80211_C_STA 0x00000001 /* CAPABILITY: STA available */
#define IEEE80211_C_8023ENCAP 0x00000002 /* CAPABILITY: 802.3 encap */
#define IEEE80211_C_FF 0x00000040 /* CAPABILITY: ATH FF avail */
#define IEEE80211_C_TURBOP 0x00000080 /* CAPABILITY: ATH Turbo avail*/
#define IEEE80211_C_IBSS 0x00000100 /* CAPABILITY: IBSS available */
@ -565,7 +566,7 @@ MALLOC_DECLARE(M_80211_VAP);
IEEE80211_C_TDMA)
#define IEEE80211_C_BITS \
"\20\1STA\7FF\10TURBOP\11IBSS\12PMGT" \
"\20\1STA\002803ENCAP\7FF\10TURBOP\11IBSS\12PMGT" \
"\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \
"\21MONITOR\22DFS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \
"\37TXFRAG\40TDMA"