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