提交 c01f9c6f 编写于 作者: M Michael Buesch 提交者: John W. Linville

b43: Don't compile N-PHY code when N-PHY is disabled

There's no need to compile the N-PHY support code, when the
N-PHY support is disabled in Kconfig.
Signed-off-by: NMichael Buesch <mb@bu3sch.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 1ea87396
b43-y += main.o b43-y += main.o
b43-y += tables.o b43-y += tables.o
b43-y += tables_nphy.o b43-$(CONFIG_B43_NPHY) += tables_nphy.o
b43-y += phy.o b43-y += phy.o
b43-y += nphy.o b43-$(CONFIG_B43_NPHY) += 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
......
...@@ -919,6 +919,10 @@ ...@@ -919,6 +919,10 @@
struct b43_wldev; struct b43_wldev;
#ifdef CONFIG_B43_NPHY
/* N-PHY support enabled */
int b43_phy_initn(struct b43_wldev *dev); int b43_phy_initn(struct b43_wldev *dev);
void b43_nphy_radio_turn_on(struct b43_wldev *dev); void b43_nphy_radio_turn_on(struct b43_wldev *dev);
...@@ -929,4 +933,40 @@ int b43_nphy_selectchannel(struct b43_wldev *dev, u8 channel); ...@@ -929,4 +933,40 @@ int b43_nphy_selectchannel(struct b43_wldev *dev, u8 channel);
void b43_nphy_xmitpower(struct b43_wldev *dev); void b43_nphy_xmitpower(struct b43_wldev *dev);
void b43_nphy_set_rxantenna(struct b43_wldev *dev, int antenna); 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_ */ #endif /* B43_NPHY_H_ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册