aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/main.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-01-28 17:47:41 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:09:50 -0500
commiteb189d8bc9824bcb2187ffdab27d77ab469264c3 (patch)
tree612c6549f0d0261087b55b157dd5ca016386ddee /drivers/net/wireless/b43/main.c
parent243dcfcc1d4b33aa610f1bf3ec610dafdf4d7ff7 (diff)
b43: Add support for new firmware
This patch adds support for new firmware. Old firmware is still supported until July 2008. To get new firmware, go to ftp://ftp.linksys.com/opensourcecode/wrt150nv11/1.51.3/ and download the tarball. We don't have a smaller tarball, yet. That will be fixed later. You can extract firmware out of the "wl_ap.o" file contained in this tarball using latest fwcutter. You must pass the option --unsupported to fwcutter. Fwcutter-010 with official support for a new firmware image will be released soon. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r--drivers/net/wireless/b43/main.c50
1 files changed, 36 insertions, 14 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 481bc8238e7c..560d1421e679 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -1569,11 +1569,17 @@ static void b43_release_firmware(struct b43_wldev *dev)
1569 dev->fw.initvals_band = NULL; 1569 dev->fw.initvals_band = NULL;
1570} 1570}
1571 1571
1572static void b43_print_fw_helptext(struct b43_wl *wl) 1572static void b43_print_fw_helptext(struct b43_wl *wl, bool error)
1573{ 1573{
1574 b43err(wl, "You must go to " 1574 const char *text;
1575
1576 text = "You must go to "
1575 "http://linuxwireless.org/en/users/Drivers/b43#devicefirmware " 1577 "http://linuxwireless.org/en/users/Drivers/b43#devicefirmware "
1576 "and download the correct firmware (version 4).\n"); 1578 "and download the latest firmware (version 4).\n";
1579 if (error)
1580 b43err(wl, text);
1581 else
1582 b43warn(wl, text);
1577} 1583}
1578 1584
1579static int do_request_fw(struct b43_wldev *dev, 1585static int do_request_fw(struct b43_wldev *dev,
@@ -1725,7 +1731,7 @@ static int b43_request_firmware(struct b43_wldev *dev)
1725 return 0; 1731 return 0;
1726 1732
1727err_load: 1733err_load:
1728 b43_print_fw_helptext(dev->wl); 1734 b43_print_fw_helptext(dev->wl, 1);
1729 goto error; 1735 goto error;
1730 1736
1731err_no_ucode: 1737err_no_ucode:
@@ -1795,7 +1801,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
1795 i++; 1801 i++;
1796 if (i >= 50) { 1802 if (i >= 50) {
1797 b43err(dev->wl, "Microcode not responding\n"); 1803 b43err(dev->wl, "Microcode not responding\n");
1798 b43_print_fw_helptext(dev->wl); 1804 b43_print_fw_helptext(dev->wl, 1);
1799 err = -ENODEV; 1805 err = -ENODEV;
1800 goto out; 1806 goto out;
1801 } 1807 }
@@ -1813,7 +1819,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
1813 b43err(dev->wl, "YOUR FIRMWARE IS TOO OLD. Firmware from " 1819 b43err(dev->wl, "YOUR FIRMWARE IS TOO OLD. Firmware from "
1814 "binary drivers older than version 4.x is unsupported. " 1820 "binary drivers older than version 4.x is unsupported. "
1815 "You must upgrade your firmware files.\n"); 1821 "You must upgrade your firmware files.\n");
1816 b43_print_fw_helptext(dev->wl); 1822 b43_print_fw_helptext(dev->wl, 1);
1817 b43_write32(dev, B43_MMIO_MACCTL, 0); 1823 b43_write32(dev, B43_MMIO_MACCTL, 0);
1818 err = -EOPNOTSUPP; 1824 err = -EOPNOTSUPP;
1819 goto out; 1825 goto out;
@@ -1827,7 +1833,13 @@ static int b43_upload_microcode(struct b43_wldev *dev)
1827 dev->fw.rev = fwrev; 1833 dev->fw.rev = fwrev;
1828 dev->fw.patch = fwpatch; 1834 dev->fw.patch = fwpatch;
1829 1835
1830 out: 1836 if (b43_is_old_txhdr_format(dev)) {
1837 b43warn(dev->wl, "You are using an old firmware image. "
1838 "Support for old firmware will be removed in July 2008.\n");
1839 b43_print_fw_helptext(dev->wl, 0);
1840 }
1841
1842out:
1831 return err; 1843 return err;
1832} 1844}
1833 1845
@@ -1887,7 +1899,7 @@ static int b43_write_initvals(struct b43_wldev *dev,
1887 1899
1888err_format: 1900err_format:
1889 b43err(dev->wl, "Initial Values Firmware file-format error.\n"); 1901 b43err(dev->wl, "Initial Values Firmware file-format error.\n");
1890 b43_print_fw_helptext(dev->wl); 1902 b43_print_fw_helptext(dev->wl, 1);
1891 1903
1892 return -EPROTO; 1904 return -EPROTO;
1893} 1905}
@@ -2149,13 +2161,19 @@ static void b43_mgmtframe_txantenna(struct b43_wldev *dev, int antenna)
2149 2161
2150 switch (antenna) { 2162 switch (antenna) {
2151 case B43_ANTENNA0: 2163 case B43_ANTENNA0:
2152 ant |= B43_TX4_PHY_ANT0; 2164 ant |= B43_TXH_PHY_ANT0;
2153 break; 2165 break;
2154 case B43_ANTENNA1: 2166 case B43_ANTENNA1:
2155 ant |= B43_TX4_PHY_ANT1; 2167 ant |= B43_TXH_PHY_ANT1;
2168 break;
2169 case B43_ANTENNA2:
2170 ant |= B43_TXH_PHY_ANT2;
2171 break;
2172 case B43_ANTENNA3:
2173 ant |= B43_TXH_PHY_ANT3;
2156 break; 2174 break;
2157 case B43_ANTENNA_AUTO: 2175 case B43_ANTENNA_AUTO:
2158 ant |= B43_TX4_PHY_ANTLAST; 2176 ant |= B43_TXH_PHY_ANT01AUTO;
2159 break; 2177 break;
2160 default: 2178 default:
2161 B43_WARN_ON(1); 2179 B43_WARN_ON(1);
@@ -2165,15 +2183,15 @@ static void b43_mgmtframe_txantenna(struct b43_wldev *dev, int antenna)
2165 2183
2166 /* For Beacons */ 2184 /* For Beacons */
2167 tmp = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL); 2185 tmp = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL);
2168 tmp = (tmp & ~B43_TX4_PHY_ANT) | ant; 2186 tmp = (tmp & ~B43_TXH_PHY_ANT) | ant;
2169 b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL, tmp); 2187 b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL, tmp);
2170 /* For ACK/CTS */ 2188 /* For ACK/CTS */
2171 tmp = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_ACKCTSPHYCTL); 2189 tmp = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_ACKCTSPHYCTL);
2172 tmp = (tmp & ~B43_TX4_PHY_ANT) | ant; 2190 tmp = (tmp & ~B43_TXH_PHY_ANT) | ant;
2173 b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_ACKCTSPHYCTL, tmp); 2191 b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_ACKCTSPHYCTL, tmp);
2174 /* For Probe Resposes */ 2192 /* For Probe Resposes */
2175 tmp = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_PRPHYCTL); 2193 tmp = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_PRPHYCTL);
2176 tmp = (tmp & ~B43_TX4_PHY_ANT) | ant; 2194 tmp = (tmp & ~B43_TXH_PHY_ANT) | ant;
2177 b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_PRPHYCTL, tmp); 2195 b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_PRPHYCTL, tmp);
2178} 2196}
2179 2197
@@ -2738,6 +2756,10 @@ static int b43_antenna_from_ieee80211(struct b43_wldev *dev, u8 antenna)
2738 return B43_ANTENNA0; 2756 return B43_ANTENNA0;
2739 case 2: /* Antenna 1 */ 2757 case 2: /* Antenna 1 */
2740 return B43_ANTENNA1; 2758 return B43_ANTENNA1;
2759 case 3: /* Antenna 2 */
2760 return B43_ANTENNA2;
2761 case 4: /* Antenna 3 */
2762 return B43_ANTENNA3;
2741 default: 2763 default:
2742 return B43_ANTENNA_DEFAULT; 2764 return B43_ANTENNA_DEFAULT;
2743 } 2765 }