Allow setting mac80211 interface into ad-hoc mode (#3247)
[openwrt.git] / package / madwifi / patches / 332-reset_beacons.patch
1 Index: madwifi-trunk-r3314/ath/if_ath.c
2 ===================================================================
3 --- madwifi-trunk-r3314.orig/ath/if_ath.c 2008-02-20 22:22:50.203268987 +0100
4 +++ madwifi-trunk-r3314/ath/if_ath.c 2008-02-20 22:23:25.745294410 +0100
5 @@ -1592,6 +1592,16 @@
6 ath_init(dev);
7 }
8
9 +static HAL_BOOL ath_hw_reset(struct ath_hal *ah, HAL_OPMODE opmode,
10 + HAL_CHANNEL *channel, HAL_BOOL bChannelChange,
11 + HAL_STATUS *status)
12 +{
13 + HAL_BOOL ret;
14 + ret = ath_hal_reset(ah, opmode, channel, bChannelChange, status);
15 + mdelay(5); /* extra delay to allow the hw to settle in */
16 + return ret;
17 +}
18 +
19 /* Channel Availability Check is running, or a channel has already found to be
20 * unavailable. */
21 static int
22 @@ -2474,7 +2484,7 @@
23 */
24 sc->sc_curchan.channel = ic->ic_curchan->ic_freq;
25 sc->sc_curchan.channelFlags = ath_chan2flags(ic->ic_curchan);
26 - if (!ath_hal_reset(ah, sc->sc_opmode, &sc->sc_curchan, AH_FALSE, &status)) {
27 + if (!ath_hw_reset(ah, sc->sc_opmode, &sc->sc_curchan, AH_FALSE, &status)) {
28 EPRINTF(sc, "unable to reset hardware: '%s' (HAL status %u) "
29 "(freq %u flags 0x%x)\n",
30 ath_get_hal_status_desc(status), status,
31 @@ -2773,7 +2783,7 @@
32 ath_draintxq(sc); /* stop xmit side */
33 ath_stoprecv(sc); /* stop recv side */
34 /* NB: indicate channel change so we do a full reset */
35 - if (!ath_hal_reset(ah, sc->sc_opmode, &sc->sc_curchan, AH_TRUE, &status))
36 + if (!ath_hw_reset(ah, sc->sc_opmode, &sc->sc_curchan, AH_TRUE, &status))
37 EPRINTF(sc, "Unable to reset hardware: '%s' (HAL status %u)\n",
38 ath_get_hal_status_desc(status), status);
39
40 @@ -8848,8 +8858,8 @@
41 * needed to do the reset with chanchange = AH_FALSE in order
42 * to receive traffic when peforming high velocity channel
43 * changes. */
44 - if (!ath_hal_reset(ah, sc->sc_opmode, &hchan, AH_TRUE, &status) ||
45 - !ath_hal_reset(ah, sc->sc_opmode, &hchan, AH_FALSE, &status)) {
46 + if (!ath_hw_reset(ah, sc->sc_opmode, &hchan, AH_TRUE, &status) ||
47 + !ath_hw_reset(ah, sc->sc_opmode, &hchan, AH_FALSE, &status)) {
48 EPRINTF(sc, "Unable to reset channel %u (%u MHz) "
49 "flags 0x%x '%s' (HAL status %u)\n",
50 ieee80211_chan2ieee(ic, chan), chan->ic_freq,
51 @@ -8905,7 +8915,7 @@
52 * re configure beacons when it is a turbo mode switch.
53 * HW seems to turn off beacons during turbo mode switch.
54 */
55 - if (sc->sc_beacons && tswitch && !sc->sc_dfs_cac)
56 + if (sc->sc_beacons && !sc->sc_dfs_cac)
57 ath_beacon_config(sc, NULL);
58 /*
59 * Re-enable interrupts.
60 @@ -11455,7 +11465,7 @@
61 ieee80211_cancel_scan(vap); /* anything current */
62 ieee80211_wme_updateparams(vap);
63 /* reset the WNIC */
64 - if (!ath_hal_reset(ah, sc->sc_opmode,
65 + if (!ath_hw_reset(ah, sc->sc_opmode,
66 &sc->sc_curchan, AH_TRUE, &status)) {
67 EPRINTF(sc, "ath_hal_reset failed: '%s' "
68 "(HAL status %u).\n",
This page took 0.047969 seconds and 5 git commands to generate.