mac80211: update to latest version, fix tx gain patch
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 848-brcmsmac-some-more-fixes-for-different-core-revs.patch
1 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
2 +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
3 @@ -271,7 +271,7 @@ struct brcms_c_bit_desc {
4 */
5
6 /* Starting corerev for the fifo size table */
7 -#define XMTFIFOTBL_STARTREV 20
8 +#define XMTFIFOTBL_STARTREV 10
9
10 struct d11init {
11 __le16 addr;
12 @@ -335,6 +335,26 @@ const u8 wlc_prio2prec_map[] = {
13 };
14
15 static const u16 xmtfifo_sz[][NFIFO] = {
16 + /* corerev 10: */
17 + {0, 0, 0, 0, 0, 0},
18 + /* corerev 11: */
19 + {0, 0, 0, 0, 0, 0},
20 + /* corerev 12: */
21 + {0, 0, 0, 0, 0, 0},
22 + /* corerev 13: */
23 + {0, 0, 0, 0, 0, 0},
24 + /* corerev 14: */
25 + {0, 0, 0, 0, 0, 0},
26 + /* corerev 15: */
27 + {0, 0, 0, 0, 0, 0},
28 + /* corerev 16: */
29 + {0, 0, 0, 0, 0, 0},
30 + /* corerev 17: 5120, 49152, 49152, 5376, 4352, 1280 */
31 + {20, 192, 192, 21, 17, 5},
32 + /* corerev 18: */
33 + {0, 0, 0, 0, 0, 0},
34 + /* corerev 19: */
35 + {0, 0, 0, 0, 0, 0},
36 /* corerev 20: 5120, 49152, 49152, 5376, 4352, 1280 */
37 {20, 192, 192, 21, 17, 5},
38 /* corerev 21: 2304, 14848, 5632, 3584, 3584, 1280 */
39 @@ -345,6 +365,18 @@ static const u16 xmtfifo_sz[][NFIFO] = {
40 {20, 192, 192, 21, 17, 5},
41 /* corerev 24: 2304, 14848, 5632, 3584, 3584, 1280 */
42 {9, 58, 22, 14, 14, 5},
43 + /* corerev 25: */
44 + {0, 0, 0, 0, 0, 0},
45 + /* corerev 26: */
46 + {0, 0, 0, 0, 0, 0},
47 + /* corerev 27: */
48 + {0, 0, 0, 0, 0, 0},
49 + /* corerev 28: 5120, 49152, 49152, 5376, 4352, 1280 */
50 + {20, 192, 192, 21, 17, 5},
51 + /* corerev 29: */
52 + {0, 0, 0, 0, 0, 0},
53 + /* corerev 30: */
54 + {0, 0, 0, 0, 0, 0},
55 };
56
57 #ifdef DEBUG
58 @@ -4598,8 +4630,15 @@ static int brcms_b_attach(struct brcms_c
59 wlc_hw->machwcap_backup = wlc_hw->machwcap;
60
61 /* init tx fifo size */
62 + WARN_ON((wlc_hw->corerev - XMTFIFOTBL_STARTREV) < 0 ||
63 + (wlc_hw->corerev - XMTFIFOTBL_STARTREV) >
64 + ARRAY_SIZE(xmtfifo_sz));
65 wlc_hw->xmtfifo_sz =
66 xmtfifo_sz[(wlc_hw->corerev - XMTFIFOTBL_STARTREV)];
67 + pr_err("use fifi: %i, %i, %i, %i, %i, %i\n",
68 + wlc_hw->xmtfifo_sz[0], wlc_hw->xmtfifo_sz[1],
69 + wlc_hw->xmtfifo_sz[2], wlc_hw->xmtfifo_sz[3],
70 + wlc_hw->xmtfifo_sz[4], wlc_hw->xmtfifo_sz[5]);
71
72 /* Get a phy for this band */
73 wlc_hw->band->pi =