Skip to content

Commit b4de921

Browse files
committed
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2 parents 17a3be3 + ed4b201 commit b4de921

File tree

31 files changed

+160
-112
lines changed

31 files changed

+160
-112
lines changed

drivers/net/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,6 +2346,7 @@ config GELIC_NET
23462346

23472347
config GELIC_WIRELESS
23482348
bool "PS3 Wireless support"
2349+
depends on WLAN
23492350
depends on GELIC_NET
23502351
select WIRELESS_EXT
23512352
help
@@ -2358,6 +2359,7 @@ config GELIC_WIRELESS
23582359
config GELIC_WIRELESS_OLD_PSK_INTERFACE
23592360
bool "PS3 Wireless private PSK interface (OBSOLETE)"
23602361
depends on GELIC_WIRELESS
2362+
select WEXT_PRIV
23612363
help
23622364
This option retains the obsolete private interface to pass
23632365
the PSK from user space programs to the driver. The PSK

drivers/net/wireless/ath/ath9k/mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ bool ath9k_hw_stoptxdma(struct ath_hw *ah, u32 q)
186186
wait = wait_time;
187187
while (ath9k_hw_numtxpending(ah, q)) {
188188
if ((--wait) == 0) {
189-
ath_print(common, ATH_DBG_QUEUE,
189+
ath_print(common, ATH_DBG_FATAL,
190190
"Failed to stop TX DMA in 100 "
191191
"msec after killing last frame\n");
192192
break;

drivers/net/wireless/ath/ath9k/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,6 +1973,9 @@ int ath_reset(struct ath_softc *sc, bool retry_tx)
19731973
struct ieee80211_hw *hw = sc->hw;
19741974
int r;
19751975

1976+
/* Stop ANI */
1977+
del_timer_sync(&common->ani.timer);
1978+
19761979
ath9k_hw_set_interrupts(ah, 0);
19771980
ath_drain_all_txq(sc, retry_tx);
19781981
ath_stoprecv(sc);
@@ -2014,6 +2017,9 @@ int ath_reset(struct ath_softc *sc, bool retry_tx)
20142017
}
20152018
}
20162019

2020+
/* Start ANI */
2021+
ath_start_ani(common);
2022+
20172023
return r;
20182024
}
20192025

drivers/net/wireless/ath/ath9k/xmit.c

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,11 +1108,11 @@ void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)
11081108
if (npend) {
11091109
int r;
11101110

1111-
ath_print(common, ATH_DBG_XMIT,
1111+
ath_print(common, ATH_DBG_FATAL,
11121112
"Unable to stop TxDMA. Reset HAL!\n");
11131113

11141114
spin_lock_bh(&sc->sc_resetlock);
1115-
r = ath9k_hw_reset(ah, sc->sc_ah->curchan, true);
1115+
r = ath9k_hw_reset(ah, sc->sc_ah->curchan, false);
11161116
if (r)
11171117
ath_print(common, ATH_DBG_FATAL,
11181118
"Unable to reset hardware; reset status %d\n",
@@ -1414,17 +1414,9 @@ static void assign_aggr_tid_seqno(struct sk_buff *skb,
14141414
* For HT capable stations, we save tidno for later use.
14151415
* We also override seqno set by upper layer with the one
14161416
* in tx aggregation state.
1417-
*
1418-
* If fragmentation is on, the sequence number is
1419-
* not overridden, since it has been
1420-
* incremented by the fragmentation routine.
1421-
*
1422-
* FIXME: check if the fragmentation threshold exceeds
1423-
* IEEE80211 max.
14241417
*/
14251418
tid = ATH_AN_2_TID(an, bf->bf_tidno);
1426-
hdr->seq_ctrl = cpu_to_le16(tid->seq_next <<
1427-
IEEE80211_SEQ_SEQ_SHIFT);
1419+
hdr->seq_ctrl = cpu_to_le16(tid->seq_next << IEEE80211_SEQ_SEQ_SHIFT);
14281420
bf->bf_seqno = tid->seq_next;
14291421
INCR(tid->seq_next, IEEE80211_SEQ_MAX);
14301422
}
@@ -1636,7 +1628,8 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf,
16361628
bf->bf_keyix = ATH9K_TXKEYIX_INVALID;
16371629
}
16381630

1639-
if (ieee80211_is_data_qos(fc) && (sc->sc_flags & SC_OP_TXAGGR))
1631+
if (ieee80211_is_data_qos(fc) && bf_isht(bf) &&
1632+
(sc->sc_flags & SC_OP_TXAGGR))
16401633
assign_aggr_tid_seqno(skb, bf);
16411634

16421635
bf->bf_mpdu = skb;
@@ -1780,7 +1773,8 @@ void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb)
17801773
struct ath_wiphy *aphy = hw->priv;
17811774
struct ath_softc *sc = aphy->sc;
17821775
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
1783-
int hdrlen, padsize;
1776+
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
1777+
int padpos, padsize;
17841778
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
17851779
struct ath_tx_control txctl;
17861780

@@ -1792,25 +1786,24 @@ void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb)
17921786
* BSSes.
17931787
*/
17941788
if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
1795-
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
17961789
if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
17971790
sc->tx.seq_no += 0x10;
17981791
hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
17991792
hdr->seq_ctrl |= cpu_to_le16(sc->tx.seq_no);
18001793
}
18011794

18021795
/* Add the padding after the header if this is not already done */
1803-
hdrlen = ieee80211_get_hdrlen_from_skb(skb);
1804-
if (hdrlen & 3) {
1805-
padsize = hdrlen % 4;
1796+
padpos = ath9k_cmn_padpos(hdr->frame_control);
1797+
padsize = padpos & 3;
1798+
if (padsize && skb->len>padpos) {
18061799
if (skb_headroom(skb) < padsize) {
18071800
ath_print(common, ATH_DBG_XMIT,
18081801
"TX CABQ padding failed\n");
18091802
dev_kfree_skb_any(skb);
18101803
return;
18111804
}
18121805
skb_push(skb, padsize);
1813-
memmove(skb->data, skb->data + padsize, hdrlen);
1806+
memmove(skb->data, skb->data + padsize, padpos);
18141807
}
18151808

18161809
txctl.txq = sc->beacon.cabq;
@@ -1838,7 +1831,8 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
18381831
struct ieee80211_hw *hw = sc->hw;
18391832
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
18401833
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
1841-
int hdrlen, padsize;
1834+
struct ieee80211_hdr * hdr = (struct ieee80211_hdr *)skb->data;
1835+
int padpos, padsize;
18421836

18431837
ath_print(common, ATH_DBG_XMIT, "TX complete: skb: %p\n", skb);
18441838

@@ -1853,14 +1847,14 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
18531847
tx_info->flags |= IEEE80211_TX_STAT_ACK;
18541848
}
18551849

1856-
hdrlen = ieee80211_get_hdrlen_from_skb(skb);
1857-
padsize = hdrlen & 3;
1858-
if (padsize && hdrlen >= 24) {
1850+
padpos = ath9k_cmn_padpos(hdr->frame_control);
1851+
padsize = padpos & 3;
1852+
if (padsize && skb->len>padpos+padsize) {
18591853
/*
18601854
* Remove MAC header padding before giving the frame back to
18611855
* mac80211.
18621856
*/
1863-
memmove(skb->data + padsize, skb->data, hdrlen);
1857+
memmove(skb->data + padsize, skb->data, padpos);
18641858
skb_pull(skb, padsize);
18651859
}
18661860

drivers/net/wireless/iwlwifi/iwl-3945.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,8 +1835,7 @@ static int iwl3945_send_rxon_assoc(struct iwl_priv *priv)
18351835
rc = -EIO;
18361836
}
18371837

1838-
priv->alloc_rxb_page--;
1839-
free_pages(cmd.reply_page, priv->hw_params.rx_page_order);
1838+
iwl_free_pages(priv, cmd.reply_page);
18401839

18411840
return rc;
18421841
}
@@ -2836,6 +2835,7 @@ static struct iwl_cfg iwl3945_bg_cfg = {
28362835
.use_isr_legacy = true,
28372836
.ht_greenfield_support = false,
28382837
.led_compensation = 64,
2838+
.broken_powersave = true,
28392839
};
28402840

28412841
static struct iwl_cfg iwl3945_abg_cfg = {
@@ -2852,6 +2852,7 @@ static struct iwl_cfg iwl3945_abg_cfg = {
28522852
.use_isr_legacy = true,
28532853
.ht_greenfield_support = false,
28542854
.led_compensation = 64,
2855+
.broken_powersave = true,
28552856
};
28562857

28572858
struct pci_device_id iwl3945_hw_card_ids[] = {

drivers/net/wireless/iwlwifi/iwl-4965.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ static int iwl4965_fill_txpower_tbl(struct iwl_priv *priv, u8 band, u16 channel,
12041204
iwl4965_interpolate_chan(priv, channel, &ch_eeprom_info);
12051205

12061206
/* calculate tx gain adjustment based on power supply voltage */
1207-
voltage = priv->calib_info->voltage;
1207+
voltage = le16_to_cpu(priv->calib_info->voltage);
12081208
init_voltage = (s32)le32_to_cpu(priv->card_alive_init.voltage);
12091209
voltage_compensation =
12101210
iwl4965_get_voltage_compensation(voltage, init_voltage);

drivers/net/wireless/iwlwifi/iwl-5000-hw.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,15 @@
9292

9393
static inline s32 iwl_temp_calib_to_offset(struct iwl_priv *priv)
9494
{
95-
u16 *temp_calib = (u16 *)iwl_eeprom_query_addr(priv,
96-
EEPROM_5000_TEMPERATURE);
97-
/* offset = temperature - voltage / coef */
98-
s32 offset = (s32)(temp_calib[0] - temp_calib[1] / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF);
99-
return offset;
95+
u16 temperature, voltage;
96+
__le16 *temp_calib =
97+
(__le16 *)iwl_eeprom_query_addr(priv, EEPROM_5000_TEMPERATURE);
98+
99+
temperature = le16_to_cpu(temp_calib[0]);
100+
voltage = le16_to_cpu(temp_calib[1]);
101+
102+
/* offset = temp - volt / coeff */
103+
return (s32)(temperature - voltage / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF);
100104
}
101105

102106
/* Fixed (non-configurable) rx data from phy */

drivers/net/wireless/iwlwifi/iwl-5000.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,15 @@ static void iwl5000_set_ct_threshold(struct iwl_priv *priv)
333333
static int iwl5000_set_Xtal_calib(struct iwl_priv *priv)
334334
{
335335
struct iwl_calib_xtal_freq_cmd cmd;
336-
u16 *xtal_calib = (u16 *)iwl_eeprom_query_addr(priv, EEPROM_5000_XTAL);
336+
__le16 *xtal_calib =
337+
(__le16 *)iwl_eeprom_query_addr(priv, EEPROM_5000_XTAL);
337338

338339
cmd.hdr.op_code = IWL_PHY_CALIBRATE_CRYSTAL_FRQ_CMD;
339340
cmd.hdr.first_group = 0;
340341
cmd.hdr.groups_num = 1;
341342
cmd.hdr.data_valid = 1;
342-
cmd.cap_pin1 = (u8)xtal_calib[0];
343-
cmd.cap_pin2 = (u8)xtal_calib[1];
343+
cmd.cap_pin1 = le16_to_cpu(xtal_calib[0]);
344+
cmd.cap_pin2 = le16_to_cpu(xtal_calib[1]);
344345
return iwl_calib_set(&priv->calib_results[IWL_CALIB_XTAL],
345346
(u8 *)&cmd, sizeof(cmd));
346347
}

drivers/net/wireless/iwlwifi/iwl-agn.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,7 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log)
18421842
}
18431843

18441844
#ifdef CONFIG_IWLWIFI_DEBUG
1845-
if (!(iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS))
1845+
if (!(iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS) && !full_log)
18461846
size = (size > DEFAULT_DUMP_EVENT_LOG_ENTRIES)
18471847
? DEFAULT_DUMP_EVENT_LOG_ENTRIES : size;
18481848
#else
@@ -3173,7 +3173,6 @@ static int iwl_init_drv(struct iwl_priv *priv)
31733173

31743174
priv->ibss_beacon = NULL;
31753175

3176-
spin_lock_init(&priv->lock);
31773176
spin_lock_init(&priv->sta_lock);
31783177
spin_lock_init(&priv->hcmd_lock);
31793178

@@ -3361,10 +3360,11 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
33613360
(unsigned long long) pci_resource_len(pdev, 0));
33623361
IWL_DEBUG_INFO(priv, "pci_resource_base = %p\n", priv->hw_base);
33633362

3364-
/* this spin lock will be used in apm_ops.init and EEPROM access
3363+
/* these spin locks will be used in apm_ops.init and EEPROM access
33653364
* we should init now
33663365
*/
33673366
spin_lock_init(&priv->reg_lock);
3367+
spin_lock_init(&priv->lock);
33683368
iwl_hw_detect(priv);
33693369
IWL_INFO(priv, "Detected Intel Wireless WiFi Link %s REV=0x%X\n",
33703370
priv->cfg->name, priv->hw_rev);

drivers/net/wireless/iwlwifi/iwl-csr.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@
7777
* The MAC (uCode processor, etc.) does not need to be powered up for accessing
7878
* the CSR registers.
7979
*
80-
* NOTE: Newer devices using one-time-programmable (OTP) memory
81-
* require device to be awake in order to read this memory
80+
* NOTE: Device does need to be awake in order to read this memory
8281
* via CSR_EEPROM and CSR_OTP registers
8382
*/
8483
#define CSR_BASE (0x000)
@@ -111,9 +110,8 @@
111110
/*
112111
* EEPROM and OTP (one-time-programmable) memory reads
113112
*
114-
* NOTE: For (newer) devices using OTP, device must be awake, initialized via
115-
* apm_ops.init() in order to read. Older devices (3945/4965/5000)
116-
* use EEPROM and do not require this.
113+
* NOTE: Device must be awake, initialized via apm_ops.init(),
114+
* in order to read.
117115
*/
118116
#define CSR_EEPROM_REG (CSR_BASE+0x02c)
119117
#define CSR_EEPROM_GP (CSR_BASE+0x030)

drivers/net/wireless/iwlwifi/iwl-dev.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ struct iwl_priv {
11681168
u32 last_beacon_time;
11691169
u64 last_tsf;
11701170

1171-
/* eeprom */
1171+
/* eeprom -- this is in the card's little endian byte order */
11721172
u8 *eeprom;
11731173
int nvm_device_type;
11741174
struct iwl_eeprom_calib_info *calib_info;
@@ -1353,4 +1353,15 @@ static inline int is_channel_ibss(const struct iwl_channel_info *ch)
13531353
return ((ch->flags & EEPROM_CHANNEL_IBSS)) ? 1 : 0;
13541354
}
13551355

1356+
static inline void __iwl_free_pages(struct iwl_priv *priv, struct page *page)
1357+
{
1358+
__free_pages(page, priv->hw_params.rx_page_order);
1359+
priv->alloc_rxb_page--;
1360+
}
1361+
1362+
static inline void iwl_free_pages(struct iwl_priv *priv, unsigned long page)
1363+
{
1364+
free_pages(page, priv->hw_params.rx_page_order);
1365+
priv->alloc_rxb_page--;
1366+
}
13561367
#endif /* __iwl_dev_h__ */

0 commit comments

Comments
 (0)