Skip to content

Commit 6ed0e32

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2 parents 3dec224 + b006ed5 commit 6ed0e32

257 files changed

Lines changed: 9897 additions & 5629 deletions

File tree

Some content is hidden

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

‎drivers/bluetooth/ath3k.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ static struct usb_device_id ath3k_table[] = {
9090
{ USB_DEVICE(0x13d3, 0x3393) },
9191
{ USB_DEVICE(0x0489, 0xe04e) },
9292
{ USB_DEVICE(0x0489, 0xe056) },
93+
{ USB_DEVICE(0x0489, 0xe04d) },
9394

9495
/* Atheros AR5BBU12 with sflash firmware */
9596
{ USB_DEVICE(0x0489, 0xE02C) },
@@ -126,6 +127,7 @@ static struct usb_device_id ath3k_blist_tbl[] = {
126127
{ USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 },
127128
{ USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 },
128129
{ USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
130+
{ USB_DEVICE(0x0489, 0xe04d), .driver_info = BTUSB_ATH3012 },
129131

130132
/* Atheros AR5BBU22 with sflash firmware */
131133
{ USB_DEVICE(0x0489, 0xE03C), .driver_info = BTUSB_ATH3012 },

‎drivers/bluetooth/btusb.c‎

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ static struct usb_device_id blacklist_table[] = {
148148
{ USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 },
149149
{ USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 },
150150
{ USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
151+
{ USB_DEVICE(0x0489, 0xe04d), .driver_info = BTUSB_ATH3012 },
151152

152153
/* Atheros AR5BBU12 with sflash firmware */
153154
{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
@@ -926,6 +927,22 @@ static void btusb_waker(struct work_struct *work)
926927
usb_autopm_put_interface(data->intf);
927928
}
928929

930+
static int btusb_setup_bcm92035(struct hci_dev *hdev)
931+
{
932+
struct sk_buff *skb;
933+
u8 val = 0x00;
934+
935+
BT_DBG("%s", hdev->name);
936+
937+
skb = __hci_cmd_sync(hdev, 0xfc3b, 1, &val, HCI_INIT_TIMEOUT);
938+
if (IS_ERR(skb))
939+
BT_ERR("BCM92035 command failed (%ld)", -PTR_ERR(skb));
940+
else
941+
kfree_skb(skb);
942+
943+
return 0;
944+
}
945+
929946
static int btusb_probe(struct usb_interface *intf,
930947
const struct usb_device_id *id)
931948
{
@@ -1022,11 +1039,14 @@ static int btusb_probe(struct usb_interface *intf,
10221039

10231040
SET_HCIDEV_DEV(hdev, &intf->dev);
10241041

1025-
hdev->open = btusb_open;
1026-
hdev->close = btusb_close;
1027-
hdev->flush = btusb_flush;
1028-
hdev->send = btusb_send_frame;
1029-
hdev->notify = btusb_notify;
1042+
hdev->open = btusb_open;
1043+
hdev->close = btusb_close;
1044+
hdev->flush = btusb_flush;
1045+
hdev->send = btusb_send_frame;
1046+
hdev->notify = btusb_notify;
1047+
1048+
if (id->driver_info & BTUSB_BCM92035)
1049+
hdev->setup = btusb_setup_bcm92035;
10301050

10311051
/* Interface numbers are hardcoded in the specification */
10321052
data->isoc = usb_ifnum_to_if(data->udev, 1);
@@ -1065,17 +1085,6 @@ static int btusb_probe(struct usb_interface *intf,
10651085
data->isoc = NULL;
10661086
}
10671087

1068-
if (id->driver_info & BTUSB_BCM92035) {
1069-
unsigned char cmd[] = { 0x3b, 0xfc, 0x01, 0x00 };
1070-
struct sk_buff *skb;
1071-
1072-
skb = bt_skb_alloc(sizeof(cmd), GFP_KERNEL);
1073-
if (skb) {
1074-
memcpy(skb_put(skb, sizeof(cmd)), cmd, sizeof(cmd));
1075-
skb_queue_tail(&hdev->driver_init, skb);
1076-
}
1077-
}
1078-
10791088
if (data->isoc) {
10801089
err = usb_driver_claim_interface(&btusb_driver,
10811090
data->isoc, data);

‎drivers/bluetooth/hci_h4.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
153153
{
154154
int ret;
155155

156+
if (!test_bit(HCI_UART_REGISTERED, &hu->flags))
157+
return -EUNATCH;
158+
156159
ret = hci_recv_stream_fragment(hu->hdev, data, count);
157160
if (ret < 0) {
158161
BT_ERR("Frame Reassembly Failed");

‎drivers/bluetooth/hci_ldisc.c‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,12 @@ static int hci_uart_send_frame(struct sk_buff *skb)
260260

261261
/* ------ LDISC part ------ */
262262
/* hci_uart_tty_open
263-
*
263+
*
264264
* Called when line discipline changed to HCI_UART.
265265
*
266266
* Arguments:
267267
* tty pointer to tty info structure
268-
* Return Value:
268+
* Return Value:
269269
* 0 if success, otherwise error code
270270
*/
271271
static int hci_uart_tty_open(struct tty_struct *tty)
@@ -365,15 +365,15 @@ static void hci_uart_tty_wakeup(struct tty_struct *tty)
365365
}
366366

367367
/* hci_uart_tty_receive()
368-
*
368+
*
369369
* Called by tty low level driver when receive data is
370370
* available.
371-
*
371+
*
372372
* Arguments: tty pointer to tty isntance data
373373
* data pointer to received data
374374
* flags pointer to flags for data
375375
* count count of received data in bytes
376-
*
376+
*
377377
* Return Value: None
378378
*/
379379
static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, char *flags, int count)
@@ -388,7 +388,10 @@ static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, char *f
388388

389389
spin_lock(&hu->rx_lock);
390390
hu->proto->recv(hu, (void *) data, count);
391-
hu->hdev->stat.byte_rx += count;
391+
392+
if (hu->hdev)
393+
hu->hdev->stat.byte_rx += count;
394+
392395
spin_unlock(&hu->rx_lock);
393396

394397
tty_unthrottle(tty);

‎drivers/net/wireless/adm8211.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,8 @@ static int adm8211_config(struct ieee80211_hw *dev, u32 changed)
12931293
{
12941294
struct adm8211_priv *priv = dev->priv;
12951295
struct ieee80211_conf *conf = &dev->conf;
1296-
int channel = ieee80211_frequency_to_channel(conf->channel->center_freq);
1296+
int channel =
1297+
ieee80211_frequency_to_channel(conf->chandef.chan->center_freq);
12971298

12981299
if (channel != priv->channel) {
12991300
priv->channel = channel;

‎drivers/net/wireless/at76c50x-usb.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,12 +1943,12 @@ static int at76_config(struct ieee80211_hw *hw, u32 changed)
19431943
struct at76_priv *priv = hw->priv;
19441944

19451945
at76_dbg(DBG_MAC80211, "%s(): channel %d",
1946-
__func__, hw->conf.channel->hw_value);
1946+
__func__, hw->conf.chandef.chan->hw_value);
19471947
at76_dbg_dump(DBG_MAC80211, priv->bssid, ETH_ALEN, "bssid:");
19481948

19491949
mutex_lock(&priv->mtx);
19501950

1951-
priv->channel = hw->conf.channel->hw_value;
1951+
priv->channel = hw->conf.chandef.chan->hw_value;
19521952

19531953
if (is_valid_ether_addr(priv->bssid))
19541954
at76_join(priv);

‎drivers/net/wireless/ath/ar5523/ar5523.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -457,14 +457,14 @@ static int ar5523_set_chan(struct ar5523 *ar)
457457
memset(&reset, 0, sizeof(reset));
458458
reset.flags |= cpu_to_be32(UATH_CHAN_2GHZ);
459459
reset.flags |= cpu_to_be32(UATH_CHAN_OFDM);
460-
reset.freq = cpu_to_be32(conf->channel->center_freq);
460+
reset.freq = cpu_to_be32(conf->chandef.chan->center_freq);
461461
reset.maxrdpower = cpu_to_be32(50); /* XXX */
462462
reset.channelchange = cpu_to_be32(1);
463463
reset.keeprccontent = cpu_to_be32(0);
464464

465465
ar5523_dbg(ar, "set chan flags 0x%x freq %d\n",
466466
be32_to_cpu(reset.flags),
467-
conf->channel->center_freq);
467+
conf->chandef.chan->center_freq);
468468
return ar5523_cmd_write(ar, WDCMSG_RESET, &reset, sizeof(reset), 0);
469469
}
470470

@@ -594,7 +594,7 @@ static void ar5523_data_rx_cb(struct urb *urb)
594594
rx_status = IEEE80211_SKB_RXCB(data->skb);
595595
memset(rx_status, 0, sizeof(*rx_status));
596596
rx_status->freq = be32_to_cpu(desc->channel);
597-
rx_status->band = hw->conf.channel->band;
597+
rx_status->band = hw->conf.chandef.chan->band;
598598
rx_status->signal = -95 + be32_to_cpu(desc->rssi);
599599

600600
ieee80211_rx_irqsafe(hw, data->skb);
@@ -1153,13 +1153,13 @@ static int ar5523_get_wlan_mode(struct ar5523 *ar,
11531153
struct ieee80211_sta *sta;
11541154
u32 sta_rate_set;
11551155

1156-
band = ar->hw->wiphy->bands[ar->hw->conf.channel->band];
1156+
band = ar->hw->wiphy->bands[ar->hw->conf.chandef.chan->band];
11571157
sta = ieee80211_find_sta(ar->vif, bss_conf->bssid);
11581158
if (!sta) {
11591159
ar5523_info(ar, "STA not found!\n");
11601160
return WLAN_MODE_11b;
11611161
}
1162-
sta_rate_set = sta->supp_rates[ar->hw->conf.channel->band];
1162+
sta_rate_set = sta->supp_rates[ar->hw->conf.chandef.chan->band];
11631163

11641164
for (bit = 0; bit < band->n_bitrates; bit++) {
11651165
if (sta_rate_set & 1) {
@@ -1197,11 +1197,11 @@ static void ar5523_create_rateset(struct ar5523 *ar,
11971197
ar5523_info(ar, "STA not found. Cannot set rates\n");
11981198
sta_rate_set = bss_conf->basic_rates;
11991199
} else
1200-
sta_rate_set = sta->supp_rates[ar->hw->conf.channel->band];
1200+
sta_rate_set = sta->supp_rates[ar->hw->conf.chandef.chan->band];
12011201

12021202
ar5523_dbg(ar, "sta rate_set = %08x\n", sta_rate_set);
12031203

1204-
band = ar->hw->wiphy->bands[ar->hw->conf.channel->band];
1204+
band = ar->hw->wiphy->bands[ar->hw->conf.chandef.chan->band];
12051205
for (bit = 0; bit < band->n_bitrates; bit++) {
12061206
BUG_ON(i >= AR5523_MAX_NRATES);
12071207
ar5523_dbg(ar, "Considering rate %d : %d\n",

‎drivers/net/wireless/ath/ath5k/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ath5k-y += phy.o
1010
ath5k-y += reset.o
1111
ath5k-y += attach.o
1212
ath5k-y += base.o
13+
CFLAGS_base.o += -I$(src)
1314
ath5k-y += led.o
1415
ath5k-y += rfkill.o
1516
ath5k-y += ani.o

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2639,7 +2639,7 @@ int ath5k_start(struct ieee80211_hw *hw)
26392639
* be followed by initialization of the appropriate bits
26402640
* and then setup of the interrupt mask.
26412641
*/
2642-
ah->curchan = ah->hw->conf.channel;
2642+
ah->curchan = ah->hw->conf.chandef.chan;
26432643
ah->imask = AR5K_INT_RXOK
26442644
| AR5K_INT_RXERR
26452645
| AR5K_INT_RXEOL

‎drivers/net/wireless/ath/ath5k/mac80211-ops.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)
202202
mutex_lock(&ah->lock);
203203

204204
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
205-
ret = ath5k_chan_set(ah, conf->channel);
205+
ret = ath5k_chan_set(ah, conf->chandef.chan);
206206
if (ret < 0)
207207
goto unlock;
208208
}
@@ -678,7 +678,7 @@ ath5k_get_survey(struct ieee80211_hw *hw, int idx, struct survey_info *survey)
678678

679679
memcpy(survey, &ah->survey, sizeof(*survey));
680680

681-
survey->channel = conf->channel;
681+
survey->channel = conf->chandef.chan;
682682
survey->noise = ah->ah_noise_floor;
683683
survey->filled = SURVEY_INFO_NOISE_DBM |
684684
SURVEY_INFO_CHANNEL_TIME |

0 commit comments

Comments
 (0)