diff options
author | Ben Greear <greearb@candelatech.com> | 2011-01-15 14:13:48 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-19 11:36:11 -0500 |
commit | 4801416c76a3a355076d6d371c00270dfe332e1c (patch) | |
tree | e445749a5c5549e1f919e0a9a3f2d5956ae699b5 /drivers/net/wireless/ath/ath9k/ath9k.h | |
parent | f0b8220c64242e19f41ad1b4eec3225d53715cbe (diff) |
ath9k: Fix up hardware mode and beacons with multiple vifs.
When using a mixture of AP and Station interfaces,
the hardware mode was using the type of the
last VIF registered. Instead, we should keep track
of the number of different types of vifs and set the
mode accordingly.
In addtion, use the vif type instead of hardware opmode
when dealing with beacons.
Attempt to move some of the common setup code into smaller
methods so we can re-use it when changing vif mode as
well as adding/deleting vifs.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ath9k.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 3681caf54282..6e22135a96ac 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -560,6 +560,20 @@ struct ath_ant_comb { | |||
560 | struct ath_wiphy; | 560 | struct ath_wiphy; |
561 | struct ath_rate_table; | 561 | struct ath_rate_table; |
562 | 562 | ||
563 | struct ath9k_vif_iter_data { | ||
564 | const u8 *hw_macaddr; /* phy's hardware address, set | ||
565 | * before starting iteration for | ||
566 | * valid bssid mask. | ||
567 | */ | ||
568 | u8 mask[ETH_ALEN]; /* bssid mask */ | ||
569 | int naps; /* number of AP vifs */ | ||
570 | int nmeshes; /* number of mesh vifs */ | ||
571 | int nstations; /* number of station vifs */ | ||
572 | int nwds; /* number of nwd vifs */ | ||
573 | int nadhocs; /* number of adhoc vifs */ | ||
574 | int nothers; /* number of vifs not specified above. */ | ||
575 | }; | ||
576 | |||
563 | struct ath_softc { | 577 | struct ath_softc { |
564 | struct ieee80211_hw *hw; | 578 | struct ieee80211_hw *hw; |
565 | struct device *dev; | 579 | struct device *dev; |
@@ -599,10 +613,10 @@ struct ath_softc { | |||
599 | u32 sc_flags; /* SC_OP_* */ | 613 | u32 sc_flags; /* SC_OP_* */ |
600 | u16 ps_flags; /* PS_* */ | 614 | u16 ps_flags; /* PS_* */ |
601 | u16 curtxpow; | 615 | u16 curtxpow; |
602 | u8 nbcnvifs; | ||
603 | u16 nvifs; | ||
604 | bool ps_enabled; | 616 | bool ps_enabled; |
605 | bool ps_idle; | 617 | bool ps_idle; |
618 | short nbcnvifs; | ||
619 | short nvifs; | ||
606 | unsigned long ps_usecount; | 620 | unsigned long ps_usecount; |
607 | 621 | ||
608 | struct ath_config config; | 622 | struct ath_config config; |
@@ -683,6 +697,7 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, | |||
683 | void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw); | 697 | void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw); |
684 | void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw); | 698 | void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw); |
685 | bool ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode); | 699 | bool ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode); |
700 | bool ath9k_uses_beacons(int type); | ||
686 | 701 | ||
687 | #ifdef CONFIG_PCI | 702 | #ifdef CONFIG_PCI |
688 | int ath_pci_init(void); | 703 | int ath_pci_init(void); |
@@ -727,5 +742,9 @@ bool ath_mac80211_start_queue(struct ath_softc *sc, u16 skb_queue); | |||
727 | 742 | ||
728 | void ath_start_rfkill_poll(struct ath_softc *sc); | 743 | void ath_start_rfkill_poll(struct ath_softc *sc); |
729 | extern void ath9k_rfkill_poll_state(struct ieee80211_hw *hw); | 744 | extern void ath9k_rfkill_poll_state(struct ieee80211_hw *hw); |
745 | void ath9k_calculate_iter_data(struct ieee80211_hw *hw, | ||
746 | struct ieee80211_vif *vif, | ||
747 | struct ath9k_vif_iter_data *iter_data); | ||
748 | |||
730 | 749 | ||
731 | #endif /* ATH9K_H */ | 750 | #endif /* ATH9K_H */ |