提交 424047e6 编写于 作者: M Michael Buesch 提交者: David S. Miller

b43: Add N-PHY register definitions

This patch adds all register definitions for the N-PHY.
This adds two new files: nphy.h and nphy.c
No functional changes to existing code.
Signed-off-by: NMichael Buesch <mb@bu3sch.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 9081728b
b43-y += main.o b43-y += main.o
b43-y += tables.o b43-y += tables.o
b43-y += phy.o b43-y += phy.o
b43-y += nphy.o
b43-y += sysfs.o b43-y += sysfs.o
b43-y += xmit.o b43-y += xmit.o
b43-y += lo.o b43-y += lo.o
......
/*
Broadcom B43 wireless driver
IEEE 802.11n PHY support
Copyright (c) 2008 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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "b43.h"
#include "nphy.h"
int b43_phy_initn(struct b43_wldev *dev)
{
b43err(dev->wl, "IEEE 802.11n devices are not supported, yet.\n");
return -EOPNOTSUPP;
}
此差异已折叠。
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "b43.h" #include "b43.h"
#include "phy.h" #include "phy.h"
#include "nphy.h"
#include "main.h" #include "main.h"
#include "tables.h" #include "tables.h"
#include "lo.h" #include "lo.h"
...@@ -1974,41 +1975,44 @@ int b43_phy_init_tssi2dbm_table(struct b43_wldev *dev) ...@@ -1974,41 +1975,44 @@ int b43_phy_init_tssi2dbm_table(struct b43_wldev *dev)
int b43_phy_init(struct b43_wldev *dev) int b43_phy_init(struct b43_wldev *dev)
{ {
struct b43_phy *phy = &dev->phy; struct b43_phy *phy = &dev->phy;
int err = -ENODEV; bool unsupported = 0;
int err = 0;
switch (phy->type) { switch (phy->type) {
case B43_PHYTYPE_A: case B43_PHYTYPE_A:
if (phy->rev == 2 || phy->rev == 3) { if (phy->rev == 2 || phy->rev == 3)
b43_phy_inita(dev); b43_phy_inita(dev);
err = 0; else
} unsupported = 1;
break; break;
case B43_PHYTYPE_B: case B43_PHYTYPE_B:
switch (phy->rev) { switch (phy->rev) {
case 2: case 2:
b43_phy_initb2(dev); b43_phy_initb2(dev);
err = 0;
break; break;
case 4: case 4:
b43_phy_initb4(dev); b43_phy_initb4(dev);
err = 0;
break; break;
case 5: case 5:
b43_phy_initb5(dev); b43_phy_initb5(dev);
err = 0;
break; break;
case 6: case 6:
b43_phy_initb6(dev); b43_phy_initb6(dev);
err = 0;
break; break;
default:
unsupported = 1;
} }
break; break;
case B43_PHYTYPE_G: case B43_PHYTYPE_G:
b43_phy_initg(dev); b43_phy_initg(dev);
err = 0;
break; break;
case B43_PHYTYPE_N:
err = b43_phy_initn(dev);
break;
default:
unsupported = 1;
} }
if (err) if (unsupported)
b43err(dev->wl, "Unknown PHYTYPE found\n"); b43err(dev->wl, "Unknown PHYTYPE found\n");
return err; return err;
......
...@@ -9,11 +9,14 @@ struct b43_phy; ...@@ -9,11 +9,14 @@ struct b43_phy;
/*** PHY Registers ***/ /*** PHY Registers ***/
/* Routing */ /* Routing */
#define B43_PHYROUTE_OFDM_GPHY 0x400 #define B43_PHYROUTE_OFDM_GPHY 0x0400 /* OFDM register routing for G-PHYs */
#define B43_PHYROUTE_EXT_GPHY 0x800 #define B43_PHYROUTE_EXT_GPHY 0x0800 /* Extended G-PHY registers */
#define B43_PHYROUTE_N_BMODE 0x3000 /* N-PHY BMODE registers */
/* Base registers. */ /* Base registers. */
#define B43_PHY_BASE(reg) (reg) #define B43_PHY_BASE(reg) (reg)
/* N-PHY registers. */
#define B43_PHY_N(reg) (reg)
/* OFDM (A) registers of a G-PHY */ /* OFDM (A) registers of a G-PHY */
#define B43_PHY_OFDM(reg) ((reg) | B43_PHYROUTE_OFDM_GPHY) #define B43_PHY_OFDM(reg) ((reg) | B43_PHYROUTE_OFDM_GPHY)
/* Extended G-PHY registers */ /* Extended G-PHY registers */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册