diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-01-24 13:23:18 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-28 15:42:00 -0500 |
commit | 9ac58615d93c8a28b1c649a90a5e2ede4dfd368a (patch) | |
tree | c17d665e6de3b05bc20d75af1c90d4d15e686e45 /drivers/net/wireless/ath/ath9k/pci.c | |
parent | 0cdd5c60e4538d02414144e0682941a4eb20ffa8 (diff) |
ath9k: fold struct ath_wiphy into struct ath_softc
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/pci.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 1f60b8c47d2f..e83128c50f7b 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -126,7 +126,6 @@ static const struct ath_bus_ops ath_pci_bus_ops = { | |||
126 | static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | 126 | static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
127 | { | 127 | { |
128 | void __iomem *mem; | 128 | void __iomem *mem; |
129 | struct ath_wiphy *aphy; | ||
130 | struct ath_softc *sc; | 129 | struct ath_softc *sc; |
131 | struct ieee80211_hw *hw; | 130 | struct ieee80211_hw *hw; |
132 | u8 csz; | 131 | u8 csz; |
@@ -198,8 +197,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
198 | goto err_iomap; | 197 | goto err_iomap; |
199 | } | 198 | } |
200 | 199 | ||
201 | hw = ieee80211_alloc_hw(sizeof(struct ath_wiphy) + | 200 | hw = ieee80211_alloc_hw(sizeof(struct ath_softc), &ath9k_ops); |
202 | sizeof(struct ath_softc), &ath9k_ops); | ||
203 | if (!hw) { | 201 | if (!hw) { |
204 | dev_err(&pdev->dev, "No memory for ieee80211_hw\n"); | 202 | dev_err(&pdev->dev, "No memory for ieee80211_hw\n"); |
205 | ret = -ENOMEM; | 203 | ret = -ENOMEM; |
@@ -209,10 +207,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
209 | SET_IEEE80211_DEV(hw, &pdev->dev); | 207 | SET_IEEE80211_DEV(hw, &pdev->dev); |
210 | pci_set_drvdata(pdev, hw); | 208 | pci_set_drvdata(pdev, hw); |
211 | 209 | ||
212 | aphy = hw->priv; | 210 | sc = hw->priv; |
213 | sc = (struct ath_softc *) (aphy + 1); | ||
214 | aphy->sc = sc; | ||
215 | aphy->hw = hw; | ||
216 | sc->hw = hw; | 211 | sc->hw = hw; |
217 | sc->dev = &pdev->dev; | 212 | sc->dev = &pdev->dev; |
218 | sc->mem = mem; | 213 | sc->mem = mem; |
@@ -259,8 +254,7 @@ err_dma: | |||
259 | static void ath_pci_remove(struct pci_dev *pdev) | 254 | static void ath_pci_remove(struct pci_dev *pdev) |
260 | { | 255 | { |
261 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); | 256 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); |
262 | struct ath_wiphy *aphy = hw->priv; | 257 | struct ath_softc *sc = hw->priv; |
263 | struct ath_softc *sc = aphy->sc; | ||
264 | void __iomem *mem = sc->mem; | 258 | void __iomem *mem = sc->mem; |
265 | 259 | ||
266 | if (!is_ath9k_unloaded) | 260 | if (!is_ath9k_unloaded) |
@@ -280,8 +274,7 @@ static int ath_pci_suspend(struct device *device) | |||
280 | { | 274 | { |
281 | struct pci_dev *pdev = to_pci_dev(device); | 275 | struct pci_dev *pdev = to_pci_dev(device); |
282 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); | 276 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); |
283 | struct ath_wiphy *aphy = hw->priv; | 277 | struct ath_softc *sc = hw->priv; |
284 | struct ath_softc *sc = aphy->sc; | ||
285 | 278 | ||
286 | ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1); | 279 | ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1); |
287 | 280 | ||
@@ -292,8 +285,7 @@ static int ath_pci_resume(struct device *device) | |||
292 | { | 285 | { |
293 | struct pci_dev *pdev = to_pci_dev(device); | 286 | struct pci_dev *pdev = to_pci_dev(device); |
294 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); | 287 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); |
295 | struct ath_wiphy *aphy = hw->priv; | 288 | struct ath_softc *sc = hw->priv; |
296 | struct ath_softc *sc = aphy->sc; | ||
297 | u32 val; | 289 | u32 val; |
298 | 290 | ||
299 | /* | 291 | /* |