Commit 424047e6 authored by Michael Buesch's avatar Michael Buesch Committed by 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: default avatarMichael Buesch <mb@bu3sch.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9081728b
b43-y += main.o
b43-y += tables.o
b43-y += phy.o
b43-y += nphy.o
b43-y += sysfs.o
b43-y += xmit.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;
}
This diff is collapsed.
......@@ -31,6 +31,7 @@
#include "b43.h"
#include "phy.h"
#include "nphy.h"
#include "main.h"
#include "tables.h"
#include "lo.h"
......@@ -1974,41 +1975,44 @@ int b43_phy_init_tssi2dbm_table(struct b43_wldev *dev)
int b43_phy_init(struct b43_wldev *dev)
{
struct b43_phy *phy = &dev->phy;
int err = -ENODEV;
bool unsupported = 0;
int err = 0;
switch (phy->type) {
case B43_PHYTYPE_A:
if (phy->rev == 2 || phy->rev == 3) {
if (phy->rev == 2 || phy->rev == 3)
b43_phy_inita(dev);
err = 0;
}
else
unsupported = 1;
break;
case B43_PHYTYPE_B:
switch (phy->rev) {
case 2:
b43_phy_initb2(dev);
err = 0;
break;
case 4:
b43_phy_initb4(dev);
err = 0;
break;
case 5:
b43_phy_initb5(dev);
err = 0;
break;
case 6:
b43_phy_initb6(dev);
err = 0;
break;
default:
unsupported = 1;
}
break;
case B43_PHYTYPE_G:
b43_phy_initg(dev);
err = 0;
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");
return err;
......
......@@ -9,11 +9,14 @@ struct b43_phy;
/*** PHY Registers ***/
/* Routing */
#define B43_PHYROUTE_OFDM_GPHY 0x400
#define B43_PHYROUTE_EXT_GPHY 0x800
#define B43_PHYROUTE_OFDM_GPHY 0x0400 /* OFDM register routing for G-PHYs */
#define B43_PHYROUTE_EXT_GPHY 0x0800 /* Extended G-PHY registers */
#define B43_PHYROUTE_N_BMODE 0x3000 /* N-PHY BMODE registers */
/* Base registers. */
#define B43_PHY_BASE(reg) (reg)
/* N-PHY registers. */
#define B43_PHY_N(reg) (reg)
/* OFDM (A) registers of a G-PHY */
#define B43_PHY_OFDM(reg) ((reg) | B43_PHYROUTE_OFDM_GPHY)
/* Extended G-PHY registers */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment