aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ath9k.h
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2011-01-15 14:13:48 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-19 11:36:11 -0500
commit4801416c76a3a355076d6d371c00270dfe332e1c (patch)
treee445749a5c5549e1f919e0a9a3f2d5956ae699b5 /drivers/net/wireless/ath/ath9k/ath9k.h
parentf0b8220c64242e19f41ad1b4eec3225d53715cbe (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.h23
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 {
560struct ath_wiphy; 560struct ath_wiphy;
561struct ath_rate_table; 561struct ath_rate_table;
562 562
563struct 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
563struct ath_softc { 577struct 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,
683void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw); 697void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw);
684void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw); 698void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw);
685bool ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode); 699bool ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode);
700bool ath9k_uses_beacons(int type);
686 701
687#ifdef CONFIG_PCI 702#ifdef CONFIG_PCI
688int ath_pci_init(void); 703int ath_pci_init(void);
@@ -727,5 +742,9 @@ bool ath_mac80211_start_queue(struct ath_softc *sc, u16 skb_queue);
727 742
728void ath_start_rfkill_poll(struct ath_softc *sc); 743void ath_start_rfkill_poll(struct ath_softc *sc);
729extern void ath9k_rfkill_poll_state(struct ieee80211_hw *hw); 744extern void ath9k_rfkill_poll_state(struct ieee80211_hw *hw);
745void 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 */