Skip to content

Commit b5e4156

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2 parents 6b35308 + b1d771e commit b5e4156

File tree

148 files changed

+5604
-2949
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+5604
-2949
lines changed

arch/arm/mach-omap2/board-omap3pandora.c

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -642,31 +642,13 @@ static void __init omap3pandora_init_irq(void)
642642
omap_gpio_init();
643643
}
644644

645-
static void pandora_wl1251_set_power(bool enable)
646-
{
647-
/*
648-
* Keep power always on until wl1251_sdio driver learns to re-init
649-
* the chip after powering it down and back up.
650-
*/
651-
}
652-
653-
static struct wl12xx_platform_data pandora_wl1251_pdata = {
654-
.set_power = pandora_wl1251_set_power,
655-
.use_eeprom = true,
656-
};
657-
658-
static struct platform_device pandora_wl1251_data = {
659-
.name = "wl1251_data",
660-
.id = -1,
661-
.dev = {
662-
.platform_data = &pandora_wl1251_pdata,
663-
},
664-
};
665-
666-
static void pandora_wl1251_init(void)
645+
static void __init pandora_wl1251_init(void)
667646
{
647+
struct wl12xx_platform_data pandora_wl1251_pdata;
668648
int ret;
669649

650+
memset(&pandora_wl1251_pdata, 0, sizeof(pandora_wl1251_pdata));
651+
670652
ret = gpio_request(PANDORA_WIFI_IRQ_GPIO, "wl1251 irq");
671653
if (ret < 0)
672654
goto fail;
@@ -679,6 +661,11 @@ static void pandora_wl1251_init(void)
679661
if (pandora_wl1251_pdata.irq < 0)
680662
goto fail_irq;
681663

664+
pandora_wl1251_pdata.use_eeprom = true;
665+
ret = wl12xx_set_platform_data(&pandora_wl1251_pdata);
666+
if (ret < 0)
667+
goto fail_irq;
668+
682669
return;
683670

684671
fail_irq:
@@ -691,7 +678,6 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
691678
&pandora_leds_gpio,
692679
&pandora_keys_gpio,
693680
&pandora_dss_device,
694-
&pandora_wl1251_data,
695681
&pandora_vwlan_device,
696682
};
697683

drivers/net/wireless/ath/ath5k/base.c

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,8 @@ static void ath_do_set_opmode(struct ath5k_softc *sc)
566566
sc->opmode, ath_opmode_to_string(sc->opmode));
567567
}
568568

569-
void ath5k_update_bssid_mask_and_opmode(struct ath5k_softc *sc,
570-
struct ieee80211_vif *vif)
569+
static void ath5k_update_bssid_mask_and_opmode(struct ath5k_softc *sc,
570+
struct ieee80211_vif *vif)
571571
{
572572
struct ath_common *common = ath5k_hw_common(sc->ah);
573573
struct ath_vif_iter_data iter_data;
@@ -3206,14 +3206,32 @@ static int ath5k_get_survey(struct ieee80211_hw *hw, int idx,
32063206
{
32073207
struct ath5k_softc *sc = hw->priv;
32083208
struct ieee80211_conf *conf = &hw->conf;
3209+
struct ath_common *common = ath5k_hw_common(sc->ah);
3210+
struct ath_cycle_counters *cc = &common->cc_survey;
3211+
unsigned int div = common->clockrate * 1000;
32093212

3210-
if (idx != 0)
3213+
if (idx != 0)
32113214
return -ENOENT;
32123215

32133216
survey->channel = conf->channel;
32143217
survey->filled = SURVEY_INFO_NOISE_DBM;
32153218
survey->noise = sc->ah->ah_noise_floor;
32163219

3220+
spin_lock_bh(&common->cc_lock);
3221+
ath_hw_cycle_counters_update(common);
3222+
if (cc->cycles > 0) {
3223+
survey->filled |= SURVEY_INFO_CHANNEL_TIME |
3224+
SURVEY_INFO_CHANNEL_TIME_BUSY |
3225+
SURVEY_INFO_CHANNEL_TIME_RX |
3226+
SURVEY_INFO_CHANNEL_TIME_TX;
3227+
survey->channel_time += cc->cycles / div;
3228+
survey->channel_time_busy += cc->rx_busy / div;
3229+
survey->channel_time_rx += cc->rx_frame / div;
3230+
survey->channel_time_tx += cc->tx_frame / div;
3231+
}
3232+
memset(cc, 0, sizeof(*cc));
3233+
spin_unlock_bh(&common->cc_lock);
3234+
32173235
return 0;
32183236
}
32193237

drivers/net/wireless/ath/ath5k/debug.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -554,63 +554,63 @@ static ssize_t read_file_frameerrors(struct file *file, char __user *user_buf,
554554

555555
len += snprintf(buf+len, sizeof(buf)-len,
556556
"RX\n---------------------\n");
557-
len += snprintf(buf+len, sizeof(buf)-len, "CRC\t%d\t(%d%%)\n",
557+
len += snprintf(buf+len, sizeof(buf)-len, "CRC\t%u\t(%u%%)\n",
558558
st->rxerr_crc,
559559
st->rx_all_count > 0 ?
560560
st->rxerr_crc*100/st->rx_all_count : 0);
561-
len += snprintf(buf+len, sizeof(buf)-len, "PHY\t%d\t(%d%%)\n",
561+
len += snprintf(buf+len, sizeof(buf)-len, "PHY\t%u\t(%u%%)\n",
562562
st->rxerr_phy,
563563
st->rx_all_count > 0 ?
564564
st->rxerr_phy*100/st->rx_all_count : 0);
565565
for (i = 0; i < 32; i++) {
566566
if (st->rxerr_phy_code[i])
567567
len += snprintf(buf+len, sizeof(buf)-len,
568-
" phy_err[%d]\t%d\n",
568+
" phy_err[%u]\t%u\n",
569569
i, st->rxerr_phy_code[i]);
570570
}
571571

572-
len += snprintf(buf+len, sizeof(buf)-len, "FIFO\t%d\t(%d%%)\n",
572+
len += snprintf(buf+len, sizeof(buf)-len, "FIFO\t%u\t(%u%%)\n",
573573
st->rxerr_fifo,
574574
st->rx_all_count > 0 ?
575575
st->rxerr_fifo*100/st->rx_all_count : 0);
576-
len += snprintf(buf+len, sizeof(buf)-len, "decrypt\t%d\t(%d%%)\n",
576+
len += snprintf(buf+len, sizeof(buf)-len, "decrypt\t%u\t(%u%%)\n",
577577
st->rxerr_decrypt,
578578
st->rx_all_count > 0 ?
579579
st->rxerr_decrypt*100/st->rx_all_count : 0);
580-
len += snprintf(buf+len, sizeof(buf)-len, "MIC\t%d\t(%d%%)\n",
580+
len += snprintf(buf+len, sizeof(buf)-len, "MIC\t%u\t(%u%%)\n",
581581
st->rxerr_mic,
582582
st->rx_all_count > 0 ?
583583
st->rxerr_mic*100/st->rx_all_count : 0);
584-
len += snprintf(buf+len, sizeof(buf)-len, "process\t%d\t(%d%%)\n",
584+
len += snprintf(buf+len, sizeof(buf)-len, "process\t%u\t(%u%%)\n",
585585
st->rxerr_proc,
586586
st->rx_all_count > 0 ?
587587
st->rxerr_proc*100/st->rx_all_count : 0);
588-
len += snprintf(buf+len, sizeof(buf)-len, "jumbo\t%d\t(%d%%)\n",
588+
len += snprintf(buf+len, sizeof(buf)-len, "jumbo\t%u\t(%u%%)\n",
589589
st->rxerr_jumbo,
590590
st->rx_all_count > 0 ?
591591
st->rxerr_jumbo*100/st->rx_all_count : 0);
592-
len += snprintf(buf+len, sizeof(buf)-len, "[RX all\t%d]\n",
592+
len += snprintf(buf+len, sizeof(buf)-len, "[RX all\t%u]\n",
593593
st->rx_all_count);
594-
len += snprintf(buf+len, sizeof(buf)-len, "RX-all-bytes\t%d\n",
594+
len += snprintf(buf+len, sizeof(buf)-len, "RX-all-bytes\t%u\n",
595595
st->rx_bytes_count);
596596

597597
len += snprintf(buf+len, sizeof(buf)-len,
598598
"\nTX\n---------------------\n");
599-
len += snprintf(buf+len, sizeof(buf)-len, "retry\t%d\t(%d%%)\n",
599+
len += snprintf(buf+len, sizeof(buf)-len, "retry\t%u\t(%u%%)\n",
600600
st->txerr_retry,
601601
st->tx_all_count > 0 ?
602602
st->txerr_retry*100/st->tx_all_count : 0);
603-
len += snprintf(buf+len, sizeof(buf)-len, "FIFO\t%d\t(%d%%)\n",
603+
len += snprintf(buf+len, sizeof(buf)-len, "FIFO\t%u\t(%u%%)\n",
604604
st->txerr_fifo,
605605
st->tx_all_count > 0 ?
606606
st->txerr_fifo*100/st->tx_all_count : 0);
607-
len += snprintf(buf+len, sizeof(buf)-len, "filter\t%d\t(%d%%)\n",
607+
len += snprintf(buf+len, sizeof(buf)-len, "filter\t%u\t(%u%%)\n",
608608
st->txerr_filt,
609609
st->tx_all_count > 0 ?
610610
st->txerr_filt*100/st->tx_all_count : 0);
611-
len += snprintf(buf+len, sizeof(buf)-len, "[TX all\t%d]\n",
611+
len += snprintf(buf+len, sizeof(buf)-len, "[TX all\t%u]\n",
612612
st->tx_all_count);
613-
len += snprintf(buf+len, sizeof(buf)-len, "TX-all-bytes\t%d\n",
613+
len += snprintf(buf+len, sizeof(buf)-len, "TX-all-bytes\t%u\n",
614614
st->tx_bytes_count);
615615

616616
if (len > sizeof(buf))

drivers/net/wireless/ath/ath5k/desc.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
struct ath5k_hw_rx_ctl {
2727
u32 rx_control_0; /* RX control word 0 */
2828
u32 rx_control_1; /* RX control word 1 */
29-
} __packed;
29+
} __packed __aligned(4);
3030

3131
/* RX control word 1 fields/flags */
3232
#define AR5K_DESC_RX_CTL1_BUF_LEN 0x00000fff /* data buffer length */
@@ -39,7 +39,7 @@ struct ath5k_hw_rx_ctl {
3939
struct ath5k_hw_rx_status {
4040
u32 rx_status_0; /* RX status word 0 */
4141
u32 rx_status_1; /* RX status word 1 */
42-
} __packed;
42+
} __packed __aligned(4);
4343

4444
/* 5210/5211 */
4545
/* RX status word 0 fields/flags */
@@ -129,7 +129,7 @@ enum ath5k_phy_error_code {
129129
struct ath5k_hw_2w_tx_ctl {
130130
u32 tx_control_0; /* TX control word 0 */
131131
u32 tx_control_1; /* TX control word 1 */
132-
} __packed;
132+
} __packed __aligned(4);
133133

134134
/* TX control word 0 fields/flags */
135135
#define AR5K_2W_TX_DESC_CTL0_FRAME_LEN 0x00000fff /* frame length */
@@ -185,7 +185,7 @@ struct ath5k_hw_4w_tx_ctl {
185185
u32 tx_control_1; /* TX control word 1 */
186186
u32 tx_control_2; /* TX control word 2 */
187187
u32 tx_control_3; /* TX control word 3 */
188-
} __packed;
188+
} __packed __aligned(4);
189189

190190
/* TX control word 0 fields/flags */
191191
#define AR5K_4W_TX_DESC_CTL0_FRAME_LEN 0x00000fff /* frame length */
@@ -244,7 +244,7 @@ struct ath5k_hw_4w_tx_ctl {
244244
struct ath5k_hw_tx_status {
245245
u32 tx_status_0; /* TX status word 0 */
246246
u32 tx_status_1; /* TX status word 1 */
247-
} __packed;
247+
} __packed __aligned(4);
248248

249249
/* TX status word 0 fields/flags */
250250
#define AR5K_DESC_TX_STATUS0_FRAME_XMIT_OK 0x00000001 /* TX success */
@@ -282,23 +282,23 @@ struct ath5k_hw_tx_status {
282282
struct ath5k_hw_5210_tx_desc {
283283
struct ath5k_hw_2w_tx_ctl tx_ctl;
284284
struct ath5k_hw_tx_status tx_stat;
285-
} __packed;
285+
} __packed __aligned(4);
286286

287287
/*
288288
* 5212 hardware TX descriptor
289289
*/
290290
struct ath5k_hw_5212_tx_desc {
291291
struct ath5k_hw_4w_tx_ctl tx_ctl;
292292
struct ath5k_hw_tx_status tx_stat;
293-
} __packed;
293+
} __packed __aligned(4);
294294

295295
/*
296296
* Common hardware RX descriptor
297297
*/
298298
struct ath5k_hw_all_rx_desc {
299299
struct ath5k_hw_rx_ctl rx_ctl;
300300
struct ath5k_hw_rx_status rx_stat;
301-
} __packed;
301+
} __packed __aligned(4);
302302

303303
/*
304304
* Atheros hardware DMA descriptor
@@ -313,7 +313,7 @@ struct ath5k_desc {
313313
struct ath5k_hw_5212_tx_desc ds_tx5212;
314314
struct ath5k_hw_all_rx_desc ds_rx;
315315
} ud;
316-
} __packed;
316+
} __packed __aligned(4);
317317

318318
#define AR5K_RXDESC_INTREQ 0x0020
319319

drivers/net/wireless/ath/ath5k/phy.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,18 +1102,12 @@ int ath5k_hw_channel(struct ath5k_hw *ah, struct ieee80211_channel *channel)
11021102
PHY calibration
11031103
\*****************/
11041104

1105-
static int sign_extend(int val, const int nbits)
1106-
{
1107-
int order = BIT(nbits-1);
1108-
return (val ^ order) - order;
1109-
}
1110-
11111105
static s32 ath5k_hw_read_measured_noise_floor(struct ath5k_hw *ah)
11121106
{
11131107
s32 val;
11141108

11151109
val = ath5k_hw_reg_read(ah, AR5K_PHY_NF);
1116-
return sign_extend(AR5K_REG_MS(val, AR5K_PHY_NF_MINCCA_PWR), 9);
1110+
return sign_extend32(AR5K_REG_MS(val, AR5K_PHY_NF_MINCCA_PWR), 8);
11171111
}
11181112

11191113
void ath5k_hw_init_nfcal_hist(struct ath5k_hw *ah)

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah,
873873
channel->max_antenna_gain * 2,
874874
channel->max_power * 2,
875875
min((u32) MAX_RATE_POWER,
876-
(u32) regulatory->power_limit));
876+
(u32) regulatory->power_limit), false);
877877

878878
/* Write analog registers */
879879
if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) {
@@ -1490,25 +1490,25 @@ static void ar5008_hw_do_getnf(struct ath_hw *ah,
14901490
int16_t nf;
14911491

14921492
nf = MS(REG_READ(ah, AR_PHY_CCA), AR_PHY_MINCCA_PWR);
1493-
nfarray[0] = sign_extend(nf, 9);
1493+
nfarray[0] = sign_extend32(nf, 8);
14941494

14951495
nf = MS(REG_READ(ah, AR_PHY_CH1_CCA), AR_PHY_CH1_MINCCA_PWR);
1496-
nfarray[1] = sign_extend(nf, 9);
1496+
nfarray[1] = sign_extend32(nf, 8);
14971497

14981498
nf = MS(REG_READ(ah, AR_PHY_CH2_CCA), AR_PHY_CH2_MINCCA_PWR);
1499-
nfarray[2] = sign_extend(nf, 9);
1499+
nfarray[2] = sign_extend32(nf, 8);
15001500

15011501
if (!IS_CHAN_HT40(ah->curchan))
15021502
return;
15031503

15041504
nf = MS(REG_READ(ah, AR_PHY_EXT_CCA), AR_PHY_EXT_MINCCA_PWR);
1505-
nfarray[3] = sign_extend(nf, 9);
1505+
nfarray[3] = sign_extend32(nf, 8);
15061506

15071507
nf = MS(REG_READ(ah, AR_PHY_CH1_EXT_CCA), AR_PHY_CH1_EXT_MINCCA_PWR);
1508-
nfarray[4] = sign_extend(nf, 9);
1508+
nfarray[4] = sign_extend32(nf, 8);
15091509

15101510
nf = MS(REG_READ(ah, AR_PHY_CH2_EXT_CCA), AR_PHY_CH2_EXT_MINCCA_PWR);
1511-
nfarray[5] = sign_extend(nf, 9);
1511+
nfarray[5] = sign_extend32(nf, 8);
15121512
}
15131513

15141514
/*

0 commit comments

Comments
 (0)