Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170525
b: refs/heads/master
c: 27c51f1
h: refs/heads/master
i:
  170523: 979e925
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Oct 7, 2009
1 parent e0ed787 commit 2d6310e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 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: 394317fc793eb25dbbda4432d29d97cd80f3b561
refs/heads/master: 27c51f1a349f3e4eb9c1d6d3a548eafe1828cc7a
4 changes: 1 addition & 3 deletions trunk/drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,6 @@ struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;

struct ath_common common;

spinlock_t wiphy_lock; /* spinlock to protect ath_wiphy data */
struct ath_wiphy *pri_wiphy;
struct ath_wiphy **sec_wiphy; /* secondary wiphys (virtual radios); may
Expand Down Expand Up @@ -649,7 +647,7 @@ int ath_cabq_update(struct ath_softc *);

static inline struct ath_common *ath9k_hw_common(struct ath_hw *ah)
{
return &ah->ah_sc->common;
return &ah->common;
}

static inline struct ath_regulatory *ath9k_hw_regulatory(struct ath_hw *ah)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ struct ath_gen_timer_table {

struct ath_hw {
struct ath_softc *ah_sc;
struct ath_common common;
struct ath9k_hw_version hw_version;
struct ath9k_ops_config config;
struct ath9k_hw_capabilities caps;
Expand Down
22 changes: 11 additions & 11 deletions trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ static int ath9k_reg_notifier(struct wiphy *wiphy,
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc;
struct ath_regulatory *reg = &sc->common.regulatory;
struct ath_regulatory *reg = ath9k_hw_regulatory(sc->sc_ah);

return ath_reg_notifier_apply(wiphy, request, reg);
}
Expand Down Expand Up @@ -1516,14 +1516,6 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid)
tasklet_init(&sc->bcon_tasklet, ath_beacon_tasklet,
(unsigned long)sc);

/*
* Cache line size is used to size and align various
* structures used to communicate with the hardware.
*/
ath_read_cachesize(sc, &csz);
/* XXX assert csz is non-zero */
sc->common.cachelsz = csz << 2; /* convert to bytes */

ah = kzalloc(sizeof(struct ath_hw), GFP_KERNEL);
if (!ah) {
r = -ENOMEM;
Expand All @@ -1535,6 +1527,16 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid)
ah->hw_version.subsysid = subsysid;
sc->sc_ah = ah;

common = ath9k_hw_common(ah);

/*
* Cache line size is used to size and align various
* structures used to communicate with the hardware.
*/
ath_read_cachesize(sc, &csz);
/* XXX assert csz is non-zero */
common->cachelsz = csz << 2; /* convert to bytes */

if (ath9k_init_debug(ah) < 0)
dev_err(sc->dev, "Unable to create debugfs files\n");

Expand Down Expand Up @@ -1677,8 +1679,6 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid)
ath9k_hw_setcapability(ah, ATH9K_CAP_DIVERSITY, 1, true, NULL);
sc->rx.defant = ath9k_hw_getdefantenna(ah);

common = ath9k_hw_common(ah);

if (ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK)
memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN);

Expand Down
10 changes: 6 additions & 4 deletions trunk/drivers/net/wireless/ath/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ static void ath_opmode_init(struct ath_softc *sc)

int ath_rx_init(struct ath_softc *sc, int nbufs)
{
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct sk_buff *skb;
struct ath_buf *bf;
int error = 0;
Expand All @@ -306,10 +307,10 @@ int ath_rx_init(struct ath_softc *sc, int nbufs)
spin_lock_init(&sc->rx.rxbuflock);

sc->rx.bufsize = roundup(IEEE80211_MAX_MPDU_LEN,
min(sc->common.cachelsz, (u16)64));
min(common->cachelsz, (u16)64));

DPRINTF(sc->sc_ah, ATH_DBG_CONFIG, "cachelsz %u rxbufsize %u\n",
sc->common.cachelsz, sc->rx.bufsize);
common->cachelsz, sc->rx.bufsize);

/* Initialize rx descriptors */

Expand All @@ -322,7 +323,7 @@ int ath_rx_init(struct ath_softc *sc, int nbufs)
}

list_for_each_entry(bf, &sc->rx.rxbuf, list) {
skb = ath_rxbuf_alloc(&sc->common, sc->rx.bufsize, GFP_KERNEL);
skb = ath_rxbuf_alloc(common, sc->rx.bufsize, GFP_KERNEL);
if (skb == NULL) {
error = -ENOMEM;
goto err;
Expand Down Expand Up @@ -654,6 +655,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)
struct sk_buff *skb = NULL, *requeue_skb;
struct ieee80211_rx_status rx_status;
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_hdr *hdr;
int hdrlen, padsize, retval;
bool decrypt_error = false;
Expand Down Expand Up @@ -752,7 +754,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)

/* Ensure we always have an skb to requeue once we are done
* processing the current buffer's skb */
requeue_skb = ath_rxbuf_alloc(&sc->common, sc->rx.bufsize, GFP_ATOMIC);
requeue_skb = ath_rxbuf_alloc(common, sc->rx.bufsize, GFP_ATOMIC);

/* If there is no memory we ignore the current RX'd frame,
* tell hardware it can give us a new frame using the old
Expand Down

0 comments on commit 2d6310e

Please sign in to comment.