From: Felix Fietkau Date: Tue, 7 Apr 2009 16:13:25 +0000 (+0000) Subject: madwifi: remove braindead code that overwrote the user's antenna diversity setting... X-Git-Tag: reboot~24022 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=912fb776e42b7d1f17fb5e3012ce0db24a9aa21f;p=openwrt%2Fstaging%2Fblogic.git madwifi: remove braindead code that overwrote the user's antenna diversity setting (thx, brainslayer) SVN-Revision: 15141 --- diff --git a/package/madwifi/patches/420-diversity_fix.patch b/package/madwifi/patches/420-diversity_fix.patch new file mode 100644 index 000000000000..b7d26d976dc3 --- /dev/null +++ b/package/madwifi/patches/420-diversity_fix.patch @@ -0,0 +1,30 @@ +--- a/ath/if_ath.c ++++ b/ath/if_ath.c +@@ -5344,27 +5344,6 @@ ath_beacon_send(struct ath_softc *sc, in + } else if ((sc->sc_updateslot == COMMIT) && (sc->sc_slotupdate == slot)) + ath_setslottime(sc); /* commit change to hardware */ + +- if ((!sc->sc_stagbeacons || slot == 0) && (!sc->sc_diversity)) { +- unsigned int otherant; +- /* +- * Check recent per-antenna transmit statistics and flip +- * the default rx antenna if noticeably more frames went out +- * on the non-default antenna. Only do this if rx diversity +- * is off. +- * XXX assumes 2 antennae +- */ +- otherant = sc->sc_defant & 1 ? 2 : 1; +- if (sc->sc_ant_tx[otherant] > sc->sc_ant_tx[sc->sc_defant] + +- ATH_ANTENNA_DIFF) { +- DPRINTF(sc, ATH_DEBUG_BEACON, +- "Flip default antenna to %u, %u > %u\n", +- otherant, sc->sc_ant_tx[otherant], +- sc->sc_ant_tx[sc->sc_defant]); +- ath_setdefantenna(sc, otherant); +- } +- sc->sc_ant_tx[1] = sc->sc_ant_tx[2] = 0; +- } +- + if (bfaddr != 0) { + /* + * Stop any current DMA and put the new frame(s) on the queue.