Skip to content

Commit 9b6941d

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2 parents de221bd + acd9f9c commit 9b6941d

File tree

17 files changed

+105
-132
lines changed

17 files changed

+105
-132
lines changed

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3327,7 +3327,6 @@ F: drivers/net/wimax/i2400m/
33273327
F: include/linux/wimax/i2400m.h
33283328

33293329
INTEL WIRELESS WIFI LINK (iwlwifi)
3330-
M: Reinette Chatre <reinette.chatre@intel.com>
33313330
M: Wey-Yi Guy <wey-yi.w.guy@intel.com>
33323331
M: Intel Linux Wireless <ilw@linux.intel.com>
33333332
L: linux-wireless@vger.kernel.org

drivers/bluetooth/ath3k.c

Lines changed: 20 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -47,46 +47,40 @@ MODULE_DEVICE_TABLE(usb, ath3k_table);
4747
#define USB_REQ_DFU_DNLOAD 1
4848
#define BULK_SIZE 4096
4949

50-
struct ath3k_data {
51-
struct usb_device *udev;
52-
u8 *fw_data;
53-
u32 fw_size;
54-
u32 fw_sent;
55-
};
56-
57-
static int ath3k_load_firmware(struct ath3k_data *data,
58-
unsigned char *firmware,
59-
int count)
50+
static int ath3k_load_firmware(struct usb_device *udev,
51+
const struct firmware *firmware)
6052
{
6153
u8 *send_buf;
6254
int err, pipe, len, size, sent = 0;
55+
int count = firmware->size;
6356

64-
BT_DBG("ath3k %p udev %p", data, data->udev);
57+
BT_DBG("udev %p", udev);
6558

66-
pipe = usb_sndctrlpipe(data->udev, 0);
59+
pipe = usb_sndctrlpipe(udev, 0);
6760

68-
if ((usb_control_msg(data->udev, pipe,
61+
send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
62+
if (!send_buf) {
63+
BT_ERR("Can't allocate memory chunk for firmware");
64+
return -ENOMEM;
65+
}
66+
67+
memcpy(send_buf, firmware->data, 20);
68+
if ((err = usb_control_msg(udev, pipe,
6969
USB_REQ_DFU_DNLOAD,
7070
USB_TYPE_VENDOR, 0, 0,
71-
firmware, 20, USB_CTRL_SET_TIMEOUT)) < 0) {
71+
send_buf, 20, USB_CTRL_SET_TIMEOUT)) < 0) {
7272
BT_ERR("Can't change to loading configuration err");
73-
return -EBUSY;
73+
goto error;
7474
}
7575
sent += 20;
7676
count -= 20;
7777

78-
send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
79-
if (!send_buf) {
80-
BT_ERR("Can't allocate memory chunk for firmware");
81-
return -ENOMEM;
82-
}
83-
8478
while (count) {
8579
size = min_t(uint, count, BULK_SIZE);
86-
pipe = usb_sndbulkpipe(data->udev, 0x02);
87-
memcpy(send_buf, firmware + sent, size);
80+
pipe = usb_sndbulkpipe(udev, 0x02);
81+
memcpy(send_buf, firmware->data + sent, size);
8882

89-
err = usb_bulk_msg(data->udev, pipe, send_buf, size,
83+
err = usb_bulk_msg(udev, pipe, send_buf, size,
9084
&len, 3000);
9185

9286
if (err || (len != size)) {
@@ -112,57 +106,28 @@ static int ath3k_probe(struct usb_interface *intf,
112106
{
113107
const struct firmware *firmware;
114108
struct usb_device *udev = interface_to_usbdev(intf);
115-
struct ath3k_data *data;
116-
int size;
117109

118110
BT_DBG("intf %p id %p", intf, id);
119111

120112
if (intf->cur_altsetting->desc.bInterfaceNumber != 0)
121113
return -ENODEV;
122114

123-
data = kzalloc(sizeof(*data), GFP_KERNEL);
124-
if (!data)
125-
return -ENOMEM;
126-
127-
data->udev = udev;
128-
129115
if (request_firmware(&firmware, "ath3k-1.fw", &udev->dev) < 0) {
130-
kfree(data);
131116
return -EIO;
132117
}
133118

134-
size = max_t(uint, firmware->size, 4096);
135-
data->fw_data = kmalloc(size, GFP_KERNEL);
136-
if (!data->fw_data) {
119+
if (ath3k_load_firmware(udev, firmware)) {
137120
release_firmware(firmware);
138-
kfree(data);
139-
return -ENOMEM;
140-
}
141-
142-
memcpy(data->fw_data, firmware->data, firmware->size);
143-
data->fw_size = firmware->size;
144-
data->fw_sent = 0;
145-
release_firmware(firmware);
146-
147-
usb_set_intfdata(intf, data);
148-
if (ath3k_load_firmware(data, data->fw_data, data->fw_size)) {
149-
usb_set_intfdata(intf, NULL);
150-
kfree(data->fw_data);
151-
kfree(data);
152121
return -EIO;
153122
}
123+
release_firmware(firmware);
154124

155125
return 0;
156126
}
157127

158128
static void ath3k_disconnect(struct usb_interface *intf)
159129
{
160-
struct ath3k_data *data = usb_get_intfdata(intf);
161-
162130
BT_DBG("ath3k_disconnect intf %p", intf);
163-
164-
kfree(data->fw_data);
165-
kfree(data);
166131
}
167132

168133
static struct usb_driver ath3k_driver = {

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,9 @@ static void ath9k_hw_init_config(struct ath_hw *ah)
369369
else
370370
ah->config.ht_enable = 0;
371371

372+
/* PAPRD needs some more work to be enabled */
373+
ah->config.paprd_disable = 1;
374+
372375
ah->config.rx_intr_mitigation = true;
373376
ah->config.pcieSerDesWrite = true;
374377

@@ -1933,7 +1936,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
19331936
pCap->rx_status_len = sizeof(struct ar9003_rxs);
19341937
pCap->tx_desc_len = sizeof(struct ar9003_txc);
19351938
pCap->txs_len = sizeof(struct ar9003_txs);
1936-
if (ah->eep_ops->get_eeprom(ah, EEP_PAPRD))
1939+
if (!ah->config.paprd_disable &&
1940+
ah->eep_ops->get_eeprom(ah, EEP_PAPRD))
19371941
pCap->hw_caps |= ATH9K_HW_CAP_PAPRD;
19381942
} else {
19391943
pCap->tx_desc_len = sizeof(struct ath_desc);

drivers/net/wireless/ath/ath9k/hw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ struct ath9k_ops_config {
225225
u32 pcie_waen;
226226
u8 analog_shiftreg;
227227
u8 ht_enable;
228+
u8 paprd_disable;
228229
u32 ofdm_trig_low;
229230
u32 ofdm_trig_high;
230231
u32 cck_trig_high;

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,14 +592,12 @@ void ath9k_tasklet(unsigned long data)
592592
u32 status = sc->intrstatus;
593593
u32 rxmask;
594594

595-
ath9k_ps_wakeup(sc);
596-
597595
if (status & ATH9K_INT_FATAL) {
598596
ath_reset(sc, true);
599-
ath9k_ps_restore(sc);
600597
return;
601598
}
602599

600+
ath9k_ps_wakeup(sc);
603601
spin_lock(&sc->sc_pcu_lock);
604602

605603
if (!ath9k_hw_check_alive(ah))
@@ -969,6 +967,7 @@ int ath_reset(struct ath_softc *sc, bool retry_tx)
969967
/* Stop ANI */
970968
del_timer_sync(&common->ani.timer);
971969

970+
ath9k_ps_wakeup(sc);
972971
spin_lock_bh(&sc->sc_pcu_lock);
973972

974973
ieee80211_stop_queues(hw);
@@ -1015,6 +1014,7 @@ int ath_reset(struct ath_softc *sc, bool retry_tx)
10151014

10161015
/* Start ANI */
10171016
ath_start_ani(common);
1017+
ath9k_ps_restore(sc);
10181018

10191019
return r;
10201020
}
@@ -1701,7 +1701,9 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
17011701
skip_chan_change:
17021702
if (changed & IEEE80211_CONF_CHANGE_POWER) {
17031703
sc->config.txpowlimit = 2 * conf->power_level;
1704+
ath9k_ps_wakeup(sc);
17041705
ath_update_txpow(sc);
1706+
ath9k_ps_restore(sc);
17051707
}
17061708

17071709
spin_lock_bh(&sc->wiphy_lock);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,9 +2113,7 @@ static void ath_tx_complete_poll_work(struct work_struct *work)
21132113
if (needreset) {
21142114
ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET,
21152115
"tx hung, resetting the chip\n");
2116-
ath9k_ps_wakeup(sc);
21172116
ath_reset(sc, true);
2118-
ath9k_ps_restore(sc);
21192117
}
21202118

21212119
ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,6 +2624,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
26242624
.fw_name_pre = IWL4965_FW_PRE,
26252625
.ucode_api_max = IWL4965_UCODE_API_MAX,
26262626
.ucode_api_min = IWL4965_UCODE_API_MIN,
2627+
.sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
26272628
.valid_tx_ant = ANT_AB,
26282629
.valid_rx_ant = ANT_ABC,
26292630
.eeprom_ver = EEPROM_4965_EEPROM_VERSION,

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,14 @@ int iwl_eeprom_check_sku(struct iwl_priv *priv)
152152

153153
eeprom_sku = iwl_eeprom_query16(priv, EEPROM_SKU_CAP);
154154

155-
priv->cfg->sku = ((eeprom_sku & EEPROM_SKU_CAP_BAND_SELECTION) >>
155+
if (!priv->cfg->sku) {
156+
/* not using sku overwrite */
157+
priv->cfg->sku =
158+
((eeprom_sku & EEPROM_SKU_CAP_BAND_SELECTION) >>
156159
EEPROM_SKU_CAP_BAND_POS);
157-
if (eeprom_sku & EEPROM_SKU_CAP_11N_ENABLE)
158-
priv->cfg->sku |= IWL_SKU_N;
159-
160+
if (eeprom_sku & EEPROM_SKU_CAP_11N_ENABLE)
161+
priv->cfg->sku |= IWL_SKU_N;
162+
}
160163
if (!priv->cfg->sku) {
161164
IWL_ERR(priv, "Invalid device sku\n");
162165
return -EINVAL;

drivers/net/wireless/rt2x00/rt73usb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,6 +2446,7 @@ static struct usb_device_id rt73usb_device_table[] = {
24462446
{ USB_DEVICE(0x04bb, 0x093d), USB_DEVICE_DATA(&rt73usb_ops) },
24472447
{ USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt73usb_ops) },
24482448
{ USB_DEVICE(0x148f, 0x2671), USB_DEVICE_DATA(&rt73usb_ops) },
2449+
{ USB_DEVICE(0x0812, 0x3101), USB_DEVICE_DATA(&rt73usb_ops) },
24492450
/* Qcom */
24502451
{ USB_DEVICE(0x18e8, 0x6196), USB_DEVICE_DATA(&rt73usb_ops) },
24512452
{ USB_DEVICE(0x18e8, 0x6229), USB_DEVICE_DATA(&rt73usb_ops) },

drivers/net/wireless/rtlwifi/pci.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,13 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
619619
struct sk_buff *uskb = NULL;
620620
u8 *pdata;
621621
uskb = dev_alloc_skb(skb->len + 128);
622+
if (!uskb) {
623+
RT_TRACE(rtlpriv,
624+
(COMP_INTR | COMP_RECV),
625+
DBG_EMERG,
626+
("can't alloc rx skb\n"));
627+
goto done;
628+
}
622629
memcpy(IEEE80211_SKB_RXCB(uskb),
623630
&rx_status,
624631
sizeof(rx_status));
@@ -641,7 +648,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
641648
new_skb = dev_alloc_skb(rtlpci->rxbuffersize);
642649
if (unlikely(!new_skb)) {
643650
RT_TRACE(rtlpriv, (COMP_INTR | COMP_RECV),
644-
DBG_DMESG,
651+
DBG_EMERG,
645652
("can't alloc skb for rx\n"));
646653
goto done;
647654
}
@@ -1066,9 +1073,9 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw)
10661073
struct sk_buff *skb =
10671074
dev_alloc_skb(rtlpci->rxbuffersize);
10681075
u32 bufferaddress;
1069-
entry = &rtlpci->rx_ring[rx_queue_idx].desc[i];
10701076
if (!skb)
10711077
return 0;
1078+
entry = &rtlpci->rx_ring[rx_queue_idx].desc[i];
10721079

10731080
/*skb->dev = dev; */
10741081

0 commit comments

Comments
 (0)