From: Denis V. <vd...@po...> - 2005-04-18 08:00:48
|
These two are completely different "additional" headers: #define RX_CFG1_PLUS_ADDIT_HDR 0x2000 /* ACX100 only!! */ #define RX_CFG1_INCLUDE_ADDIT_HDR 0x0002 Rename them to more sensible names: RXBUF_HEADER, PHY_HEADER. Document them in comments. Code was not actually working okay if PHY header is enabled. Fix that. Make it so that PHY header can be compile-time disabled: #define WANT_PHY_HDR 0 ... #define RX_CFG1_INCLUDE_PHY_HDR (WANT_PHY_HDR ? 0x0002 : 0) ... static inline p80211_hdr_t *acx_get_p80211_hdr(wlandevice_t *priv, const rxbuffer_t *rxbuf) { if (!(priv->rx_config_1 & RX_CFG1_INCLUDE_PHY_HDR)) return (p80211_hdr_t *)&rxbuf->hdr_a3; ... Thus inline gets much shorter - if() is always true. Move acx specific IE programming inside cx_initialize_rx_config(). Make ACX1xx_IE_FEATURE_CONFIG a bit easier to handle. -- vda |