Skip to content

Commit

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

Conflicts:
	drivers/net/wireless/iwlwifi/pcie/tx.c
  • Loading branch information
John W. Linville committed Nov 28, 2012
2 parents 03f52a0 + 0751f86 commit 79d38f7
Show file tree
Hide file tree
Showing 289 changed files with 27,506 additions and 8,374 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5157,6 +5157,7 @@ F: net/nfc/
F: include/linux/nfc.h
F: include/net/nfc/
F: drivers/nfc/
F: include/linux/platform_data/pn544.h

NFS, SUNRPC, AND LOCKD CLIENTS
M: Trond Myklebust <Trond.Myklebust@netapp.com>
Expand Down
1 change: 1 addition & 0 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ static struct usb_device_id btusb_table[] = {
{ USB_DEVICE(0x0c10, 0x0000) },

/* Broadcom BCM20702A0 */
{ USB_DEVICE(0x0b05, 0x17b5) },
{ USB_DEVICE(0x04ca, 0x2003) },
{ USB_DEVICE(0x0489, 0xe042) },
{ USB_DEVICE(0x413c, 0x8197) },
Expand Down
85 changes: 40 additions & 45 deletions drivers/net/wireless/at76c50x-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ static int at76_usbdfu_download(struct usb_device *udev, u8 *buf, u32 size,
manifest_sync_timeout);

if (!size) {
dev_printk(KERN_ERR, &udev->dev, "FW buffer length invalid!\n");
dev_err(&udev->dev, "FW buffer length invalid!\n");
return -EINVAL;
}

Expand All @@ -391,8 +391,8 @@ static int at76_usbdfu_download(struct usb_device *udev, u8 *buf, u32 size,
if (need_dfu_state) {
ret = at76_dfu_get_state(udev, &dfu_state);
if (ret < 0) {
dev_printk(KERN_ERR, &udev->dev,
"cannot get DFU state: %d\n", ret);
dev_err(&udev->dev,
"cannot get DFU state: %d\n", ret);
goto exit;
}
need_dfu_state = 0;
Expand All @@ -407,9 +407,9 @@ static int at76_usbdfu_download(struct usb_device *udev, u8 *buf, u32 size,
dfu_timeout = at76_get_timeout(&dfu_stat_buf);
need_dfu_state = 0;
} else
dev_printk(KERN_ERR, &udev->dev,
"at76_dfu_get_status returned %d\n",
ret);
dev_err(&udev->dev,
"at76_dfu_get_status returned %d\n",
ret);
break;

case STATE_DFU_DOWNLOAD_BUSY:
Expand Down Expand Up @@ -438,9 +438,9 @@ static int at76_usbdfu_download(struct usb_device *udev, u8 *buf, u32 size,
blockno++;

if (ret != bsize)
dev_printk(KERN_ERR, &udev->dev,
"at76_load_int_fw_block "
"returned %d\n", ret);
dev_err(&udev->dev,
"at76_load_int_fw_block returned %d\n",
ret);
need_dfu_state = 1;
break;

Expand Down Expand Up @@ -1255,8 +1255,7 @@ static int at76_load_external_fw(struct usb_device *udev, struct fwentry *fwe)
at76_dbg(DBG_DEVSTART, "opmode %d", op_mode);

if (op_mode != OPMODE_NORMAL_NIC_WITHOUT_FLASH) {
dev_printk(KERN_ERR, &udev->dev, "unexpected opmode %d\n",
op_mode);
dev_err(&udev->dev, "unexpected opmode %d\n", op_mode);
return -EINVAL;
}

Expand All @@ -1275,9 +1274,9 @@ static int at76_load_external_fw(struct usb_device *udev, struct fwentry *fwe)
size, bsize, blockno);
ret = at76_load_ext_fw_block(udev, blockno, block, bsize);
if (ret != bsize) {
dev_printk(KERN_ERR, &udev->dev,
"loading %dth firmware block failed: %d\n",
blockno, ret);
dev_err(&udev->dev,
"loading %dth firmware block failed: %d\n",
blockno, ret);
goto exit;
}
buf += bsize;
Expand All @@ -1293,8 +1292,8 @@ static int at76_load_external_fw(struct usb_device *udev, struct fwentry *fwe)
exit:
kfree(block);
if (ret < 0)
dev_printk(KERN_ERR, &udev->dev,
"downloading external firmware failed: %d\n", ret);
dev_err(&udev->dev,
"downloading external firmware failed: %d\n", ret);
return ret;
}

Expand All @@ -1308,8 +1307,8 @@ static int at76_load_internal_fw(struct usb_device *udev, struct fwentry *fwe)
need_remap ? 0 : 2 * HZ);

if (ret < 0) {
dev_printk(KERN_ERR, &udev->dev,
"downloading internal fw failed with %d\n", ret);
dev_err(&udev->dev,
"downloading internal fw failed with %d\n", ret);
goto exit;
}

Expand All @@ -1319,8 +1318,8 @@ static int at76_load_internal_fw(struct usb_device *udev, struct fwentry *fwe)
if (need_remap) {
ret = at76_remap(udev);
if (ret < 0) {
dev_printk(KERN_ERR, &udev->dev,
"sending REMAP failed with %d\n", ret);
dev_err(&udev->dev,
"sending REMAP failed with %d\n", ret);
goto exit;
}
}
Expand Down Expand Up @@ -1555,29 +1554,28 @@ static struct fwentry *at76_load_firmware(struct usb_device *udev,
at76_dbg(DBG_FW, "downloading firmware %s", fwe->fwname);
ret = request_firmware(&fwe->fw, fwe->fwname, &udev->dev);
if (ret < 0) {
dev_printk(KERN_ERR, &udev->dev, "firmware %s not found!\n",
fwe->fwname);
dev_printk(KERN_ERR, &udev->dev,
"you may need to download the firmware from "
"http://developer.berlios.de/projects/at76c503a/\n");
dev_err(&udev->dev, "firmware %s not found!\n",
fwe->fwname);
dev_err(&udev->dev,
"you may need to download the firmware from http://developer.berlios.de/projects/at76c503a/\n");
goto exit;
}

at76_dbg(DBG_FW, "got it.");
fwh = (struct at76_fw_header *)(fwe->fw->data);

if (fwe->fw->size <= sizeof(*fwh)) {
dev_printk(KERN_ERR, &udev->dev,
"firmware is too short (0x%zx)\n", fwe->fw->size);
dev_err(&udev->dev,
"firmware is too short (0x%zx)\n", fwe->fw->size);
goto exit;
}

/* CRC currently not checked */
fwe->board_type = le32_to_cpu(fwh->board_type);
if (fwe->board_type != board_type) {
dev_printk(KERN_ERR, &udev->dev,
"board type mismatch, requested %u, got %u\n",
board_type, fwe->board_type);
dev_err(&udev->dev,
"board type mismatch, requested %u, got %u\n",
board_type, fwe->board_type);
goto exit;
}

Expand Down Expand Up @@ -2150,8 +2148,7 @@ static int at76_alloc_urbs(struct at76_priv *priv,
}

if (!ep_in || !ep_out) {
dev_printk(KERN_ERR, &interface->dev,
"bulk endpoints missing\n");
dev_err(&interface->dev, "bulk endpoints missing\n");
return -ENXIO;
}

Expand All @@ -2161,15 +2158,14 @@ static int at76_alloc_urbs(struct at76_priv *priv,
priv->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
priv->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!priv->rx_urb || !priv->tx_urb) {
dev_printk(KERN_ERR, &interface->dev, "cannot allocate URB\n");
dev_err(&interface->dev, "cannot allocate URB\n");
return -ENOMEM;
}

buffer_size = sizeof(struct at76_tx_buffer) + MAX_PADDING_SIZE;
priv->bulk_out_buffer = kmalloc(buffer_size, GFP_KERNEL);
if (!priv->bulk_out_buffer) {
dev_printk(KERN_ERR, &interface->dev,
"cannot allocate output buffer\n");
dev_err(&interface->dev, "cannot allocate output buffer\n");
return -ENOMEM;
}

Expand Down Expand Up @@ -2230,8 +2226,7 @@ static int at76_init_new_device(struct at76_priv *priv,
/* MAC address */
ret = at76_get_hw_config(priv);
if (ret < 0) {
dev_printk(KERN_ERR, &interface->dev,
"cannot get MAC address\n");
dev_err(&interface->dev, "cannot get MAC address\n");
goto exit;
}

Expand Down Expand Up @@ -2358,8 +2353,8 @@ static int at76_probe(struct usb_interface *interface,
we get 204 with 2.4.23, Fiberline FL-WL240u (505A+RFMD2958) ??? */

if (op_mode == OPMODE_HW_CONFIG_MODE) {
dev_printk(KERN_ERR, &interface->dev,
"cannot handle a device in HW_CONFIG_MODE\n");
dev_err(&interface->dev,
"cannot handle a device in HW_CONFIG_MODE\n");
ret = -EBUSY;
goto error;
}
Expand All @@ -2371,9 +2366,9 @@ static int at76_probe(struct usb_interface *interface,
"downloading internal firmware\n");
ret = at76_load_internal_fw(udev, fwe);
if (ret < 0) {
dev_printk(KERN_ERR, &interface->dev,
"error %d downloading internal firmware\n",
ret);
dev_err(&interface->dev,
"error %d downloading internal firmware\n",
ret);
goto error;
}
usb_put_dev(udev);
Expand Down Expand Up @@ -2408,8 +2403,8 @@ static int at76_probe(struct usb_interface *interface,
/* Re-check firmware version */
ret = at76_get_mib(udev, MIB_FW_VERSION, &fwv, sizeof(fwv));
if (ret < 0) {
dev_printk(KERN_ERR, &interface->dev,
"error %d getting firmware version\n", ret);
dev_err(&interface->dev,
"error %d getting firmware version\n", ret);
goto error;
}
}
Expand Down Expand Up @@ -2449,7 +2444,7 @@ static void at76_disconnect(struct usb_interface *interface)

wiphy_info(priv->hw->wiphy, "disconnecting\n");
at76_delete_device(priv);
dev_printk(KERN_INFO, &interface->dev, "disconnected\n");
dev_info(&interface->dev, "disconnected\n");
}

/* Structure for registering this driver with the USB subsystem */
Expand Down
60 changes: 26 additions & 34 deletions drivers/net/wireless/ath/ar5523/ar5523.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,19 @@ static void ar5523_read_reply(struct ar5523 *ar, struct ar5523_cmd_hdr *hdr,
struct ar5523_tx_cmd *cmd)
{
int dlen, olen;
u32 *rp;
__be32 *rp;

dlen = hdr->len - sizeof(*hdr);
dlen = be32_to_cpu(hdr->len) - sizeof(*hdr);

if (dlen < 0) {
WARN_ON(1);
goto out;
}

ar5523_dbg(ar, "Code = %d len = %d\n", hdr->code & 0xff, dlen);
ar5523_dbg(ar, "Code = %d len = %d\n", be32_to_cpu(hdr->code) & 0xff,
dlen);

rp = (u32 *)(hdr + 1);
rp = (__be32 *)(hdr + 1);
if (dlen >= sizeof(u32)) {
olen = be32_to_cpu(rp[0]);
dlen -= sizeof(u32);
Expand Down Expand Up @@ -95,6 +96,7 @@ static void ar5523_cmd_rx_cb(struct urb *urb)
struct ar5523_tx_cmd *cmd = &ar->tx_cmd;
struct ar5523_cmd_hdr *hdr = ar->rx_cmd_buf;
int dlen;
u32 code, hdrlen;

if (urb->status) {
if (urb->status != -ESHUTDOWN)
Expand All @@ -110,15 +112,15 @@ static void ar5523_cmd_rx_cb(struct urb *urb)
ar5523_dbg(ar, "%s code %02x priv %d\n", __func__,
be32_to_cpu(hdr->code) & 0xff, hdr->priv);

hdr->code = be32_to_cpu(hdr->code);
hdr->len = be32_to_cpu(hdr->len);
code = be32_to_cpu(hdr->code);
hdrlen = be32_to_cpu(hdr->len);

switch (hdr->code & 0xff) {
switch (code & 0xff) {
default:
/* reply to a read command */
if (hdr->priv != AR5523_CMD_ID) {
ar5523_err(ar, "Unexpected command id: %02x\n",
hdr->code & 0xff);
code & 0xff);
goto skip;
}
ar5523_read_reply(ar, hdr, cmd);
Expand Down Expand Up @@ -147,7 +149,7 @@ static void ar5523_cmd_rx_cb(struct urb *urb)
case WDCMSG_TARGET_START:
/* This command returns a bogus id so it needs special
handling */
dlen = hdr->len - sizeof(*hdr);
dlen = hdrlen - sizeof(*hdr);
if (dlen != (int)sizeof(u32)) {
ar5523_err(ar, "Invalid reply to WDCMSG_TARGET_START");
return;
Expand Down Expand Up @@ -303,7 +305,7 @@ static int ar5523_config(struct ar5523 *ar, u32 reg, u32 val)

write.reg = cpu_to_be32(reg);
write.len = cpu_to_be32(0); /* 0 = single write */
*(u32 *)write.data = cpu_to_be32(val);
*(__be32 *)write.data = cpu_to_be32(val);

error = ar5523_cmd_write(ar, WDCMSG_TARGET_SET_CONFIG, &write,
3 * sizeof(u32), 0);
Expand Down Expand Up @@ -335,29 +337,30 @@ static int ar5523_get_status(struct ar5523 *ar, u32 which, void *odata,
int olen)
{
int error;
__be32 which_be;

which = cpu_to_be32(which);
which_be = cpu_to_be32(which);
error = ar5523_cmd_read(ar, WDCMSG_TARGET_GET_STATUS,
&which, sizeof(which), odata, olen, AR5523_CMD_FLAG_MAGIC);
&which_be, sizeof(which_be), odata, olen, AR5523_CMD_FLAG_MAGIC);
if (error != 0)
ar5523_err(ar, "could not read EEPROM offset 0x%02x\n",
be32_to_cpu(which));
ar5523_err(ar, "could not read EEPROM offset 0x%02x\n", which);
return error;
}

static int ar5523_get_capability(struct ar5523 *ar, u32 cap, u32 *val)
{
int error;
__be32 cap_be, val_be;

cap = cpu_to_be32(cap);
error = ar5523_cmd_read(ar, WDCMSG_TARGET_GET_CAPABILITY,
&cap, sizeof(cap), val, sizeof(u32), AR5523_CMD_FLAG_MAGIC);
cap_be = cpu_to_be32(cap);
error = ar5523_cmd_read(ar, WDCMSG_TARGET_GET_CAPABILITY, &cap_be,
sizeof(cap_be), &val_be, sizeof(__be32),
AR5523_CMD_FLAG_MAGIC);
if (error != 0) {
ar5523_err(ar, "could not read capability %u\n",
be32_to_cpu(cap));
ar5523_err(ar, "could not read capability %u\n", cap);
return error;
}
*val = be32_to_cpu(*val);
*val = be32_to_cpu(val_be);
return error;
}

Expand Down Expand Up @@ -1193,8 +1196,8 @@ static void ar5523_create_rateset(struct ar5523 *ar,
if (!sta) {
ar5523_info(ar, "STA not found. Cannot set rates\n");
sta_rate_set = bss_conf->basic_rates;
}
sta_rate_set = sta->supp_rates[ar->hw->conf.channel->band];
} else
sta_rate_set = sta->supp_rates[ar->hw->conf.channel->band];

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

Expand Down Expand Up @@ -1789,18 +1792,7 @@ static struct usb_driver ar5523_driver = {
.disconnect = ar5523_disconnect,
};

static int __init ar5523_init(void)
{
return usb_register(&ar5523_driver);
}

static void __exit ar5523_exit(void)
{
usb_deregister(&ar5523_driver);
}
module_usb_driver(ar5523_driver);

MODULE_LICENSE("Dual BSD/GPL");
MODULE_FIRMWARE(AR5523_FIRMWARE_FILE);

module_init(ar5523_init);
module_exit(ar5523_exit);
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ar5523/ar5523_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ struct ar5523_rx_desc {

struct ar5523_tx_desc {
__be32 msglen;
__be32 msgid; /* msg id (supplied by host) */
u32 msgid; /* msg id (supplied by host) */
__be32 type; /* opcode: WDMSG_SEND or WDCMSG_FLUSH */
__be32 txqid; /* tx queue id and flags */
#define UATH_TXQID_MASK 0x0f
Expand Down
Loading

0 comments on commit 79d38f7

Please sign in to comment.