diff options
author | Michael Buesch <mb@bu3sch.de> | 2008-08-27 12:53:02 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-29 16:24:12 -0400 |
commit | ef1a628d83fc0423c36e773281162be790503168 (patch) | |
tree | 436d3d7d91434febb1813dcea16060e6937288b9 /drivers/net/wireless/b43/nphy.h | |
parent | 35e032d82f3e2a9b0d92077b4fbc97166525ed53 (diff) |
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.h | 54 |
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 @@ | |||
1 | #ifndef B43_NPHY_H_ | 1 | #ifndef B43_NPHY_H_ |
2 | #define B43_NPHY_H_ | 2 | #define B43_NPHY_H_ |
3 | 3 | ||
4 | #include "phy.h" | 4 | #include "phy_common.h" |
5 | 5 | ||
6 | 6 | ||
7 | /* N-PHY registers. */ | 7 | /* N-PHY registers. */ |
@@ -919,54 +919,14 @@ | |||
919 | 919 | ||
920 | struct b43_wldev; | 920 | struct b43_wldev; |
921 | 921 | ||
922 | struct b43_phy_n { | ||
923 | bool initialised; | ||
922 | 924 | ||
923 | #ifdef CONFIG_B43_NPHY | 925 | //TODO lots of missing stuff |
924 | /* N-PHY support enabled */ | 926 | }; |
925 | 927 | ||
926 | int b43_phy_initn(struct b43_wldev *dev); | ||
927 | 928 | ||
928 | void b43_nphy_radio_turn_on(struct b43_wldev *dev); | 929 | struct b43_phy_operations; |
929 | void b43_nphy_radio_turn_off(struct b43_wldev *dev); | 930 | extern const struct b43_phy_operations b43_phyops_n; |
930 | 931 | ||
931 | int b43_nphy_selectchannel(struct b43_wldev *dev, u8 channel); | ||
932 | |||
933 | void b43_nphy_xmitpower(struct b43_wldev *dev); | ||
934 | void b43_nphy_set_rxantenna(struct b43_wldev *dev, int antenna); | ||
935 | |||
936 | |||
937 | #else /* CONFIG_B43_NPHY */ | ||
938 | /* N-PHY support disabled */ | ||
939 | |||
940 | |||
941 | static inline | ||
942 | int b43_phy_initn(struct b43_wldev *dev) | ||
943 | { | ||
944 | return -EOPNOTSUPP; | ||
945 | } | ||
946 | |||
947 | static inline | ||
948 | void b43_nphy_radio_turn_on(struct b43_wldev *dev) | ||
949 | { | ||
950 | } | ||
951 | static inline | ||
952 | void b43_nphy_radio_turn_off(struct b43_wldev *dev) | ||
953 | { | ||
954 | } | ||
955 | |||
956 | static inline | ||
957 | int b43_nphy_selectchannel(struct b43_wldev *dev, u8 channel) | ||
958 | { | ||
959 | return -ENOSYS; | ||
960 | } | ||
961 | |||
962 | static inline | ||
963 | void b43_nphy_xmitpower(struct b43_wldev *dev) | ||
964 | { | ||
965 | } | ||
966 | static inline | ||
967 | void b43_nphy_set_rxantenna(struct b43_wldev *dev, int antenna) | ||
968 | { | ||
969 | } | ||
970 | |||
971 | #endif /* CONFIG_B43_NPHY */ | ||
972 | #endif /* B43_NPHY_H_ */ | 932 | #endif /* B43_NPHY_H_ */ |