Skip to content

Commit

Permalink
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/linville/wireless-next

John W. Linville says:

====================
Please pull these updates for the 3.14 stream!

For the mac80211 bits, Johannes says:

"Felix adds some helper functions for P2P NoA software tracking, Joe
fixes alignment (but as this apparently never caused issues I didn't
send it to 3.13), Kyeyoon/Jouni add QoS-mapping support (a Hotspot 2.0
feature), Weilong fixed a bunch of checkpatch errors and I get to play
fire-fighter or so and clean up other people's locking issues. I also
added nl80211 vendor-specific events, as we'd discussed at the wireless
summit."

For the iwlwifi bits, Emmanuel says:

"I have here a rework of the interrupt handling to meet RT kernel
requirements - basically we don't take any lock in the primary interrupt
handler. This gave me a good reason to clean things up a bit on the way.
There is also a fix of the QoS mapping along with a few workarounds for
hardware / firmware issues that are hard to hit.
Three fixes suggested by static analyzers, and other various stuff.
Most importantly, I update the Copyright note to include the new year."

For the bluetooth bits, Gustavo says:

"More patches to 3.14. The bulk of changes here is the 6LoWPAN support for
Bluetooth LE Devices. The commits that touches net/ieee802154/ are already
acked by David Miller. Other than that we have some RFCOMM fixes and
improvements plus fixes and clean ups all over the tree."

Beyond that, ath9k, brcmfmac, mwifiex, and wil6210 get their usual
level of attention.  The wl1251 driver gets a number of updates,
and there are a handful of other bits here and there.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jan 10, 2014
2 parents ef8570d + 235f939 commit 1a6c1e5
Show file tree
Hide file tree
Showing 264 changed files with 5,728 additions and 2,387 deletions.
6 changes: 3 additions & 3 deletions drivers/bcma/driver_chipcommon_sflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static const struct bcma_sflash_tbl_e bcma_sflash_st_tbl[] = {
{ "M25P32", 0x15, 0x10000, 64, },
{ "M25P64", 0x16, 0x10000, 128, },
{ "M25FL128", 0x17, 0x10000, 256, },
{ 0 },
{ NULL },
};

static const struct bcma_sflash_tbl_e bcma_sflash_sst_tbl[] = {
Expand All @@ -56,7 +56,7 @@ static const struct bcma_sflash_tbl_e bcma_sflash_sst_tbl[] = {
{ "SST25VF016", 0x41, 0x1000, 512, },
{ "SST25VF032", 0x4a, 0x1000, 1024, },
{ "SST25VF064", 0x4b, 0x1000, 2048, },
{ 0 },
{ NULL },
};

static const struct bcma_sflash_tbl_e bcma_sflash_at_tbl[] = {
Expand All @@ -67,7 +67,7 @@ static const struct bcma_sflash_tbl_e bcma_sflash_at_tbl[] = {
{ "AT45DB161", 0x2c, 512, 4096, },
{ "AT45DB321", 0x34, 512, 8192, },
{ "AT45DB642", 0x3c, 1024, 8192, },
{ 0 },
{ NULL },
};

static void bcma_sflash_cmd(struct bcma_drv_cc *cc, u32 opcode)
Expand Down
6 changes: 5 additions & 1 deletion drivers/bluetooth/btsdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ struct btsdio_data {
#define REG_CL_INTRD 0x13 /* Interrupt Clear */
#define REG_EN_INTRD 0x14 /* Interrupt Enable */
#define REG_MD_STAT 0x20 /* Bluetooth Mode Status */
#define REG_MD_SET 0x20 /* Bluetooth Mode Set */

static int btsdio_tx_packet(struct btsdio_data *data, struct sk_buff *skb)
{
Expand Down Expand Up @@ -212,7 +213,7 @@ static int btsdio_open(struct hci_dev *hdev)
}

if (data->func->class == SDIO_CLASS_BT_B)
sdio_writeb(data->func, 0x00, REG_MD_STAT, NULL);
sdio_writeb(data->func, 0x00, REG_MD_SET, NULL);

sdio_writeb(data->func, 0x01, REG_EN_INTRD, NULL);

Expand Down Expand Up @@ -333,6 +334,9 @@ static int btsdio_probe(struct sdio_func *func,
hdev->flush = btsdio_flush;
hdev->send = btsdio_send_frame;

if (func->vendor == 0x0104 && func->device == 0x00c5)
set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);

err = hci_register_dev(hdev);
if (err < 0) {
hci_free_dev(hdev);
Expand Down
46 changes: 45 additions & 1 deletion drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,45 @@ static int btusb_setup_bcm92035(struct hci_dev *hdev)
return 0;
}

static int btusb_setup_csr(struct hci_dev *hdev)
{
struct hci_rp_read_local_version *rp;
struct sk_buff *skb;
int ret;

BT_DBG("%s", hdev->name);

skb = __hci_cmd_sync(hdev, HCI_OP_READ_LOCAL_VERSION, 0, NULL,
HCI_INIT_TIMEOUT);
if (IS_ERR(skb)) {
BT_ERR("Reading local version failed (%ld)", -PTR_ERR(skb));
return -PTR_ERR(skb);
}

rp = (struct hci_rp_read_local_version *) skb->data;

if (!rp->status) {
if (le16_to_cpu(rp->manufacturer) != 10) {
/* Clear the reset quirk since this is not an actual
* early Bluetooth 1.1 device from CSR.
*/
clear_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);

/* These fake CSR controllers have all a broken
* stored link key handling and so just disable it.
*/
set_bit(HCI_QUIRK_BROKEN_STORED_LINK_KEY,
&hdev->quirks);
}
}

ret = -bt_to_errno(rp->status);

kfree_skb(skb);

return ret;
}

struct intel_version {
u8 status;
u8 hw_platform;
Expand Down Expand Up @@ -1465,10 +1504,15 @@ static int btusb_probe(struct usb_interface *intf,

if (id->driver_info & BTUSB_CSR) {
struct usb_device *udev = data->udev;
u16 bcdDevice = le16_to_cpu(udev->descriptor.bcdDevice);

/* Old firmware would otherwise execute USB reset */
if (le16_to_cpu(udev->descriptor.bcdDevice) < 0x117)
if (bcdDevice < 0x117)
set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);

/* Fake CSR devices with broken commands */
if (bcdDevice <= 0x100)
hdev->setup = btusb_setup_csr;
}

if (id->driver_info & BTUSB_SNIFFER) {
Expand Down
29 changes: 18 additions & 11 deletions drivers/bluetooth/hci_vhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,28 @@ static int vhci_create_device(struct vhci_data *data, __u8 dev_type)
}

static inline ssize_t vhci_get_user(struct vhci_data *data,
const char __user *buf, size_t count)
const struct iovec *iov,
unsigned long count)
{
size_t len = iov_length(iov, count);
struct sk_buff *skb;
__u8 pkt_type, dev_type;
unsigned long i;
int ret;

if (count < 2 || count > HCI_MAX_FRAME_SIZE)
if (len < 2 || len > HCI_MAX_FRAME_SIZE)
return -EINVAL;

skb = bt_skb_alloc(count, GFP_KERNEL);
skb = bt_skb_alloc(len, GFP_KERNEL);
if (!skb)
return -ENOMEM;

if (copy_from_user(skb_put(skb, count), buf, count)) {
kfree_skb(skb);
return -EFAULT;
for (i = 0; i < count; i++) {
if (copy_from_user(skb_put(skb, iov[i].iov_len),
iov[i].iov_base, iov[i].iov_len)) {
kfree_skb(skb);
return -EFAULT;
}
}

pkt_type = *((__u8 *) skb->data);
Expand Down Expand Up @@ -205,7 +211,7 @@ static inline ssize_t vhci_get_user(struct vhci_data *data,
return -EINVAL;
}

return (ret < 0) ? ret : count;
return (ret < 0) ? ret : len;
}

static inline ssize_t vhci_put_user(struct vhci_data *data,
Expand Down Expand Up @@ -272,12 +278,13 @@ static ssize_t vhci_read(struct file *file,
return ret;
}

static ssize_t vhci_write(struct file *file,
const char __user *buf, size_t count, loff_t *pos)
static ssize_t vhci_write(struct kiocb *iocb, const struct iovec *iov,
unsigned long count, loff_t pos)
{
struct file *file = iocb->ki_filp;
struct vhci_data *data = file->private_data;

return vhci_get_user(data, buf, count);
return vhci_get_user(data, iov, count);
}

static unsigned int vhci_poll(struct file *file, poll_table *wait)
Expand Down Expand Up @@ -342,7 +349,7 @@ static int vhci_release(struct inode *inode, struct file *file)
static const struct file_operations vhci_fops = {
.owner = THIS_MODULE,
.read = vhci_read,
.write = vhci_write,
.aio_write = vhci_write,
.poll = vhci_poll,
.open = vhci_open,
.release = vhci_release,
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/adm8211.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* more details.
*/

#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/if.h>
#include <linux/skbuff.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/airo_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#ifdef __IN_PCMCIA_PACKAGE__
#include <pcmcia/k_compat.h>
#endif
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/ptrace.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/at76c50x-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,7 @@ static void at76_mac80211_tx(struct ieee80211_hw *hw,
* following workaround is necessary. If the TX frame is an
* authentication frame extract the bssid and send the CMD_JOIN. */
if (mgmt->frame_control & cpu_to_le16(IEEE80211_STYPE_AUTH)) {
if (!ether_addr_equal(priv->bssid, mgmt->bssid)) {
if (!ether_addr_equal_64bits(priv->bssid, mgmt->bssid)) {
memcpy(priv->bssid, mgmt->bssid, ETH_ALEN);
ieee80211_queue_work(hw, &priv->work_join_bssid);
dev_kfree_skb_any(skb);
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/ath/ar5523/ar5523.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
* that and only has minimal functionality.
*/
#include <linux/compiler.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/list.h>
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ ath5k_check_ibss_tsf(struct ath5k_hw *ah, struct sk_buff *skb,

if (ieee80211_is_beacon(mgmt->frame_control) &&
le16_to_cpu(mgmt->u.beacon.capab_info) & WLAN_CAPABILITY_IBSS &&
ether_addr_equal(mgmt->bssid, common->curbssid)) {
ether_addr_equal_64bits(mgmt->bssid, common->curbssid)) {
/*
* Received an IBSS beacon with the same BSSID. Hardware *must*
* have updated the local TSF. We have to work around various
Expand Down Expand Up @@ -1309,7 +1309,7 @@ ath5k_update_beacon_rssi(struct ath5k_hw *ah, struct sk_buff *skb, int rssi)

/* only beacons from our BSSID */
if (!ieee80211_is_beacon(mgmt->frame_control) ||
!ether_addr_equal(mgmt->bssid, common->curbssid))
!ether_addr_equal_64bits(mgmt->bssid, common->curbssid))
return;

ewma_add(&ah->ah_beacon_rssi_avg, rssi);
Expand Down
15 changes: 15 additions & 0 deletions drivers/net/wireless/ath/ath9k/ar9002_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,20 @@ void ar9002_hw_enable_async_fifo(struct ath_hw *ah)
}
}

static void ar9002_hw_init_hang_checks(struct ath_hw *ah)
{
if (AR_SREV_9100(ah) || AR_SREV_9160(ah)) {
ah->config.hw_hang_checks |= HW_BB_RIFS_HANG;
ah->config.hw_hang_checks |= HW_BB_DFS_HANG;
}

if (AR_SREV_9280(ah))
ah->config.hw_hang_checks |= HW_BB_RX_CLEAR_STUCK_HANG;

if (AR_SREV_5416(ah) || AR_SREV_9100(ah) || AR_SREV_9160(ah))
ah->config.hw_hang_checks |= HW_MAC_HANG;
}

/* Sets up the AR5008/AR9001/AR9002 hardware familiy callbacks */
int ar9002_hw_attach_ops(struct ath_hw *ah)
{
Expand All @@ -395,6 +409,7 @@ int ar9002_hw_attach_ops(struct ath_hw *ah)
return ret;

priv_ops->init_mode_gain_regs = ar9002_hw_init_mode_gain_regs;
priv_ops->init_hang_checks = ar9002_hw_init_hang_checks;

ops->config_pci_powersave = ar9002_hw_configpcipowersave;

Expand Down
Loading

0 comments on commit 1a6c1e5

Please sign in to comment.