projects
/
b43-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
b43-fwcutter: Use another source file
[b43-tools.git]
/
ssb_sprom
/
ssb_sprom.c
diff --git
a/ssb_sprom/ssb_sprom.c
b/ssb_sprom/ssb_sprom.c
index a9080a20482556e4284a36b89345d907814af0eb..10952775eec72e68028ebed4acd0c9e92efda88f 100644
(file)
--- a/
ssb_sprom/ssb_sprom.c
+++ b/
ssb_sprom/ssb_sprom.c
@@
-2,7
+2,7
@@
Broadcom Sonics Silicon Backplane bus SPROM data modification tool
Broadcom Sonics Silicon Backplane bus SPROM data modification tool
- Copyright (c) 2006-200
7
Michael Buesch <mb@bu3sch.de>
+ Copyright (c) 2006-200
8
Michael Buesch <mb@bu3sch.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-293,10
+293,16
@@
static int modify_value(uint8_t *sprom,
sprom[SPROM_BOARDREV + 1] |= (1 << 5);
break;
case VALUE_ANTGA:
sprom[SPROM_BOARDREV + 1] |= (1 << 5);
break;
case VALUE_ANTGA:
- sprom[SPROM_ANTENNA_GAIN + 0] = (v & 0xFF);
+ if (sprom_rev != 4)
+ sprom[SPROM_ANTENNA_GAIN + 1] = (v & 0xFF);
+ else
+ sprom[SPROM4_ANTENNA_GAIN + 1] = (v & 0xFF);
break;
case VALUE_ANTGBG:
break;
case VALUE_ANTGBG:
- sprom[SPROM_ANTENNA_GAIN + 1] = (v & 0xFF);
+ if (sprom_rev != 4)
+ sprom[SPROM_ANTENNA_GAIN] = (v & 0xFF);
+ else
+ sprom[SPROM4_ANTENNA_GAIN] = (v & 0xFF);
break;
case VALUE_PA0B0:
sprom[SPROM_PA0B0 + 0] = (v & 0x00FF);
break;
case VALUE_PA0B0:
sprom[SPROM_PA0B0 + 0] = (v & 0x00FF);
@@
-574,7
+580,7
@@
static void display_value(const uint8_t *sprom,
case VALUE_ANTGA:
if (sprom_rev != 4) {
desc = "A PHY antenna gain";
case VALUE_ANTGA:
if (sprom_rev != 4) {
desc = "A PHY antenna gain";
- offset = SPROM_ANTENNA_GAIN
+ 1
;
+ offset = SPROM_ANTENNA_GAIN;
} else {
desc = "Antenna 1 Gain";
offset = SPROM4_ANTENNA_GAIN;
} else {
desc = "Antenna 1 Gain";
offset = SPROM4_ANTENNA_GAIN;
@@
-912,7
+918,12
@@
static int open_outfile(int *fd)
static void print_banner(int forceprint)
{
static void print_banner(int forceprint)
{
- const char *str = "Broadcom-SSB SPROM data modification tool version " VERSION "\n";
+ const char *str = "Broadcom-SSB SPROM data modification tool.\n"
+ "\n"
+ "Copyright (C) Michael Buesch\n"
+ "Licensed under the GNU/GPL version 2 or later\n"
+ "\n"
+ "DO NOT USE THIS TOOL. YOU WILL BRICK YOUR DEVICE.\n";
if (forceprint)
prdata(str);
else
if (forceprint)
prdata(str);
else