Skip to content

Commit 4e42200

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
2 parents 8633c08 + 931cb03 commit 4e42200

File tree

19 files changed

+96
-58
lines changed

19 files changed

+96
-58
lines changed

drivers/bluetooth/ath3k.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ static struct usb_device_id ath3k_table[] = {
6363

6464
/* Atheros AR3011 with sflash firmware*/
6565
{ USB_DEVICE(0x0CF3, 0x3002) },
66+
{ USB_DEVICE(0x0CF3, 0xE019) },
6667
{ USB_DEVICE(0x13d3, 0x3304) },
6768
{ USB_DEVICE(0x0930, 0x0215) },
6869
{ USB_DEVICE(0x0489, 0xE03D) },
@@ -77,6 +78,7 @@ static struct usb_device_id ath3k_table[] = {
7778
{ USB_DEVICE(0x04CA, 0x3005) },
7879
{ USB_DEVICE(0x13d3, 0x3362) },
7980
{ USB_DEVICE(0x0CF3, 0xE004) },
81+
{ USB_DEVICE(0x0930, 0x0219) },
8082

8183
/* Atheros AR5BBU12 with sflash firmware */
8284
{ USB_DEVICE(0x0489, 0xE02C) },
@@ -101,6 +103,7 @@ static struct usb_device_id ath3k_blist_tbl[] = {
101103
{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
102104
{ USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
103105
{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
106+
{ USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
104107

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

drivers/bluetooth/btmrvl_drv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ int btmrvl_remove_card(struct btmrvl_private *priv);
136136

137137
void btmrvl_interrupt(struct btmrvl_private *priv);
138138

139-
void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb);
139+
bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb);
140140
int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb);
141141

142142
int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd);

drivers/bluetooth/btmrvl_main.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,33 @@ void btmrvl_interrupt(struct btmrvl_private *priv)
4444
}
4545
EXPORT_SYMBOL_GPL(btmrvl_interrupt);
4646

47-
void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
47+
bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
4848
{
4949
struct hci_event_hdr *hdr = (void *) skb->data;
5050
struct hci_ev_cmd_complete *ec;
51-
u16 opcode, ocf;
51+
u16 opcode, ocf, ogf;
5252

5353
if (hdr->evt == HCI_EV_CMD_COMPLETE) {
5454
ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
5555
opcode = __le16_to_cpu(ec->opcode);
5656
ocf = hci_opcode_ocf(opcode);
57+
ogf = hci_opcode_ogf(opcode);
58+
5759
if (ocf == BT_CMD_MODULE_CFG_REQ &&
5860
priv->btmrvl_dev.sendcmdflag) {
5961
priv->btmrvl_dev.sendcmdflag = false;
6062
priv->adapter->cmd_complete = true;
6163
wake_up_interruptible(&priv->adapter->cmd_wait_q);
6264
}
65+
66+
if (ogf == OGF) {
67+
BT_DBG("vendor event skipped: ogf 0x%4.4x", ogf);
68+
kfree_skb(skb);
69+
return false;
70+
}
6371
}
72+
73+
return true;
6474
}
6575
EXPORT_SYMBOL_GPL(btmrvl_check_evtpkt);
6676

drivers/bluetooth/btmrvl_sdio.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,10 +562,12 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
562562
skb_put(skb, buf_len);
563563
skb_pull(skb, SDIO_HEADER_LEN);
564564

565-
if (type == HCI_EVENT_PKT)
566-
btmrvl_check_evtpkt(priv, skb);
565+
if (type == HCI_EVENT_PKT) {
566+
if (btmrvl_check_evtpkt(priv, skb))
567+
hci_recv_frame(skb);
568+
} else
569+
hci_recv_frame(skb);
567570

568-
hci_recv_frame(skb);
569571
hdev->stat.byte_rx += buf_len;
570572
break;
571573

drivers/bluetooth/btusb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ static struct usb_device_id blacklist_table[] = {
125125

126126
/* Atheros 3011 with sflash firmware */
127127
{ USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
128+
{ USB_DEVICE(0x0cf3, 0xe019), .driver_info = BTUSB_IGNORE },
128129
{ USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE },
129130
{ USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE },
130131
{ USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE },
@@ -139,6 +140,7 @@ static struct usb_device_id blacklist_table[] = {
139140
{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
140141
{ USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
141142
{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
143+
{ USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
142144

143145
/* Atheros AR5BBU12 with sflash firmware */
144146
{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },

drivers/net/wireless/airo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7233,8 +7233,8 @@ static int airo_get_aplist(struct net_device *dev,
72337233
}
72347234
} else {
72357235
dwrq->flags = 1; /* Should be define'd */
7236-
memcpy(extra + sizeof(struct sockaddr)*i,
7237-
&qual, sizeof(struct iw_quality)*i);
7236+
memcpy(extra + sizeof(struct sockaddr) * i, qual,
7237+
sizeof(struct iw_quality) * i);
72387238
}
72397239
dwrq->length = i;
72407240

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,11 +1045,11 @@ ath5k_drain_tx_buffs(struct ath5k_hw *ah)
10451045

10461046
ath5k_txbuf_free_skb(ah, bf);
10471047

1048-
spin_lock_bh(&ah->txbuflock);
1048+
spin_lock(&ah->txbuflock);
10491049
list_move_tail(&bf->list, &ah->txbuf);
10501050
ah->txbuf_len++;
10511051
txq->txq_len--;
1052-
spin_unlock_bh(&ah->txbuflock);
1052+
spin_unlock(&ah->txbuflock);
10531053
}
10541054
txq->link = NULL;
10551055
txq->txq_poll_mark = false;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ struct ath_frame_info {
214214
enum ath9k_key_type keytype;
215215
u8 keyix;
216216
u8 retries;
217+
u8 rtscts_rate;
217218
};
218219

219220
struct ath_buf_state {

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,20 +1496,19 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
14961496
priv->num_sta_assoc_vif++ : priv->num_sta_assoc_vif--;
14971497

14981498
if (priv->ah->opmode == NL80211_IFTYPE_STATION) {
1499+
ath9k_htc_choose_set_bssid(priv);
14991500
if (bss_conf->assoc && (priv->num_sta_assoc_vif == 1))
15001501
ath9k_htc_start_ani(priv);
15011502
else if (priv->num_sta_assoc_vif == 0)
15021503
ath9k_htc_stop_ani(priv);
15031504
}
15041505
}
15051506

1506-
if (changed & BSS_CHANGED_BSSID) {
1507+
if (changed & BSS_CHANGED_IBSS) {
15071508
if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) {
15081509
common->curaid = bss_conf->aid;
15091510
memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
15101511
ath9k_htc_set_bssid(priv);
1511-
} else if (priv->ah->opmode == NL80211_IFTYPE_STATION) {
1512-
ath9k_htc_choose_set_bssid(priv);
15131512
}
15141513
}
15151514

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,13 +784,25 @@ static void ath9k_hw_init_qos(struct ath_hw *ah)
784784

785785
u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah)
786786
{
787+
struct ath_common *common = ath9k_hw_common(ah);
788+
int i = 0;
789+
787790
REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK);
788791
udelay(100);
789792
REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK);
790793

791-
while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0)
794+
while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) {
795+
792796
udelay(100);
793797

798+
if (WARN_ON_ONCE(i >= 100)) {
799+
ath_err(common, "PLL4 meaurement not done\n");
800+
break;
801+
}
802+
803+
i++;
804+
}
805+
794806
return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3;
795807
}
796808
EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc);

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

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf,
938938
struct ieee80211_tx_rate *rates;
939939
const struct ieee80211_rate *rate;
940940
struct ieee80211_hdr *hdr;
941+
struct ath_frame_info *fi = get_frame_info(bf->bf_mpdu);
941942
int i;
942943
u8 rix = 0;
943944

@@ -948,18 +949,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf,
948949

949950
/* set dur_update_en for l-sig computation except for PS-Poll frames */
950951
info->dur_update = !ieee80211_is_pspoll(hdr->frame_control);
951-
952-
/*
953-
* We check if Short Preamble is needed for the CTS rate by
954-
* checking the BSS's global flag.
955-
* But for the rate series, IEEE80211_TX_RC_USE_SHORT_PREAMBLE is used.
956-
*/
957-
rate = ieee80211_get_rts_cts_rate(sc->hw, tx_info);
958-
info->rtscts_rate = rate->hw_value;
959-
960-
if (tx_info->control.vif &&
961-
tx_info->control.vif->bss_conf.use_short_preamble)
962-
info->rtscts_rate |= rate->hw_value_short;
952+
info->rtscts_rate = fi->rtscts_rate;
963953

964954
for (i = 0; i < 4; i++) {
965955
bool is_40, is_sgi, is_sp;
@@ -1001,13 +991,13 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf,
1001991
}
1002992

1003993
/* legacy rates */
994+
rate = &sc->sbands[tx_info->band].bitrates[rates[i].idx];
1004995
if ((tx_info->band == IEEE80211_BAND_2GHZ) &&
1005996
!(rate->flags & IEEE80211_RATE_ERP_G))
1006997
phy = WLAN_RC_PHY_CCK;
1007998
else
1008999
phy = WLAN_RC_PHY_OFDM;
10091000

1010-
rate = &sc->sbands[tx_info->band].bitrates[rates[i].idx];
10111001
info->rates[i].Rate = rate->hw_value;
10121002
if (rate->hw_value_short) {
10131003
if (rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
@@ -1776,10 +1766,22 @@ static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb,
17761766
struct ieee80211_sta *sta = tx_info->control.sta;
17771767
struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;
17781768
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
1769+
const struct ieee80211_rate *rate;
17791770
struct ath_frame_info *fi = get_frame_info(skb);
17801771
struct ath_node *an = NULL;
17811772
enum ath9k_key_type keytype;
1773+
bool short_preamble = false;
1774+
1775+
/*
1776+
* We check if Short Preamble is needed for the CTS rate by
1777+
* checking the BSS's global flag.
1778+
* But for the rate series, IEEE80211_TX_RC_USE_SHORT_PREAMBLE is used.
1779+
*/
1780+
if (tx_info->control.vif &&
1781+
tx_info->control.vif->bss_conf.use_short_preamble)
1782+
short_preamble = true;
17821783

1784+
rate = ieee80211_get_rts_cts_rate(hw, tx_info);
17831785
keytype = ath9k_cmn_get_hw_crypto_keytype(skb);
17841786

17851787
if (sta)
@@ -1794,6 +1796,9 @@ static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb,
17941796
fi->keyix = ATH9K_TXKEYIX_INVALID;
17951797
fi->keytype = keytype;
17961798
fi->framelen = framelen;
1799+
fi->rtscts_rate = rate->hw_value;
1800+
if (short_preamble)
1801+
fi->rtscts_rate |= rate->hw_value_short;
17971802
}
17981803

17991804
u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate)

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2239,6 +2239,7 @@ static ssize_t iwl_dbgfs_echo_test_write(struct file *file,
22392239
return count;
22402240
}
22412241

2242+
#ifdef CONFIG_IWLWIFI_DEBUG
22422243
static ssize_t iwl_dbgfs_log_event_read(struct file *file,
22432244
char __user *user_buf,
22442245
size_t count, loff_t *ppos)
@@ -2276,6 +2277,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
22762277

22772278
return count;
22782279
}
2280+
#endif
22792281

22802282
static ssize_t iwl_dbgfs_calib_disabled_read(struct file *file,
22812283
char __user *user_buf,
@@ -2345,7 +2347,9 @@ DEBUGFS_READ_FILE_OPS(bt_traffic);
23452347
DEBUGFS_READ_WRITE_FILE_OPS(protection_mode);
23462348
DEBUGFS_READ_FILE_OPS(reply_tx_error);
23472349
DEBUGFS_WRITE_FILE_OPS(echo_test);
2350+
#ifdef CONFIG_IWLWIFI_DEBUG
23482351
DEBUGFS_READ_WRITE_FILE_OPS(log_event);
2352+
#endif
23492353
DEBUGFS_READ_WRITE_FILE_OPS(calib_disabled);
23502354

23512355
/*
@@ -2405,7 +2409,9 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
24052409
DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR);
24062410
DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR);
24072411
DEBUGFS_ADD_FILE(echo_test, dir_debug, S_IWUSR);
2412+
#ifdef CONFIG_IWLWIFI_DEBUG
24082413
DEBUGFS_ADD_FILE(log_event, dir_debug, S_IWUSR | S_IRUSR);
2414+
#endif
24092415

24102416
if (iwl_advanced_bt_coexist(priv))
24112417
DEBUGFS_ADD_FILE(bt_traffic, dir_debug, S_IRUSR);

drivers/net/wireless/mwifiex/cfg80211.c

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy,
14841484
struct wireless_dev *wdev;
14851485

14861486
if (!adapter)
1487-
return NULL;
1487+
return ERR_PTR(-EFAULT);
14881488

14891489
switch (type) {
14901490
case NL80211_IFTYPE_UNSPECIFIED:
@@ -1494,12 +1494,12 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy,
14941494
if (priv->bss_mode) {
14951495
wiphy_err(wiphy,
14961496
"cannot create multiple sta/adhoc ifaces\n");
1497-
return NULL;
1497+
return ERR_PTR(-EINVAL);
14981498
}
14991499

15001500
wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL);
15011501
if (!wdev)
1502-
return NULL;
1502+
return ERR_PTR(-ENOMEM);
15031503

15041504
wdev->wiphy = wiphy;
15051505
priv->wdev = wdev;
@@ -1522,12 +1522,12 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy,
15221522

15231523
if (priv->bss_mode) {
15241524
wiphy_err(wiphy, "Can't create multiple AP interfaces");
1525-
return NULL;
1525+
return ERR_PTR(-EINVAL);
15261526
}
15271527

15281528
wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL);
15291529
if (!wdev)
1530-
return NULL;
1530+
return ERR_PTR(-ENOMEM);
15311531

15321532
priv->wdev = wdev;
15331533
wdev->wiphy = wiphy;
@@ -1544,14 +1544,15 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy,
15441544
break;
15451545
default:
15461546
wiphy_err(wiphy, "type not supported\n");
1547-
return NULL;
1547+
return ERR_PTR(-EINVAL);
15481548
}
15491549

15501550
dev = alloc_netdev_mq(sizeof(struct mwifiex_private *), name,
15511551
ether_setup, 1);
15521552
if (!dev) {
15531553
wiphy_err(wiphy, "no memory available for netdevice\n");
1554-
goto error;
1554+
priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED;
1555+
return ERR_PTR(-ENOMEM);
15551556
}
15561557

15571558
mwifiex_init_priv_params(priv, dev);
@@ -1582,7 +1583,9 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy,
15821583
/* Register network device */
15831584
if (register_netdevice(dev)) {
15841585
wiphy_err(wiphy, "cannot register virtual network device\n");
1585-
goto error;
1586+
free_netdev(dev);
1587+
priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED;
1588+
return ERR_PTR(-EFAULT);
15861589
}
15871590

15881591
sema_init(&priv->async_sem, 1);
@@ -1594,12 +1597,6 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy,
15941597
mwifiex_dev_debugfs_init(priv);
15951598
#endif
15961599
return dev;
1597-
error:
1598-
if (dev && (dev->reg_state == NETREG_UNREGISTERED))
1599-
free_netdev(dev);
1600-
priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED;
1601-
1602-
return NULL;
16031600
}
16041601
EXPORT_SYMBOL_GPL(mwifiex_add_virtual_intf);
16051602

drivers/net/wireless/mwifiex/txrx.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,11 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
161161
goto done;
162162

163163
for (i = 0; i < adapter->priv_num; i++) {
164-
165164
tpriv = adapter->priv[i];
166165

167-
if ((GET_BSS_ROLE(tpriv) == MWIFIEX_BSS_ROLE_STA) &&
168-
(tpriv->media_connected)) {
169-
if (netif_queue_stopped(tpriv->netdev))
170-
mwifiex_wake_up_net_dev_queue(tpriv->netdev,
171-
adapter);
172-
}
166+
if (tpriv->media_connected &&
167+
netif_queue_stopped(tpriv->netdev))
168+
mwifiex_wake_up_net_dev_queue(tpriv->netdev, adapter);
173169
}
174170
done:
175171
dev_kfree_skb_any(skb);

0 commit comments

Comments
 (0)