aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/hw.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@gmail.com>2008-01-04 02:21:05 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:09:40 -0500
commit132127e5057be70112bb974b8a3aaa0f7b14847f (patch)
tree8e5fc0ab1bb563db7d727b58849f59eedb8cef19 /drivers/net/wireless/ath5k/hw.c
parent4fd6931ebe24640bec72b91ba612325843a5e3cc (diff)
ath5k: Fix frame duration oops
This patch fixes an oops which was introduced as a regression by commit fd640775bd16e1df50c867cc547af0, on the patch titled, "mac80211: dont use interface indices in drivers". ieee80211_generic_frame_duration() now relies on sdata->flags which itself gets set upon bringing the interface up. We check for the virtual interface now before setting the rate duration registers. After the mode changes are introduced onto mac80211 we should revisit these changes. This patch was tested on the following cards: 1) BG card: Atheros AR5213A chip found (MAC: 0x59, PHY: 0x43) RF2112A 2GHz radio found (0x46) 2) ABG card: Atheros AR5213A chip found (MAC: 0x59,PHY: 0x43) RF5112A multiband radio found (0x36) Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/hw.c')
-rw-r--r--drivers/net/wireless/ath5k/hw.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index 3b9336387df0..eb00818e8ce6 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -734,8 +734,12 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode,
734 if (ret) 734 if (ret)
735 return ret; 735 return ret;
736 736
737 /* Write rate duration table */ 737 /* Write rate duration table only on AR5212 and if
738 if (ah->ah_version == AR5K_AR5212) 738 * virtual interface has already been brought up
739 * XXX: rethink this after new mode changes to
740 * mac80211 are integrated */
741 if (ah->ah_version == AR5K_AR5212 &&
742 ah->ah_sc->vif != NULL)
739 ath5k_hw_write_rate_duration(ah, driver_mode); 743 ath5k_hw_write_rate_duration(ah, driver_mode);
740 744
741 /* 745 /*