Ticket #201: madwifi-suspend-initkeytable.2.diff
| File madwifi-suspend-initkeytable.2.diff, 2.5 kB (added by dns@somacoma.net, 5 years ago) |
|---|
-
ath/if_ath.c
old new 123 123 124 124 static int ath_stop_locked(struct net_device *); 125 125 static int ath_stop(struct net_device *); 126 #if 0127 126 static void ath_initkeytable(struct ath_softc *); 128 #endif129 127 static int ath_key_alloc(struct ieee80211vap *, const struct ieee80211_key *); 130 128 static int ath_key_delete(struct ieee80211vap *, const struct ieee80211_key *, 131 129 struct ieee80211_node *); … … 1307 1305 struct ath_softc *sc = dev->priv; 1308 1306 1309 1307 DPRINTF(sc, ATH_DEBUG_ANY, "%s: flags %x\n", __func__, dev->flags); 1310 ath_stop(dev);1308 /* ath_stop(dev); */ 1311 1309 } 1312 1310 1313 1311 void … … 1316 1314 struct ath_softc *sc = dev->priv; 1317 1315 1318 1316 DPRINTF(sc, ATH_DEBUG_ANY, "%s: flags %x\n", __func__, dev->flags); 1319 ath_init(dev); 1317 /* ath_init(dev); */ 1318 ath_reset(dev); 1319 ath_initkeytable(sc); 1320 1320 } 1321 1321 1322 1322 void … … 1917 1917 * in the frame output path; there's nothing to do 1918 1918 * here except setup the interrupt mask. 1919 1919 */ 1920 #if 0 1921 ath_initkeytable(sc); /* XXX still needed? */ 1922 #endif 1920 ath_initkeytable(sc); 1921 1923 1922 if (ath_startrecv(sc) != 0) { 1924 1923 printk("%s: unable to start recv logic\n", dev->name); 1925 1924 error = -EIO; … … 1957 1956 return error; 1958 1957 } 1959 1958 1959 static void 1960 ath_initkeytable(struct ath_softc *sc) 1961 { 1962 struct ieee80211com *ic = &sc->sc_ic; 1963 struct ieee80211vap *vap; 1964 struct ath_hal *ah = sc->sc_ah; 1965 int i; 1966 1967 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { 1968 for (i = 0; i < IEEE80211_WEP_NKID; i++) { 1969 struct ieee80211_key *k = &vap->iv_nw_keys[i]; 1970 1971 if (k->wk_keylen == 0) 1972 ath_hal_keyreset(ah, i); 1973 else 1974 ath_key_set(vap, k, vap->iv_bss->ni_macaddr); 1975 } 1976 } 1977 } 1978 1960 1979 /* Caller must lock ATH_LOCK 1961 1980 * 1962 1981 * Context: softIRQ
