aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_n.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43/phy_n.c')
-rw-r--r--drivers/net/wireless/b43/phy_n.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 8162fd7792ff..617724dc6aa8 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -499,35 +499,31 @@ static int b43_nphy_op_allocate(struct b43_wldev *dev)
499 return -ENOMEM; 499 return -ENOMEM;
500 dev->phy.n = nphy; 500 dev->phy.n = nphy;
501 501
502 //TODO init struct b43_phy_n
503
504 return 0; 502 return 0;
505} 503}
506 504
507static int b43_nphy_op_init(struct b43_wldev *dev) 505static void b43_nphy_op_prepare_structs(struct b43_wldev *dev)
508{ 506{
509 struct b43_phy_n *nphy = dev->phy.n; 507 struct b43_phy *phy = &dev->phy;
510 int err; 508 struct b43_phy_n *nphy = phy->n;
511 509
512 err = b43_phy_initn(dev); 510 memset(nphy, 0, sizeof(*nphy));
513 if (err)
514 return err;
515 nphy->initialised = 1;
516 511
517 return 0; 512 //TODO init struct b43_phy_n
518} 513}
519 514
520static void b43_nphy_op_exit(struct b43_wldev *dev) 515static void b43_nphy_op_free(struct b43_wldev *dev)
521{ 516{
522 struct b43_phy_n *nphy = dev->phy.n; 517 struct b43_phy *phy = &dev->phy;
518 struct b43_phy_n *nphy = phy->n;
523 519
524 if (nphy->initialised) {
525 //TODO
526 nphy->initialised = 0;
527 }
528 //TODO
529 kfree(nphy); 520 kfree(nphy);
530 dev->phy.n = NULL; 521 phy->n = NULL;
522}
523
524static int b43_nphy_op_init(struct b43_wldev *dev)
525{
526 return b43_phy_initn(dev);
531} 527}
532 528
533static inline void check_phyreg(struct b43_wldev *dev, u16 offset) 529static inline void check_phyreg(struct b43_wldev *dev, u16 offset)
@@ -610,8 +606,9 @@ static unsigned int b43_nphy_op_get_default_chan(struct b43_wldev *dev)
610 606
611const struct b43_phy_operations b43_phyops_n = { 607const struct b43_phy_operations b43_phyops_n = {
612 .allocate = b43_nphy_op_allocate, 608 .allocate = b43_nphy_op_allocate,
609 .free = b43_nphy_op_free,
610 .prepare_structs = b43_nphy_op_prepare_structs,
613 .init = b43_nphy_op_init, 611 .init = b43_nphy_op_init,
614 .exit = b43_nphy_op_exit,
615 .phy_read = b43_nphy_op_read, 612 .phy_read = b43_nphy_op_read,
616 .phy_write = b43_nphy_op_write, 613 .phy_write = b43_nphy_op_write,
617 .radio_read = b43_nphy_op_radio_read, 614 .radio_read = b43_nphy_op_radio_read,