ath9k: Add data structure for supporting virtual radio/wiphy operation

This is the initial step in allowing ath9k to register multiple
virtual radios (wiphys). The goal of virtual radios is to allow the
same radio to be shared for multiple virtual interfaces that may
operate on different channels. The mac80211 virtual interface support
is designed only for single channel operation and as such, it is not
suitable for this type of use. Anyway, it can be used on top of the
virtual radio concept, if desired (e.g., use two virtual radios to
handle two channels and then add multiple mac80211 virtual interfaces
on top of each virtual radio).

The new struct ath_wiphy is now registered as the driver data
structure for wiphy. This structure has a pointer to the shared (among
virtual wiphys of the same physical radio) struct ath_softc data. The
primary wiphy maintains the allocated memory for ath_softc. Secondary
(virtual) wiphys will only allocate the new ath_wiphy structure.

Registration of secondary wiphys is added in a separate patch.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Jouni Malinen
2009-03-03 19:23:28 +02:00
committed by John W. Linville
parent 8ca21f0185
commit bce048d77d
8 changed files with 88 additions and 36 deletions

View File

@@ -38,7 +38,8 @@ static void ath9k_vif_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
void ath9k_set_bssid_mask(struct ieee80211_hw *hw)
{
struct ath_softc *sc = hw->priv;
struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc;
struct ath9k_vif_iter_data iter_data;
int i, j;
u8 mask[ETH_ALEN];