From: Christian Lamparter Date: Sat, 15 Dec 2012 21:19:22 +0000 (+0100) Subject: carl9170 firmware: fix max beacon length X-Git-Tag: 1.9.7~9 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=91978587bb5fc143a0c61d1b30213a3c400f27ea;p=carl9170fw.git carl9170 firmware: fix max beacon length According to AR9170's data sheet, the beacon length register only cares about bits 8:0. So the max length [with 4 reserved bytes for the FCS] is at 511. Note: Because the beacon has to be stored in the DMA memory region, we have to be careful so we don't waste precious memory due to alignment and padding. Therefore I decided to reduce the max beacon length even more down to 480 bytes. [This saves one 320 byte DMA block from becoming unused padding, when the default 2 vif configuration is selected]. Signed-off-by: Christian Lamparter --- diff --git a/include/shared/hw.h b/include/shared/hw.h index fa834c1..0db874a 100644 --- a/include/shared/hw.h +++ b/include/shared/hw.h @@ -384,7 +384,7 @@ #define AR9170_MAC_REG_BCN_ADDR (AR9170_MAC_REG_BASE + 0xd84) #define AR9170_MAC_REG_BCN_LENGTH (AR9170_MAC_REG_BASE + 0xd88) -#define AR9170_MAC_BCN_LENGTH_MAX 256 +#define AR9170_MAC_BCN_LENGTH_MAX (512 - 32) #define AR9170_MAC_REG_BCN_STATUS (AR9170_MAC_REG_BASE + 0xd8c)