diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/pci.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/pci.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath/ath5k/pci.c b/drivers/net/wireless/ath/ath5k/pci.c index aac5b7831948..eaf79b49341e 100644 --- a/drivers/net/wireless/ath/ath5k/pci.c +++ b/drivers/net/wireless/ath/ath5k/pci.c | |||
@@ -51,10 +51,10 @@ MODULE_DEVICE_TABLE(pci, ath5k_pci_id_table); | |||
51 | /* return bus cachesize in 4B word units */ | 51 | /* return bus cachesize in 4B word units */ |
52 | static void ath5k_pci_read_cachesize(struct ath_common *common, int *csz) | 52 | static void ath5k_pci_read_cachesize(struct ath_common *common, int *csz) |
53 | { | 53 | { |
54 | struct ath5k_softc *sc = (struct ath5k_softc *) common->priv; | 54 | struct ath5k_hw *ah = (struct ath5k_hw *) common->priv; |
55 | u8 u8tmp; | 55 | u8 u8tmp; |
56 | 56 | ||
57 | pci_read_config_byte(sc->pdev, PCI_CACHE_LINE_SIZE, &u8tmp); | 57 | pci_read_config_byte(ah->pdev, PCI_CACHE_LINE_SIZE, &u8tmp); |
58 | *csz = (int)u8tmp; | 58 | *csz = (int)u8tmp; |
59 | 59 | ||
60 | /* | 60 | /* |
@@ -156,7 +156,7 @@ ath5k_pci_probe(struct pci_dev *pdev, | |||
156 | const struct pci_device_id *id) | 156 | const struct pci_device_id *id) |
157 | { | 157 | { |
158 | void __iomem *mem; | 158 | void __iomem *mem; |
159 | struct ath5k_softc *sc; | 159 | struct ath5k_hw *ah; |
160 | struct ieee80211_hw *hw; | 160 | struct ieee80211_hw *hw; |
161 | int ret; | 161 | int ret; |
162 | u8 csz; | 162 | u8 csz; |
@@ -243,7 +243,7 @@ ath5k_pci_probe(struct pci_dev *pdev, | |||
243 | * Allocate hw (mac80211 main struct) | 243 | * Allocate hw (mac80211 main struct) |
244 | * and hw->priv (driver private data) | 244 | * and hw->priv (driver private data) |
245 | */ | 245 | */ |
246 | hw = ieee80211_alloc_hw(sizeof(*sc), &ath5k_hw_ops); | 246 | hw = ieee80211_alloc_hw(sizeof(*ah), &ath5k_hw_ops); |
247 | if (hw == NULL) { | 247 | if (hw == NULL) { |
248 | dev_err(&pdev->dev, "cannot allocate ieee80211_hw\n"); | 248 | dev_err(&pdev->dev, "cannot allocate ieee80211_hw\n"); |
249 | ret = -ENOMEM; | 249 | ret = -ENOMEM; |
@@ -252,16 +252,16 @@ ath5k_pci_probe(struct pci_dev *pdev, | |||
252 | 252 | ||
253 | dev_info(&pdev->dev, "registered as '%s'\n", wiphy_name(hw->wiphy)); | 253 | dev_info(&pdev->dev, "registered as '%s'\n", wiphy_name(hw->wiphy)); |
254 | 254 | ||
255 | sc = hw->priv; | 255 | ah = hw->priv; |
256 | sc->hw = hw; | 256 | ah->hw = hw; |
257 | sc->pdev = pdev; | 257 | ah->pdev = pdev; |
258 | sc->dev = &pdev->dev; | 258 | ah->dev = &pdev->dev; |
259 | sc->irq = pdev->irq; | 259 | ah->irq = pdev->irq; |
260 | sc->devid = id->device; | 260 | ah->devid = id->device; |
261 | sc->iobase = mem; /* So we can unmap it on detach */ | 261 | ah->iobase = mem; /* So we can unmap it on detach */ |
262 | 262 | ||
263 | /* Initialize */ | 263 | /* Initialize */ |
264 | ret = ath5k_init_softc(sc, &ath_pci_bus_ops); | 264 | ret = ath5k_init_softc(ah, &ath_pci_bus_ops); |
265 | if (ret) | 265 | if (ret) |
266 | goto err_free; | 266 | goto err_free; |
267 | 267 | ||
@@ -285,10 +285,10 @@ static void __devexit | |||
285 | ath5k_pci_remove(struct pci_dev *pdev) | 285 | ath5k_pci_remove(struct pci_dev *pdev) |
286 | { | 286 | { |
287 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); | 287 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); |
288 | struct ath5k_softc *sc = hw->priv; | 288 | struct ath5k_hw *ah = hw->priv; |
289 | 289 | ||
290 | ath5k_deinit_softc(sc); | 290 | ath5k_deinit_softc(ah); |
291 | pci_iounmap(pdev, sc->iobase); | 291 | pci_iounmap(pdev, ah->iobase); |
292 | pci_release_region(pdev, 0); | 292 | pci_release_region(pdev, 0); |
293 | pci_disable_device(pdev); | 293 | pci_disable_device(pdev); |
294 | ieee80211_free_hw(hw); | 294 | ieee80211_free_hw(hw); |
@@ -299,9 +299,9 @@ static int ath5k_pci_suspend(struct device *dev) | |||
299 | { | 299 | { |
300 | struct pci_dev *pdev = to_pci_dev(dev); | 300 | struct pci_dev *pdev = to_pci_dev(dev); |
301 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); | 301 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); |
302 | struct ath5k_softc *sc = hw->priv; | 302 | struct ath5k_hw *ah = hw->priv; |
303 | 303 | ||
304 | ath5k_led_off(sc); | 304 | ath5k_led_off(ah); |
305 | return 0; | 305 | return 0; |
306 | } | 306 | } |
307 | 307 | ||
@@ -309,7 +309,7 @@ static int ath5k_pci_resume(struct device *dev) | |||
309 | { | 309 | { |
310 | struct pci_dev *pdev = to_pci_dev(dev); | 310 | struct pci_dev *pdev = to_pci_dev(dev); |
311 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); | 311 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); |
312 | struct ath5k_softc *sc = hw->priv; | 312 | struct ath5k_hw *ah = hw->priv; |
313 | 313 | ||
314 | /* | 314 | /* |
315 | * Suspend/Resume resets the PCI configuration space, so we have to | 315 | * Suspend/Resume resets the PCI configuration space, so we have to |
@@ -318,7 +318,7 @@ static int ath5k_pci_resume(struct device *dev) | |||
318 | */ | 318 | */ |
319 | pci_write_config_byte(pdev, 0x41, 0); | 319 | pci_write_config_byte(pdev, 0x41, 0); |
320 | 320 | ||
321 | ath5k_led_enable(sc); | 321 | ath5k_led_enable(ah); |
322 | return 0; | 322 | return 0; |
323 | } | 323 | } |
324 | 324 | ||