Commit 94dde6f4 authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: cleaned up softmac scb.h macro's

Substituted/removed macro's.
Reported-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e9560656
...@@ -7196,11 +7196,11 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, ...@@ -7196,11 +7196,11 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw,
} else { } else {
/* Increment the counter for first fragment */ /* Increment the counter for first fragment */
if (tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) if (tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
SCB_SEQNUM(scb, p->priority)++; scb->seqnum[p->priority]++;
/* extract fragment number from frame first */ /* extract fragment number from frame first */
seq = le16_to_cpu(seq) & FRAGNUM_MASK; seq = le16_to_cpu(seq) & FRAGNUM_MASK;
seq |= (SCB_SEQNUM(scb, p->priority) << SEQNUM_SHIFT); seq |= (scb->seqnum[p->priority] << SEQNUM_SHIFT);
h->seq_ctrl = cpu_to_le16(seq); h->seq_ctrl = cpu_to_le16(seq);
frameid = ((seq << TXFID_SEQ_SHIFT) & TXFID_SEQ_MASK) | frameid = ((seq << TXFID_SEQ_SHIFT) & TXFID_SEQ_MASK) |
...@@ -7210,7 +7210,7 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, ...@@ -7210,7 +7210,7 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw,
frameid |= queue & TXFID_QUEUE_MASK; frameid |= queue & TXFID_QUEUE_MASK;
/* set the ignpmq bit for all pkts tx'd in PS mode and for beacons */ /* set the ignpmq bit for all pkts tx'd in PS mode and for beacons */
if (SCB_PS(scb) || ieee80211_is_beacon(h->frame_control)) if (ieee80211_is_beacon(h->frame_control))
mcl |= TXC_IGNOREPMQ; mcl |= TXC_IGNOREPMQ;
txrate[0] = tx_info->control.rates; txrate[0] = tx_info->control.rates;
...@@ -7685,7 +7685,7 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, ...@@ -7685,7 +7685,7 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw,
} }
ac = skb_get_queue_mapping(p); ac = skb_get_queue_mapping(p);
if (SCB_WME(scb) && qos && wlc->edcf_txop[ac]) { if ((scb->flags & SCB_WMECAP) && qos && wlc->edcf_txop[ac]) {
uint frag_dur, dur, dur_fallback; uint frag_dur, dur, dur_fallback;
/* WME: Update TXOP threshold */ /* WME: Update TXOP threshold */
......
...@@ -221,7 +221,8 @@ struct brcms_stf { ...@@ -221,7 +221,8 @@ struct brcms_stf {
#define BRCMS_STF_SS_STBC_TX(wlc, scb) \ #define BRCMS_STF_SS_STBC_TX(wlc, scb) \
(((wlc)->stf->txstreams > 1) && (((wlc)->band->band_stf_stbc_tx == ON) \ (((wlc)->stf->txstreams > 1) && (((wlc)->band->band_stf_stbc_tx == ON) \
|| (SCB_STBC_CAP((scb)) && (wlc)->band->band_stf_stbc_tx == AUTO && \ || (((scb)->flags & SCB_STBCCAP) && \
(wlc)->band->band_stf_stbc_tx == AUTO && \
isset(&((wlc)->stf->ss_algo_channel), PHY_TXC1_MODE_STBC)))) isset(&((wlc)->stf->ss_algo_channel), PHY_TXC1_MODE_STBC))))
#define BRCMS_STBC_CAP_PHY(wlc) (BRCMS_ISNPHY(wlc->band) && \ #define BRCMS_STBC_CAP_PHY(wlc) (BRCMS_ISNPHY(wlc->band) && \
......
...@@ -123,22 +123,6 @@ extern const struct brcms_mcs_info mcs_table[]; ...@@ -123,22 +123,6 @@ extern const struct brcms_mcs_info mcs_table[];
RSPEC_ISSGI(rspec)) : \ RSPEC_ISSGI(rspec)) : \
(rspec & RSPEC_RATE_MASK)) (rspec & RSPEC_RATE_MASK))
/* return rate in unit of 500Kbps -- for internal use in wlc_rate_sel.c */
#define RSPEC2RATE500K(rspec) \
((rspec & RSPEC_MIMORATE) ? \
MCS_RATE((rspec & RSPEC_RATE_MASK), state->is40bw, \
RSPEC_ISSGI(rspec))/500 : \
(rspec & RSPEC_RATE_MASK))
#define CRSPEC2RATE500K(rspec) \
((rspec & RSPEC_MIMORATE) ? \
MCS_RATE((rspec & RSPEC_RATE_MASK), RSPEC_IS40MHZ(rspec), \
RSPEC_ISSGI(rspec))/500 :\
(rspec & RSPEC_RATE_MASK))
#define RSPEC2KBPS(rspec) \
(IS_MCS(rspec) ? RSPEC2RATE(rspec) : RSPEC2RATE(rspec)*500)
#define RSPEC_PHYTXBYTE2(rspec) ((rspec & 0xff00) >> 8) #define RSPEC_PHYTXBYTE2(rspec) ((rspec & 0xff00) >> 8)
#define RSPEC_GET_BW(rspec) ((rspec & RSPEC_BW_MASK) >> RSPEC_BW_SHIFT) #define RSPEC_GET_BW(rspec) ((rspec & RSPEC_BW_MASK) >> RSPEC_BW_SHIFT)
......
...@@ -24,6 +24,16 @@ ...@@ -24,6 +24,16 @@
#define AMPDU_TX_BA_MAX_WSIZE 64 /* max Tx ba window size (in pdu) */ #define AMPDU_TX_BA_MAX_WSIZE 64 /* max Tx ba window size (in pdu) */
#define AMPDU_MAX_SCB_TID NUMPRIO
/* scb flags */
#define SCB_WMECAP 0x0040 /* may ONLY be set if pub->_wme!=OFF */
#define SCB_HTCAP 0x10000 /* HT (MIMO) capable device */
#define SCB_IS40 0x80000 /* 40MHz capable */
#define SCB_STBCCAP 0x40000000 /* STBC Capable */
#define SCB_MAGIC 0xbeefcafe
/* structure to store per-tid state for the ampdu initiator */ /* structure to store per-tid state for the ampdu initiator */
struct scb_ampdu_tid_ini { struct scb_ampdu_tid_ini {
u8 tx_in_transit; /* number of pending mpdus in transit in driver */ u8 tx_in_transit; /* number of pending mpdus in transit in driver */
...@@ -34,8 +44,6 @@ struct scb_ampdu_tid_ini { ...@@ -34,8 +44,6 @@ struct scb_ampdu_tid_ini {
u8 ba_wsize; /* negotiated ba window size (in pdu) */ u8 ba_wsize; /* negotiated ba window size (in pdu) */
}; };
#define AMPDU_MAX_SCB_TID NUMPRIO
struct scb_ampdu { struct scb_ampdu {
struct scb *scb; /* back pointer for easy reference */ struct scb *scb; /* back pointer for easy reference */
u8 mpdu_density; /* mpdu density */ u8 mpdu_density; /* mpdu density */
...@@ -54,8 +62,6 @@ struct scb_ampdu { ...@@ -54,8 +62,6 @@ struct scb_ampdu {
struct scb_ampdu_tid_ini ini[AMPDU_MAX_SCB_TID]; struct scb_ampdu_tid_ini ini[AMPDU_MAX_SCB_TID];
}; };
#define SCB_MAGIC 0xbeefcafe
/* station control block - one per remote MAC address */ /* station control block - one per remote MAC address */
struct scb { struct scb {
u32 magic; u32 magic;
...@@ -74,14 +80,4 @@ struct scb { ...@@ -74,14 +80,4 @@ struct scb {
struct scb_ampdu scb_ampdu; /* AMPDU state including per tid info */ struct scb_ampdu scb_ampdu; /* AMPDU state including per tid info */
}; };
/* scb flags */
#define SCB_WMECAP 0x0040 /* may ONLY be set if pub->_wme!=OFF */
#define SCB_HTCAP 0x10000 /* HT (MIMO) capable device */
#define SCB_IS40 0x80000 /* 40MHz capable */
#define SCB_STBCCAP 0x40000000 /* STBC Capable */
#define SCB_WME(a) ((a)->flags & SCB_WMECAP)/* implies WME enab */
#define SCB_SEQNUM(scb, prio) ((scb)->seqnum[(prio)])
#define SCB_PS(a) NULL
#define SCB_STBC_CAP(a) ((a)->flags & SCB_STBCCAP)
#define SCB_AMPDU(a) true
#endif /* _BRCM_SCB_H_ */ #endif /* _BRCM_SCB_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment