Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111279
b: refs/heads/master
c: ff9b662
h: refs/heads/master
i:
  111277: 3468307
  111275: 6ad2d4c
  111271: 25776e6
  111263: beab52f
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Aug 29, 2008
1 parent c31012d commit 7e07a37
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 170 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc2222a85fd63103b9aad0d4b77c4d87b78c58a2
refs/heads/master: ff9b662dab1fcd885fb728de3a8c13ebb5455117
52 changes: 26 additions & 26 deletions trunk/drivers/net/wireless/ath9k/beacon.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,21 @@ static void ath_beacon_setup(struct ath_softc *sc,
if (sc->sc_flags & SC_OP_PREAMBLE_SHORT)
rate |= rt->info[rix].shortPreamble;

ath9k_hw_set11n_txdesc(ah, ds
, skb->len + FCS_LEN /* frame length */
, ATH9K_PKT_TYPE_BEACON /* Atheros packet type */
, avp->av_btxctl.txpower /* txpower XXX */
, ATH9K_TXKEYIX_INVALID /* no encryption */
, ATH9K_KEY_TYPE_CLEAR /* no encryption */
, flags /* no ack, veol for beacons */
ath9k_hw_set11n_txdesc(ah, ds,
skb->len + FCS_LEN, /* frame length */
ATH9K_PKT_TYPE_BEACON, /* Atheros packet type */
avp->av_btxctl.txpower, /* txpower XXX */
ATH9K_TXKEYIX_INVALID, /* no encryption */
ATH9K_KEY_TYPE_CLEAR, /* no encryption */
flags /* no ack, veol for beacons */
);

/* NB: beacon's BufLen must be a multiple of 4 bytes */
ath9k_hw_filltxdesc(ah, ds
, roundup(skb->len, 4) /* buffer length */
, true /* first segment */
, true /* last segment */
, ds /* first descriptor */
ath9k_hw_filltxdesc(ah, ds,
roundup(skb->len, 4), /* buffer length */
true, /* first segment */
true, /* last segment */
ds /* first descriptor */
);

memzero(series, sizeof(struct ath9k_11n_rate_series) * 4);
Expand Down Expand Up @@ -551,7 +551,7 @@ void ath_beacon_free(struct ath_softc *sc)

void ath9k_beacon_tasklet(unsigned long data)
{
#define TSF_TO_TU(_h,_l) \
#define TSF_TO_TU(_h,_l) \
((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))

struct ath_softc *sc = (struct ath_softc *)data;
Expand Down Expand Up @@ -898,19 +898,19 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
"cfp:period %u "
"maxdur %u "
"next %u "
"timoffset %u\n"
, __func__
, (unsigned long long)tsf, tsftu
, bs.bs_intval
, bs.bs_nexttbtt
, bs.bs_dtimperiod
, bs.bs_nextdtim
, bs.bs_bmissthreshold
, bs.bs_sleepduration
, bs.bs_cfpperiod
, bs.bs_cfpmaxduration
, bs.bs_cfpnext
, bs.bs_timoffset
"timoffset %u\n",
__func__,
(unsigned long long)tsf, tsftu,
bs.bs_intval,
bs.bs_nexttbtt,
bs.bs_dtimperiod,
bs.bs_nextdtim,
bs.bs_bmissthreshold,
bs.bs_sleepduration,
bs.bs_cfpperiod,
bs.bs_cfpmaxduration,
bs.bs_cfpnext,
bs.bs_timoffset
);

ath9k_hw_set_interrupts(ah, 0);
Expand Down
74 changes: 4 additions & 70 deletions trunk/drivers/net/wireless/ath9k/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ static void bus_read_cachesize(struct ath_softc *sc, int *csz)
* Set current operating mode
*
* This function initializes and fills the rate table in the ATH object based
* on the operating mode. The blink rates are also set up here, although
* they have been superceeded by the ath_led module.
* on the operating mode.
*/

static void ath_setcurmode(struct ath_softc *sc, enum wireless_mode mode)
{
const struct ath9k_rate_table *rt;
Expand Down Expand Up @@ -232,7 +230,7 @@ static int ath_setup_channels(struct ath_softc *sc)
* Determine mode from channel flags
*
* This routine will provide the enumerated WIRELESSS_MODE value based
* on the settings of the channel flags. If ho valid set of flags
* on the settings of the channel flags. If no valid set of flags
* exist, the lowest mode (11b) is selected.
*/

Expand All @@ -257,7 +255,8 @@ static enum wireless_mode ath_chan2mode(struct ath9k_channel *chan)
else if (chan->chanmode == CHANNEL_G_HT40MINUS)
return ATH9K_MODE_11NG_HT40MINUS;

/* NB: should not get here */
WARN_ON(1); /* should not get here */

return ATH9K_MODE_11B;
}

Expand All @@ -278,8 +277,6 @@ static int ath_stop(struct ath_softc *sc)
/*
* Shutdown the hardware and driver:
* stop output from above
* reset 802.11 state machine
* (sends station deassoc/deauth frames)
* turn off timers
* disable interrupts
* clear transmit machinery
Expand Down Expand Up @@ -499,69 +496,6 @@ void ath_update_chainmask(struct ath_softc *sc, int is_ht)
/* VAP management */
/******************/

/*
* VAP in Listen mode
*
* This routine brings the VAP out of the down state into a "listen" state
* where it waits for association requests. This is used in AP and AdHoc
* modes.
*/

int ath_vap_listen(struct ath_softc *sc, int if_id)
{
struct ath_hal *ah = sc->sc_ah;
struct ath_vap *avp;
u32 rfilt = 0;
DECLARE_MAC_BUF(mac);

avp = sc->sc_vaps[if_id];
if (avp == NULL) {
DPRINTF(sc, ATH_DBG_FATAL, "%s: invalid interface id %u\n",
__func__, if_id);
return -EINVAL;
}

#ifdef CONFIG_SLOW_ANT_DIV
ath_slow_ant_div_stop(&sc->sc_antdiv);
#endif

/* update ratectrl about the new state */
ath_rate_newstate(sc, avp);

rfilt = ath_calcrxfilter(sc);
ath9k_hw_setrxfilter(ah, rfilt);

if (sc->sc_ah->ah_opmode == ATH9K_M_STA ||
sc->sc_ah->ah_opmode == ATH9K_M_IBSS) {
memcpy(sc->sc_curbssid, ath_bcast_mac, ETH_ALEN);
ath9k_hw_write_associd(ah, sc->sc_curbssid, sc->sc_curaid);
} else
sc->sc_curaid = 0;

DPRINTF(sc, ATH_DBG_CONFIG,
"%s: RX filter 0x%x bssid %s aid 0x%x\n",
__func__, rfilt, print_mac(mac,
sc->sc_curbssid), sc->sc_curaid);

/*
* XXXX
* Disable BMISS interrupt when we're not associated
*/
if (sc->sc_ah->ah_opmode == ATH9K_M_HOSTAP) {
ath9k_hw_set_interrupts(ah, sc->sc_imask & ~ATH9K_INT_BMISS);
sc->sc_imask &= ~ATH9K_INT_BMISS;
} else {
ath9k_hw_set_interrupts(
ah,
sc->sc_imask & ~(ATH9K_INT_SWBA | ATH9K_INT_BMISS));
sc->sc_imask &= ~(ATH9K_INT_SWBA | ATH9K_INT_BMISS);
}
/* need to reconfigure the beacons when it moves to RUN */
sc->sc_flags &= ~SC_OP_BEACONS;

return 0;
}

int ath_vap_attach(struct ath_softc *sc,
int if_id,
struct ieee80211_vif *if_data,
Expand Down
6 changes: 1 addition & 5 deletions trunk/drivers/net/wireless/ath9k/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ struct ath_node;
/* XXX: remove */
#define memzero(_buf, _len) memset(_buf, 0, _len)

#define get_dma_mem_context(var, field) (&((var)->field))
#define copy_dma_mem_context(dst, src) (*dst = *src)

#define ATH9K_BH_STATUS_INTACT 0
#define ATH9K_BH_STATUS_CHANGE 1

Expand Down Expand Up @@ -769,8 +766,7 @@ int ath_vap_attach(struct ath_softc *sc,
enum ath9k_opmode opmode);
int ath_vap_detach(struct ath_softc *sc, int if_id);
int ath_vap_config(struct ath_softc *sc,
int if_id, struct ath_vap_config *if_config);
int ath_vap_listen(struct ath_softc *sc, int if_id);
int if_id, struct ath_vap_config *if_config);

/*********************/
/* Antenna diversity */
Expand Down
Loading

0 comments on commit 7e07a37

Please sign in to comment.