#define DOT11_A3_HDR_LEN 24
#define DOT11_A4_HDR_LEN 30
#define DOT11_MAC_HDR_LEN DOT11_A3_HDR_LEN
-#define DOT11_FCS_LEN 4
#define DOT11_ICV_AES_LEN 8
#define DOT11_QOS_LEN 2
#define DOT11_IV_MAX_LEN 8
-#define DOT11_MAX_SSID_LEN 32
-
#define DOT11_DEFAULT_RTS_LEN 2347
#define DOT11_MIN_FRAG_LEN 256
#define FC_TYPE_SHIFT 2
#define FC_SUBTYPE_MASK 0xF0
#define FC_SUBTYPE_SHIFT 4
-#define FC_MOREFRAG 0x400
#define SEQNUM_SHIFT 4
#define SEQNUM_MAX 0x1000
#define FC_SUBTYPE_ANY_QOS(s) (((s) & 8) != 0)
-#define FC_KIND_MASK (FC_TYPE_MASK | FC_SUBTYPE_MASK)
+#define FC_KIND_MASK (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)
#define FC_KIND(t, s) (((t) << FC_TYPE_SHIFT) | ((s) << FC_SUBTYPE_SHIFT))
-#define FC_SUBTYPE(fc) (((fc) & FC_SUBTYPE_MASK) >> FC_SUBTYPE_SHIFT)
-#define FC_TYPE(fc) (((fc) & FC_TYPE_MASK) >> FC_TYPE_SHIFT)
+#define FC_SUBTYPE(fc) (((fc) & IEEE80211_FCTL_STYPE) >> FC_SUBTYPE_SHIFT)
+#define FC_TYPE(fc) (((fc) & IEEE80211_FCTL_FTYPE) >> FC_TYPE_SHIFT)
#define FC_PROBE_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_REQ)
#define FC_PROBE_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_RESP)
* buffer length needed for wlc_format_ssid
* 32 SSID chars, max of 4 chars for each SSID char "\xFF", plus NULL.
*/
-#define SSID_FMT_BUF_LEN ((4 * DOT11_MAX_SSID_LEN) + 1)
+#define SSID_FMT_BUF_LEN ((4 * IEEE80211_MAX_SSID_LEN) + 1)
#define TIMER_INTERVAL_WATCHDOG 1000 /* watchdog timer, in unit of ms */
#define TIMER_INTERVAL_RADIOCHK 800 /* radio monitor timer, in unit of ms */
char *p = buf;
char *endp = buf + SSID_FMT_BUF_LEN;
- if (ssid_len > DOT11_MAX_SSID_LEN)
- ssid_len = DOT11_MAX_SSID_LEN;
+ if (ssid_len > IEEE80211_MAX_SSID_LEN)
+ ssid_len = IEEE80211_MAX_SSID_LEN;
for (i = 0; i < ssid_len; i++) {
c = (uint) ssid[i];
/* compute length of frame in bytes for use in PLCP computations */
len = pkttotlen(osh, p);
- phylen = len + DOT11_FCS_LEN;
+ phylen = len + FCS_LEN;
/* If WEP enabled, add room in phylen for the additional bytes of
* ICV which MAC generates. We do NOT add the additional bytes to
ASSERT(IS_ALIGNED((unsigned long)txh->RTSPhyHeader, sizeof(u16)));
rts_plcp = txh->RTSPhyHeader;
if (use_cts)
- rts_phylen = DOT11_CTS_LEN + DOT11_FCS_LEN;
+ rts_phylen = DOT11_CTS_LEN + FCS_LEN;
else
- rts_phylen = DOT11_RTS_LEN + DOT11_FCS_LEN;
+ rts_phylen = DOT11_RTS_LEN + FCS_LEN;
wlc_compute_plcp(wlc, rts_rspec[0], rts_phylen, rts_plcp);
tx_rts_count =
(txs->status & TX_STATUS_RTS_RTX_MASK) >> TX_STATUS_RTS_RTX_SHIFT;
- lastframe = (fc & FC_MOREFRAG) == 0;
+ lastframe = (fc & IEEE80211_FCTL_MOREFRAGS) == 0;
if (!lastframe) {
WL_ERROR("Not last frame!\n");
prep_mac80211_status(wlc, rxh, p, &rx_status);
/* mac header+body length, exclude CRC and plcp header */
- len_mpdu = p->len - D11_PHY_HDR_LEN - DOT11_FCS_LEN;
+ len_mpdu = p->len - D11_PHY_HDR_LEN - FCS_LEN;
skb_pull(p, D11_PHY_HDR_LEN);
__skb_trim(p, len_mpdu);
/* BA len == 32 == 16(ctl hdr) + 4(ba len) + 8(bitmap) + 4(fcs) */
return wlc_calc_frame_time(wlc, rspec, preamble_type,
(DOT11_BA_LEN + DOT11_BA_BITMAP_LEN +
- DOT11_FCS_LEN));
+ FCS_LEN));
}
static uint BCMFASTPATH
/* ACK frame len == 14 == 2(fc) + 2(dur) + 6(ra) + 4(fcs) */
dur =
wlc_calc_frame_time(wlc, rspec, preamble_type,
- (DOT11_ACK_LEN + DOT11_FCS_LEN));
+ (DOT11_ACK_LEN + FCS_LEN));
return dur;
}
if (type == FC_BEACON && !MBSS_BCN_ENAB(cfg)) {
/* fill in PLCP */
wlc_compute_plcp(wlc, bcn_rspec,
- (DOT11_MAC_HDR_LEN + body_len + DOT11_FCS_LEN),
+ (DOT11_MAC_HDR_LEN + body_len + FCS_LEN),
(u8 *) plcp);
}
{
u8 *ssidptr = cfg->SSID;
u16 base = M_SSID;
- u8 ssidbuf[DOT11_MAX_SSID_LEN];
+ u8 ssidbuf[IEEE80211_MAX_SSID_LEN];
/* padding the ssid with zero and copy it into shm */
- memset(ssidbuf, 0, DOT11_MAX_SSID_LEN);
+ memset(ssidbuf, 0, IEEE80211_MAX_SSID_LEN);
bcopy(ssidptr, ssidbuf, cfg->SSID_len);
- wlc_copyto_shm(wlc, base, ssidbuf, DOT11_MAX_SSID_LEN);
+ wlc_copyto_shm(wlc, base, ssidbuf, IEEE80211_MAX_SSID_LEN);
if (!MBSS_BCN_ENAB(cfg))
wlc_write_shm(wlc, M_SSIDLEN, (u16) cfg->SSID_len);
* Use the actual frame length covered by the PLCP header for the call to
* wlc_mod_prb_rsp_rate_table() by subtracting the PLCP len and adding the FCS.
*/
- len += (-D11_PHY_HDR_LEN + DOT11_FCS_LEN);
+ len += (-D11_PHY_HDR_LEN + FCS_LEN);
wlc_mod_prb_rsp_rate_table(wlc, (u16) len);
if (suspend)