summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/nphy.h
diff options
context:
space:
mode:
authorMichael Buesch2008-08-27 18:53:02 +0200
committerJohn W. Linville2008-08-29 22:24:12 +0200
commitef1a628d83fc0423c36e773281162be790503168 (patch)
tree436d3d7d91434febb1813dcea16060e6937288b9 /drivers/net/wireless/b43/nphy.h
parentrt2x00: Release rt2x00 2.2.1 (diff)
downloadkernel-qcow2-linux-ef1a628d83fc0423c36e773281162be790503168.tar.gz
kernel-qcow2-linux-ef1a628d83fc0423c36e773281162be790503168.tar.xz
kernel-qcow2-linux-ef1a628d83fc0423c36e773281162be790503168.zip
b43: Implement dynamic PHY API
This patch implements a dynamic "ops" based PHY API. This is needed in order to conveniently support future PHY types to avoid the "switch"-hell. This patch does not change any functionality. It just moves lots of code from one place to another and adjusts it for the changed data structures. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/nphy.h')
-rw-r--r--drivers/net/wireless/b43/nphy.h54
1 files changed, 7 insertions, 47 deletions
diff --git a/drivers/net/wireless/b43/nphy.h b/drivers/net/wireless/b43/nphy.h
index faf46b9cbf1b..3d1f65ed2012 100644
--- a/drivers/net/wireless/b43/nphy.h
+++ b/drivers/net/wireless/b43/nphy.h
@@ -1,7 +1,7 @@
#ifndef B43_NPHY_H_
#define B43_NPHY_H_
-#include "phy.h"
+#include "phy_common.h"
/* N-PHY registers. */
@@ -919,54 +919,14 @@
struct b43_wldev;
+struct b43_phy_n {
+ bool initialised;
-#ifdef CONFIG_B43_NPHY
-/* N-PHY support enabled */
+ //TODO lots of missing stuff
+};
-int b43_phy_initn(struct b43_wldev *dev);
-void b43_nphy_radio_turn_on(struct b43_wldev *dev);
-void b43_nphy_radio_turn_off(struct b43_wldev *dev);
+struct b43_phy_operations;
+extern const struct b43_phy_operations b43_phyops_n;
-int b43_nphy_selectchannel(struct b43_wldev *dev, u8 channel);
-
-void b43_nphy_xmitpower(struct b43_wldev *dev);
-void b43_nphy_set_rxantenna(struct b43_wldev *dev, int antenna);
-
-
-#else /* CONFIG_B43_NPHY */
-/* N-PHY support disabled */
-
-
-static inline
-int b43_phy_initn(struct b43_wldev *dev)
-{
- return -EOPNOTSUPP;
-}
-
-static inline
-void b43_nphy_radio_turn_on(struct b43_wldev *dev)
-{
-}
-static inline
-void b43_nphy_radio_turn_off(struct b43_wldev *dev)
-{
-}
-
-static inline
-int b43_nphy_selectchannel(struct b43_wldev *dev, u8 channel)
-{
- return -ENOSYS;
-}
-
-static inline
-void b43_nphy_xmitpower(struct b43_wldev *dev)
-{
-}
-static inline
-void b43_nphy_set_rxantenna(struct b43_wldev *dev, int antenna)
-{
-}
-
-#endif /* CONFIG_B43_NPHY */
#endif /* B43_NPHY_H_ */