Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236911
b: refs/heads/master
c: 9ac5861
h: refs/heads/master
i:
  236909: 8eab0a2
  236907: 63858e3
  236903: d5a290b
  236895: d74924e
v: v3
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Jan 28, 2011
1 parent 019eba2 commit 8d3ac09
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 106 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: 0cdd5c60e4538d02414144e0682941a4eb20ffa8
refs/heads/master: 9ac58615d93c8a28b1c649a90a5e2ede4dfd368a
12 changes: 3 additions & 9 deletions trunk/drivers/net/wireless/ath/ath9k/ahb.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ static struct ath_bus_ops ath_ahb_bus_ops = {
static int ath_ahb_probe(struct platform_device *pdev)
{
void __iomem *mem;
struct ath_wiphy *aphy;
struct ath_softc *sc;
struct ieee80211_hw *hw;
struct resource *res;
Expand Down Expand Up @@ -92,8 +91,7 @@ static int ath_ahb_probe(struct platform_device *pdev)

irq = res->start;

hw = ieee80211_alloc_hw(sizeof(struct ath_wiphy) +
sizeof(struct ath_softc), &ath9k_ops);
hw = ieee80211_alloc_hw(sizeof(struct ath_softc), &ath9k_ops);
if (hw == NULL) {
dev_err(&pdev->dev, "no memory for ieee80211_hw\n");
ret = -ENOMEM;
Expand All @@ -103,10 +101,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
SET_IEEE80211_DEV(hw, &pdev->dev);
platform_set_drvdata(pdev, hw);

aphy = hw->priv;
sc = (struct ath_softc *) (aphy + 1);
aphy->sc = sc;
aphy->hw = hw;
sc = hw->priv;
sc->hw = hw;
sc->dev = &pdev->dev;
sc->mem = mem;
Expand Down Expand Up @@ -150,8 +145,7 @@ static int ath_ahb_remove(struct platform_device *pdev)
struct ieee80211_hw *hw = platform_get_drvdata(pdev);

if (hw) {
struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc;
struct ath_softc *sc = hw->priv;
void __iomem *mem = sc->mem;

ath9k_deinit_device(sc);
Expand Down
13 changes: 4 additions & 9 deletions trunk/drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
*/

struct ath_node;
struct ath_wiphy;

/* Macro to expand scalars to 64-bit objects */

Expand Down Expand Up @@ -398,7 +397,7 @@ struct ath_beacon {

void ath_beacon_tasklet(unsigned long data);
void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif);
int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif);
int ath_beacon_alloc(struct ath_softc *sc, struct ieee80211_vif *vif);
void ath_beacon_return(struct ath_softc *sc, struct ath_vif *avp);
int ath_beaconq_config(struct ath_softc *sc);

Expand Down Expand Up @@ -628,6 +627,9 @@ struct ath_softc {
int led_on_cnt;
int led_off_cnt;

struct ath9k_hw_cal_data caldata;
int last_rssi;

int beacon_interval;

#ifdef CONFIG_ATH9K_DEBUGFS
Expand All @@ -647,13 +649,6 @@ struct ath_softc {
struct pm_qos_request_list pm_qos_req;
};

struct ath_wiphy {
struct ath_softc *sc; /* shared for all virtual wiphys */
struct ieee80211_hw *hw;
struct ath9k_hw_cal_data caldata;
int last_rssi;
};

void ath9k_tasklet(unsigned long data);
int ath_reset(struct ath_softc *sc, bool retry_tx);
int ath_cabq_update(struct ath_softc *);
Expand Down
9 changes: 3 additions & 6 deletions trunk/drivers/net/wireless/ath/ath9k/beacon.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp,

static void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb)
{
struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc;
struct ath_softc *sc = hw->priv;
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ath_tx_control txctl;

Expand All @@ -132,8 +131,7 @@ static void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb)
static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc;
struct ath_softc *sc = hw->priv;
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ath_buf *bf;
struct ath_vif *avp;
Expand Down Expand Up @@ -222,9 +220,8 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw,
return bf;
}

int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif)
int ath_beacon_alloc(struct ath_softc *sc, struct ieee80211_vif *vif)
{
struct ath_softc *sc = aphy->sc;
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ath_vif *avp;
struct ath_buf *bf;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/wireless/ath/ath9k/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ static bool ath_is_rfkill_set(struct ath_softc *sc)

void ath9k_rfkill_poll_state(struct ieee80211_hw *hw)
{
struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc;
struct ath_softc *sc = hw->priv;
bool blocked = !!ath_is_rfkill_set(sc);

wiphy_rfkill_set_hw_state(hw->wiphy, blocked);
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/net/wireless/ath/ath9k/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ static int ath9k_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc;
struct ath_softc *sc = hw->priv;
struct ath_regulatory *reg = ath9k_hw_regulatory(sc->sc_ah);

return ath_reg_notifier_apply(wiphy, request, reg);
Expand Down Expand Up @@ -704,7 +703,6 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
const struct ath_bus_ops *bus_ops)
{
struct ieee80211_hw *hw = sc->hw;
struct ath_wiphy *aphy = hw->priv;
struct ath_common *common;
struct ath_hw *ah;
int error = 0;
Expand Down Expand Up @@ -759,7 +757,7 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,

INIT_WORK(&sc->hw_check_work, ath_hw_check);
INIT_WORK(&sc->paprd_work, ath_paprd_calibrate);
aphy->last_rssi = ATH_RSSI_DUMMY_MARKER;
sc->last_rssi = ATH_RSSI_DUMMY_MARKER;

ath_init_leds(sc);
ath_start_rfkill_poll(sc);
Expand Down
Loading

0 comments on commit 8d3ac09

Please sign in to comment.