ac73f3d4bdd5fcff6506516fa1fdb817671d227c
[openwrt.git] / target / linux / brcm47xx / patches-3.2 / 190-ssb-sprom-fix-some-sizes-signedness.patch
1 From 0af3fa9e4c9ea0ca0662f09183d71ea9a7eb572f Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Sat, 18 Feb 2012 14:33:08 +0100
4 Subject: [PATCH 190/202] ssb: sprom fix some sizes / signedness
5
6 Some parts of the sprom struct are bigger than needed.
7 The leddc and maxpwr values are just 8 bit long and not 16.
8 rxpo2g and rxpo5g are signed
9 antenna_gain is unsigned
10
11 I got these information for the open source part of the Braodcom SDK
12 covering sprom version 1 to 9. rxpo2g contained a negative number on my
13 bcm5354 based device, this cased an error and Broadcom SDK says this is
14 signed.
15
16 I was unable to find any reverences to antenna_gain.ghz5 in the
17 Broadcom SDK.
18
19 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
20 ---
21 include/linux/ssb/ssb.h | 20 ++++++++++----------
22 1 files changed, 10 insertions(+), 10 deletions(-)
23
24 --- a/include/linux/ssb/ssb.h
25 +++ b/include/linux/ssb/ssb.h
26 @@ -33,8 +33,8 @@ struct ssb_sprom {
27 u8 et1mdcport; /* MDIO for enet1 */
28 u16 board_rev; /* Board revision number from SPROM. */
29 u8 country_code; /* Country Code */
30 - u16 leddc_on_time; /* LED Powersave Duty Cycle On Count */
31 - u16 leddc_off_time; /* LED Powersave Duty Cycle Off Count */
32 + u8 leddc_on_time; /* LED Powersave Duty Cycle On Count */
33 + u8 leddc_off_time; /* LED Powersave Duty Cycle Off Count */
34 u8 ant_available_a; /* 2GHz antenna available bits (up to 4) */
35 u8 ant_available_bg; /* 5GHz antenna available bits (up to 4) */
36 u16 pa0b0;
37 @@ -53,10 +53,10 @@ struct ssb_sprom {
38 u8 gpio1; /* GPIO pin 1 */
39 u8 gpio2; /* GPIO pin 2 */
40 u8 gpio3; /* GPIO pin 3 */
41 - u16 maxpwr_bg; /* 2.4GHz Amplifier Max Power (in dBm Q5.2) */
42 - u16 maxpwr_al; /* 5.2GHz Amplifier Max Power (in dBm Q5.2) */
43 - u16 maxpwr_a; /* 5.3GHz Amplifier Max Power (in dBm Q5.2) */
44 - u16 maxpwr_ah; /* 5.8GHz Amplifier Max Power (in dBm Q5.2) */
45 + u8 maxpwr_bg; /* 2.4GHz Amplifier Max Power (in dBm Q5.2) */
46 + u8 maxpwr_al; /* 5.2GHz Amplifier Max Power (in dBm Q5.2) */
47 + u8 maxpwr_a; /* 5.3GHz Amplifier Max Power (in dBm Q5.2) */
48 + u8 maxpwr_ah; /* 5.8GHz Amplifier Max Power (in dBm Q5.2) */
49 u8 itssi_a; /* Idle TSSI Target for A-PHY */
50 u8 itssi_bg; /* Idle TSSI Target for B/G-PHY */
51 u8 tri2g; /* 2.4GHz TX isolation */
52 @@ -67,8 +67,8 @@ struct ssb_sprom {
53 u8 txpid5gl[4]; /* 4.9 - 5.1GHz TX power index */
54 u8 txpid5g[4]; /* 5.1 - 5.5GHz TX power index */
55 u8 txpid5gh[4]; /* 5.5 - ...GHz TX power index */
56 - u8 rxpo2g; /* 2GHz RX power offset */
57 - u8 rxpo5g; /* 5GHz RX power offset */
58 + s8 rxpo2g; /* 2GHz RX power offset */
59 + s8 rxpo5g; /* 5GHz RX power offset */
60 u8 rssisav2g; /* 2GHz RSSI params */
61 u8 rssismc2g;
62 u8 rssismf2g;
63 @@ -95,10 +95,10 @@ struct ssb_sprom {
64 * loss in the connectors is bigger than the gain. */
65 struct {
66 struct {
67 - s8 a0, a1, a2, a3;
68 + u8 a0, a1, a2, a3;
69 } ghz24; /* 2.4GHz band */
70 struct {
71 - s8 a0, a1, a2, a3;
72 + u8 a0, a1, a2, a3;
73 } ghz5; /* 5GHz band */
74 } antenna_gain;
75
This page took 0.049662 seconds and 3 git commands to generate.