Loading drivers/net/wireless/ath/ath5k/base.c +4 −3 Original line number Diff line number Diff line Loading @@ -1214,6 +1214,7 @@ ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf) struct ath5k_hw *ah = sc->ah; struct sk_buff *skb = bf->skb; struct ath5k_desc *ds; int ret; if (!skb) { skb = ath5k_rx_skb_alloc(sc, &bf->skbaddr); Loading @@ -1240,9 +1241,9 @@ ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf) ds = bf->desc; ds->ds_link = bf->daddr; /* link to self */ ds->ds_data = bf->skbaddr; ah->ah_setup_rx_desc(ah, ds, skb_tailroom(skb), /* buffer size */ 0); ret = ah->ah_setup_rx_desc(ah, ds, ah->common.rx_bufsize, 0); if (ret) return ret; if (sc->rxlink != NULL) *sc->rxlink = bf->daddr; Loading drivers/net/wireless/ath/ath9k/beacon.c +13 −62 Original line number Diff line number Diff line Loading @@ -76,14 +76,6 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp, ds = bf->bf_desc; flags = ATH9K_TXDESC_NOACK; if (((sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC) || (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) && (ah->caps.hw_caps & ATH9K_HW_CAP_VEOL)) { ds->ds_link = bf->bf_daddr; /* self-linked */ flags |= ATH9K_TXDESC_VEOL; /* Let hardware handle antenna switching. */ antenna = 0; } else { ds->ds_link = 0; /* * Switch antenna every beacon. Loading @@ -91,7 +83,6 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp, * XXX assumes two antennae */ antenna = ((sc->beacon.ast_be_xmit / sc->nbcnvifs) & 1 ? 2 : 1); } sband = &sc->sbands[common->hw->conf.channel->band]; rate = sband->bitrates[rateidx].hw_value; Loading Loading @@ -215,36 +206,6 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw, return bf; } /* * Startup beacon transmission for adhoc mode when they are sent entirely * by the hardware using the self-linked descriptor + veol trick. */ static void ath_beacon_start_adhoc(struct ath_softc *sc, struct ieee80211_vif *vif) { struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); struct ath_buf *bf; struct ath_vif *avp; struct sk_buff *skb; avp = (void *)vif->drv_priv; if (avp->av_bcbuf == NULL) return; bf = avp->av_bcbuf; skb = bf->bf_mpdu; ath_beacon_setup(sc, avp, bf, 0); /* NB: caller is known to have already stopped tx dma */ ath9k_hw_puttxbuf(ah, sc->beacon.beaconq, bf->bf_daddr); ath9k_hw_txstart(ah, sc->beacon.beaconq); ath_print(common, ATH_DBG_BEACON, "TXDP%u = %llx (%p)\n", sc->beacon.beaconq, ito64(bf->bf_daddr), bf->bf_desc); } int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif) { struct ath_softc *sc = aphy->sc; Loading @@ -265,7 +226,8 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif) list_del(&avp->av_bcbuf->list); if (sc->sc_ah->opmode == NL80211_IFTYPE_AP || !(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_VEOL)) { sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC || sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT) { int slot; /* * Assign the vif to a beacon xmit slot. As Loading @@ -274,17 +236,11 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif) avp->av_bslot = 0; for (slot = 0; slot < ATH_BCBUF; slot++) if (sc->beacon.bslot[slot] == NULL) { /* * XXX hack, space out slots to better * deal with misses */ if (slot+1 < ATH_BCBUF && sc->beacon.bslot[slot+1] == NULL) { avp->av_bslot = slot+1; break; } avp->av_bslot = slot; /* NB: keep looking for a double slot */ if (slot == 0 || !sc->beacon.bslot[slot-1]) break; } BUG_ON(sc->beacon.bslot[avp->av_bslot] != NULL); sc->beacon.bslot[avp->av_bslot] = vif; Loading Loading @@ -721,7 +677,6 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc, * self-linked tx descriptor and let the hardware deal with things. */ intval |= ATH9K_BEACON_ENA; if (!(ah->caps.hw_caps & ATH9K_HW_CAP_VEOL)) ah->imask |= ATH9K_INT_SWBA; ath_beaconq_config(sc); Loading @@ -732,10 +687,6 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc, ath9k_beacon_init(sc, nexttbtt, intval); sc->beacon.bmisscnt = 0; ath9k_hw_set_interrupts(ah, ah->imask); /* FIXME: Handle properly when vif is NULL */ if (vif && ah->caps.hw_caps & ATH9K_HW_CAP_VEOL) ath_beacon_start_adhoc(sc, vif); } void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif) Loading drivers/net/wireless/ath/ath9k/hif_usb.c +8 −2 Original line number Diff line number Diff line Loading @@ -107,12 +107,14 @@ static inline void ath9k_skb_queue_purge(struct hif_device_usb *hif_dev, static void hif_usb_tx_cb(struct urb *urb) { struct tx_buf *tx_buf = (struct tx_buf *) urb->context; struct hif_device_usb *hif_dev = tx_buf->hif_dev; struct hif_device_usb *hif_dev; struct sk_buff *skb; if (!hif_dev || !tx_buf) if (!tx_buf || !tx_buf->hif_dev) return; hif_dev = tx_buf->hif_dev; switch (urb->status) { case 0: break; Loading Loading @@ -607,6 +609,10 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev) return 0; err: if (tx_buf) { kfree(tx_buf->buf); kfree(tx_buf); } ath9k_hif_usb_dealloc_tx_urbs(hif_dev); return -ENOMEM; } Loading drivers/net/wireless/ath/ath9k/htc.h +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <linux/skbuff.h> #include <linux/netdevice.h> #include <linux/leds.h> #include <linux/slab.h> #include <net/mac80211.h> #include "common.h" Loading drivers/net/wireless/ath/ath9k/main.c +3 −25 Original line number Diff line number Diff line Loading @@ -752,7 +752,6 @@ static int ath_key_config(struct ath_common *common, struct ath_hw *ah = common->ah; struct ath9k_keyval hk; const u8 *mac = NULL; u8 gmac[ETH_ALEN]; int ret = 0; int idx; Loading @@ -776,30 +775,9 @@ static int ath_key_config(struct ath_common *common, memcpy(hk.kv_val, key->key, key->keylen); if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) { if (key->ap_addr) { /* * Group keys on hardware that supports multicast frame * key search use a mac that is the sender's address with * the high bit set instead of the app-specified address. */ memcpy(gmac, key->ap_addr, ETH_ALEN); gmac[0] |= 0x80; mac = gmac; if (key->alg == ALG_TKIP) idx = ath_reserve_key_cache_slot_tkip(common); else idx = ath_reserve_key_cache_slot(common); if (idx < 0) mac = NULL; /* no free key cache entries */ } if (!mac) { /* For now, use the default keys for broadcast keys. This may * need to change with virtual interfaces. */ idx = key->keyidx; } } else if (key->keyidx) { if (WARN_ON(!sta)) return -EOPNOTSUPP; Loading Loading
drivers/net/wireless/ath/ath5k/base.c +4 −3 Original line number Diff line number Diff line Loading @@ -1214,6 +1214,7 @@ ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf) struct ath5k_hw *ah = sc->ah; struct sk_buff *skb = bf->skb; struct ath5k_desc *ds; int ret; if (!skb) { skb = ath5k_rx_skb_alloc(sc, &bf->skbaddr); Loading @@ -1240,9 +1241,9 @@ ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf) ds = bf->desc; ds->ds_link = bf->daddr; /* link to self */ ds->ds_data = bf->skbaddr; ah->ah_setup_rx_desc(ah, ds, skb_tailroom(skb), /* buffer size */ 0); ret = ah->ah_setup_rx_desc(ah, ds, ah->common.rx_bufsize, 0); if (ret) return ret; if (sc->rxlink != NULL) *sc->rxlink = bf->daddr; Loading
drivers/net/wireless/ath/ath9k/beacon.c +13 −62 Original line number Diff line number Diff line Loading @@ -76,14 +76,6 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp, ds = bf->bf_desc; flags = ATH9K_TXDESC_NOACK; if (((sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC) || (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) && (ah->caps.hw_caps & ATH9K_HW_CAP_VEOL)) { ds->ds_link = bf->bf_daddr; /* self-linked */ flags |= ATH9K_TXDESC_VEOL; /* Let hardware handle antenna switching. */ antenna = 0; } else { ds->ds_link = 0; /* * Switch antenna every beacon. Loading @@ -91,7 +83,6 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp, * XXX assumes two antennae */ antenna = ((sc->beacon.ast_be_xmit / sc->nbcnvifs) & 1 ? 2 : 1); } sband = &sc->sbands[common->hw->conf.channel->band]; rate = sband->bitrates[rateidx].hw_value; Loading Loading @@ -215,36 +206,6 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw, return bf; } /* * Startup beacon transmission for adhoc mode when they are sent entirely * by the hardware using the self-linked descriptor + veol trick. */ static void ath_beacon_start_adhoc(struct ath_softc *sc, struct ieee80211_vif *vif) { struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); struct ath_buf *bf; struct ath_vif *avp; struct sk_buff *skb; avp = (void *)vif->drv_priv; if (avp->av_bcbuf == NULL) return; bf = avp->av_bcbuf; skb = bf->bf_mpdu; ath_beacon_setup(sc, avp, bf, 0); /* NB: caller is known to have already stopped tx dma */ ath9k_hw_puttxbuf(ah, sc->beacon.beaconq, bf->bf_daddr); ath9k_hw_txstart(ah, sc->beacon.beaconq); ath_print(common, ATH_DBG_BEACON, "TXDP%u = %llx (%p)\n", sc->beacon.beaconq, ito64(bf->bf_daddr), bf->bf_desc); } int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif) { struct ath_softc *sc = aphy->sc; Loading @@ -265,7 +226,8 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif) list_del(&avp->av_bcbuf->list); if (sc->sc_ah->opmode == NL80211_IFTYPE_AP || !(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_VEOL)) { sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC || sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT) { int slot; /* * Assign the vif to a beacon xmit slot. As Loading @@ -274,17 +236,11 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif) avp->av_bslot = 0; for (slot = 0; slot < ATH_BCBUF; slot++) if (sc->beacon.bslot[slot] == NULL) { /* * XXX hack, space out slots to better * deal with misses */ if (slot+1 < ATH_BCBUF && sc->beacon.bslot[slot+1] == NULL) { avp->av_bslot = slot+1; break; } avp->av_bslot = slot; /* NB: keep looking for a double slot */ if (slot == 0 || !sc->beacon.bslot[slot-1]) break; } BUG_ON(sc->beacon.bslot[avp->av_bslot] != NULL); sc->beacon.bslot[avp->av_bslot] = vif; Loading Loading @@ -721,7 +677,6 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc, * self-linked tx descriptor and let the hardware deal with things. */ intval |= ATH9K_BEACON_ENA; if (!(ah->caps.hw_caps & ATH9K_HW_CAP_VEOL)) ah->imask |= ATH9K_INT_SWBA; ath_beaconq_config(sc); Loading @@ -732,10 +687,6 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc, ath9k_beacon_init(sc, nexttbtt, intval); sc->beacon.bmisscnt = 0; ath9k_hw_set_interrupts(ah, ah->imask); /* FIXME: Handle properly when vif is NULL */ if (vif && ah->caps.hw_caps & ATH9K_HW_CAP_VEOL) ath_beacon_start_adhoc(sc, vif); } void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif) Loading
drivers/net/wireless/ath/ath9k/hif_usb.c +8 −2 Original line number Diff line number Diff line Loading @@ -107,12 +107,14 @@ static inline void ath9k_skb_queue_purge(struct hif_device_usb *hif_dev, static void hif_usb_tx_cb(struct urb *urb) { struct tx_buf *tx_buf = (struct tx_buf *) urb->context; struct hif_device_usb *hif_dev = tx_buf->hif_dev; struct hif_device_usb *hif_dev; struct sk_buff *skb; if (!hif_dev || !tx_buf) if (!tx_buf || !tx_buf->hif_dev) return; hif_dev = tx_buf->hif_dev; switch (urb->status) { case 0: break; Loading Loading @@ -607,6 +609,10 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev) return 0; err: if (tx_buf) { kfree(tx_buf->buf); kfree(tx_buf); } ath9k_hif_usb_dealloc_tx_urbs(hif_dev); return -ENOMEM; } Loading
drivers/net/wireless/ath/ath9k/htc.h +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <linux/skbuff.h> #include <linux/netdevice.h> #include <linux/leds.h> #include <linux/slab.h> #include <net/mac80211.h> #include "common.h" Loading
drivers/net/wireless/ath/ath9k/main.c +3 −25 Original line number Diff line number Diff line Loading @@ -752,7 +752,6 @@ static int ath_key_config(struct ath_common *common, struct ath_hw *ah = common->ah; struct ath9k_keyval hk; const u8 *mac = NULL; u8 gmac[ETH_ALEN]; int ret = 0; int idx; Loading @@ -776,30 +775,9 @@ static int ath_key_config(struct ath_common *common, memcpy(hk.kv_val, key->key, key->keylen); if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) { if (key->ap_addr) { /* * Group keys on hardware that supports multicast frame * key search use a mac that is the sender's address with * the high bit set instead of the app-specified address. */ memcpy(gmac, key->ap_addr, ETH_ALEN); gmac[0] |= 0x80; mac = gmac; if (key->alg == ALG_TKIP) idx = ath_reserve_key_cache_slot_tkip(common); else idx = ath_reserve_key_cache_slot(common); if (idx < 0) mac = NULL; /* no free key cache entries */ } if (!mac) { /* For now, use the default keys for broadcast keys. This may * need to change with virtual interfaces. */ idx = key->keyidx; } } else if (key->keyidx) { if (WARN_ON(!sta)) return -EOPNOTSUPP; Loading