Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/linville/wireless-next-2.6
  • Loading branch information
David S. Miller committed Oct 29, 2009
2 parents fb699df + bd6b444 commit ed3f2e4
Show file tree
Hide file tree
Showing 137 changed files with 13,469 additions and 6,003 deletions.
1 change: 0 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,6 @@ F: include/net/ax25.h
F: net/ax25/

B43 WIRELESS DRIVER
M: Michael Buesch <mb@bu3sch.de>
M: Stefano Brivio <stefano.brivio@polimi.it>
L: linux-wireless@vger.kernel.org
W: http://linuxwireless.org/en/users/Drivers/b43
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -5660,7 +5660,8 @@ static int airo_pci_suspend(struct pci_dev *pdev, pm_message_t state)

pci_enable_wake(pdev, pci_choose_state(pdev, state), 1);
pci_save_state(pdev);
return pci_set_power_state(pdev, pci_choose_state(pdev, state));
pci_set_power_state(pdev, pci_choose_state(pdev, state));
return 0;
}

static int airo_pci_resume(struct pci_dev *pdev)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ar9170/ar9170.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ struct ar9170 {
struct sk_buff_head tx_status_ampdu;
spinlock_t tx_ampdu_list_lock;
struct list_head tx_ampdu_list;
unsigned int tx_ampdu_pending;
atomic_t tx_ampdu_pending;

/* rxstream mpdu merge */
struct ar9170_rxstream_mpdu_merge rx_mpdu;
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ar9170/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ enum ar9170_cmd {
#define AR9170_MAC_REG_FTF_BIT14 BIT(14)
#define AR9170_MAC_REG_FTF_BIT15 BIT(15)
#define AR9170_MAC_REG_FTF_BAR BIT(24)
#define AR9170_MAC_REG_FTF_BIT25 BIT(25)
#define AR9170_MAC_REG_FTF_BA BIT(25)
#define AR9170_MAC_REG_FTF_PSPOLL BIT(26)
#define AR9170_MAC_REG_FTF_RTS BIT(27)
#define AR9170_MAC_REG_FTF_CTS BIT(28)
#define AR9170_MAC_REG_FTF_ACK BIT(29)
#define AR9170_MAC_REG_FTF_CFE BIT(30)
#define AR9170_MAC_REG_FTF_CFE_ACK BIT(31)
#define AR9170_MAC_REG_FTF_DEFAULTS 0x0500ffff
#define AR9170_MAC_REG_FTF_DEFAULTS 0x0700ffff
#define AR9170_MAC_REG_FTF_MONITOR 0xfd00ffff

#define AR9170_MAC_REG_RX_TOTAL (AR9170_MAC_REG_BASE + 0x6A0)
Expand Down
11 changes: 6 additions & 5 deletions drivers/net/wireless/ath/ar9170/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ static void ar9170_tx_ampdu_callback(struct ar9170 *ar, struct sk_buff *skb)

skb_queue_tail(&ar->tx_status_ampdu, skb);
ar9170_tx_fake_ampdu_status(ar);
ar->tx_ampdu_pending--;

if (!list_empty(&ar->tx_ampdu_list) && !ar->tx_ampdu_pending)
if (atomic_dec_and_test(&ar->tx_ampdu_pending) &&
!list_empty(&ar->tx_ampdu_list))
ar9170_tx_ampdu(ar);
}

Expand Down Expand Up @@ -1248,6 +1248,7 @@ static int ar9170_op_start(struct ieee80211_hw *hw)
ar->global_ampdu_density = 6;
ar->global_ampdu_factor = 3;

atomic_set(&ar->tx_ampdu_pending, 0);
ar->bad_hw_nagger = jiffies;

err = ar->open(ar);
Expand Down Expand Up @@ -1773,7 +1774,7 @@ static void ar9170_tx(struct ar9170 *ar)
msecs_to_jiffies(AR9170_TX_TIMEOUT);

if (arinfo->flags == AR9170_TX_FLAG_BLOCK_ACK)
ar->tx_ampdu_pending++;
atomic_inc(&ar->tx_ampdu_pending);

#ifdef AR9170_QUEUE_DEBUG
printk(KERN_DEBUG "%s: send frame q:%d =>\n",
Expand All @@ -1784,7 +1785,7 @@ static void ar9170_tx(struct ar9170 *ar)
err = ar->tx(ar, skb);
if (unlikely(err)) {
if (arinfo->flags == AR9170_TX_FLAG_BLOCK_ACK)
ar->tx_ampdu_pending--;
atomic_dec(&ar->tx_ampdu_pending);

frames_failed++;
dev_kfree_skb_any(skb);
Expand Down Expand Up @@ -1931,7 +1932,7 @@ int ar9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
if (info->flags & IEEE80211_TX_CTL_AMPDU) {
bool run = ar9170_tx_ampdu_queue(ar, skb);

if (run || !ar->tx_ampdu_pending)
if (run || !atomic_read(&ar->tx_ampdu_pending))
ar9170_tx_ampdu(ar);
} else {
unsigned int queue = skb_get_queue_mapping(skb);
Expand Down
12 changes: 6 additions & 6 deletions drivers/net/wireless/ath/ar9170/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ static void ar9170_usb_submit_urb(struct ar9170_usb *aru)
return ;

spin_lock_irqsave(&aru->tx_urb_lock, flags);
if (aru->tx_submitted_urbs >= AR9170_NUM_TX_URBS) {
if (atomic_read(&aru->tx_submitted_urbs) >= AR9170_NUM_TX_URBS) {
spin_unlock_irqrestore(&aru->tx_urb_lock, flags);
return ;
}
aru->tx_submitted_urbs++;
atomic_inc(&aru->tx_submitted_urbs);

urb = usb_get_from_anchor(&aru->tx_pending);
if (!urb) {
aru->tx_submitted_urbs--;
atomic_dec(&aru->tx_submitted_urbs);
spin_unlock_irqrestore(&aru->tx_urb_lock, flags);

return ;
Expand All @@ -133,7 +133,7 @@ static void ar9170_usb_submit_urb(struct ar9170_usb *aru)
err);

usb_unanchor_urb(urb);
aru->tx_submitted_urbs--;
atomic_dec(&aru->tx_submitted_urbs);
ar9170_tx_callback(&aru->common, urb->context);
}

Expand All @@ -151,7 +151,7 @@ static void ar9170_usb_tx_urb_complete_frame(struct urb *urb)
return ;
}

aru->tx_submitted_urbs--;
atomic_dec(&aru->tx_submitted_urbs);

ar9170_tx_callback(&aru->common, skb);

Expand Down Expand Up @@ -794,7 +794,7 @@ static int ar9170_usb_probe(struct usb_interface *intf,
spin_lock_init(&aru->tx_urb_lock);

aru->tx_pending_urbs = 0;
aru->tx_submitted_urbs = 0;
atomic_set(&aru->tx_submitted_urbs, 0);

aru->common.stop = ar9170_usb_stop;
aru->common.flush = ar9170_usb_flush;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ar9170/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct ar9170_usb {
bool req_one_stage_fw;

spinlock_t tx_urb_lock;
unsigned int tx_submitted_urbs;
atomic_t tx_submitted_urbs;
unsigned int tx_pending_urbs;

struct completion cmd_wait;
Expand Down
13 changes: 13 additions & 0 deletions drivers/net/wireless/ath/ath5k/ath5k.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
#define AR5K_TUNE_CWMAX_11B 1023
#define AR5K_TUNE_CWMAX_XR 7
#define AR5K_TUNE_NOISE_FLOOR -72
#define AR5K_TUNE_CCA_MAX_GOOD_VALUE -95
#define AR5K_TUNE_MAX_TXPOWER 63
#define AR5K_TUNE_DEFAULT_TXPOWER 25
#define AR5K_TUNE_TPC_TXPOWER false
Expand Down Expand Up @@ -1006,6 +1007,14 @@ struct ath5k_capabilities {
} cap_queues;
};

/* size of noise floor history (keep it a power of two) */
#define ATH5K_NF_CAL_HIST_MAX 8
struct ath5k_nfcal_hist
{
s16 index; /* current index into nfval */
s16 nfval[ATH5K_NF_CAL_HIST_MAX]; /* last few noise floors */
};


/***************************************\
HARDWARE ABSTRACTION LAYER STRUCTURE
Expand Down Expand Up @@ -1112,6 +1121,8 @@ struct ath5k_hw {
struct ieee80211_channel r_last_channel;
} ah_radar;

struct ath5k_nfcal_hist ah_nfcal_hist;

/* noise floor from last periodic calibration */
s32 ah_noise_floor;

Expand Down Expand Up @@ -1274,8 +1285,10 @@ extern int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah);
extern bool ath5k_channel_ok(struct ath5k_hw *ah, u16 freq, unsigned int flags);
extern int ath5k_hw_channel(struct ath5k_hw *ah, struct ieee80211_channel *channel);
/* PHY calibration */
void ath5k_hw_init_nfcal_hist(struct ath5k_hw *ah);
extern int ath5k_hw_phy_calibrate(struct ath5k_hw *ah, struct ieee80211_channel *channel);
extern int ath5k_hw_noise_floor_calibration(struct ath5k_hw *ah, short freq);
extern s16 ath5k_hw_get_noise_floor(struct ath5k_hw *ah);
extern void ath5k_hw_calibration_poll(struct ath5k_hw *ah);
/* Spur mitigation */
bool ath5k_hw_chan_has_spur_noise(struct ath5k_hw *ah,
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wireless/ath/ath5k/attach.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ int ath5k_hw_attach(struct ath5k_softc *sc)

ath5k_hw_rfgain_opt_init(ah);

ath5k_hw_init_nfcal_hist(ah);

/* turn on HW LEDs */
ath5k_hw_set_ledstate(ah, AR5K_LED_INIT);

Expand Down
Loading

0 comments on commit ed3f2e4

Please sign in to comment.