You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts: drivers/net/wireless/iwlwifi/pcie/tx.c
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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) },
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -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:
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -1555,11 +1554,10 @@ 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;
|
||||
}
|
||||
|
||||
@@ -1567,17 +1565,17 @@ static struct fwentry *at76_load_firmware(struct usb_device *udev,
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
@@ -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)
|
||||
@@ -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);
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -236,17 +236,4 @@ static struct platform_driver ath_ahb_driver = {
|
||||
},
|
||||
};
|
||||
|
||||
static int __init
|
||||
ath5k_ahb_init(void)
|
||||
{
|
||||
return platform_driver_register(&ath_ahb_driver);
|
||||
}
|
||||
|
||||
static void __exit
|
||||
ath5k_ahb_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&ath_ahb_driver);
|
||||
}
|
||||
|
||||
module_init(ath5k_ahb_init);
|
||||
module_exit(ath5k_ahb_exit);
|
||||
module_platform_driver(ath_ahb_driver);
|
||||
|
||||
@@ -511,8 +511,9 @@ ath5k_update_bssid_mask_and_opmode(struct ath5k_hw *ah,
|
||||
ath5k_vif_iter(&iter_data, vif->addr, vif);
|
||||
|
||||
/* Get list of all active MAC addresses */
|
||||
ieee80211_iterate_active_interfaces_atomic(ah->hw, ath5k_vif_iter,
|
||||
&iter_data);
|
||||
ieee80211_iterate_active_interfaces_atomic(
|
||||
ah->hw, IEEE80211_IFACE_ITER_RESUME_ALL,
|
||||
ath5k_vif_iter, &iter_data);
|
||||
memcpy(ah->bssidmask, iter_data.mask, ETH_ALEN);
|
||||
|
||||
ah->opmode = iter_data.opmode;
|
||||
@@ -1348,7 +1349,7 @@ ath5k_receive_frame(struct ath5k_hw *ah, struct sk_buff *skb,
|
||||
* right now, so it's not too bad...
|
||||
*/
|
||||
rxs->mactime = ath5k_extend_tsf(ah, rs->rs_tstamp);
|
||||
rxs->flag |= RX_FLAG_MACTIME_MPDU;
|
||||
rxs->flag |= RX_FLAG_MACTIME_START;
|
||||
|
||||
rxs->freq = ah->curchan->center_freq;
|
||||
rxs->band = ah->curchan->band;
|
||||
@@ -3045,8 +3046,9 @@ ath5k_any_vif_assoc(struct ath5k_hw *ah)
|
||||
iter_data.need_set_hw_addr = false;
|
||||
iter_data.found_active = true;
|
||||
|
||||
ieee80211_iterate_active_interfaces_atomic(ah->hw, ath5k_vif_iter,
|
||||
&iter_data);
|
||||
ieee80211_iterate_active_interfaces_atomic(
|
||||
ah->hw, IEEE80211_IFACE_ITER_RESUME_ALL,
|
||||
ath5k_vif_iter, &iter_data);
|
||||
return iter_data.any_assoc;
|
||||
}
|
||||
|
||||
|
||||
@@ -452,8 +452,9 @@ ath5k_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags,
|
||||
iter_data.hw_macaddr = NULL;
|
||||
iter_data.n_stas = 0;
|
||||
iter_data.need_set_hw_addr = false;
|
||||
ieee80211_iterate_active_interfaces_atomic(ah->hw, ath5k_vif_iter,
|
||||
&iter_data);
|
||||
ieee80211_iterate_active_interfaces_atomic(
|
||||
ah->hw, IEEE80211_IFACE_ITER_RESUME_ALL,
|
||||
ath5k_vif_iter, &iter_data);
|
||||
|
||||
/* Set up RX Filter */
|
||||
if (iter_data.n_stas > 1) {
|
||||
|
||||
@@ -789,9 +789,9 @@ ath5k_hw_nic_wakeup(struct ath5k_hw *ah, struct ieee80211_channel *channel)
|
||||
* (I don't think it supports 44MHz) */
|
||||
/* On 2425 initvals TURBO_SHORT is not present */
|
||||
if (ah->ah_bwmode == AR5K_BWMODE_40MHZ) {
|
||||
turbo = AR5K_PHY_TURBO_MODE |
|
||||
(ah->ah_radio == AR5K_RF2425) ? 0 :
|
||||
AR5K_PHY_TURBO_SHORT;
|
||||
turbo = AR5K_PHY_TURBO_MODE;
|
||||
if (ah->ah_radio != AR5K_RF2425)
|
||||
turbo |= AR5K_PHY_TURBO_SHORT;
|
||||
} else if (ah->ah_bwmode != AR5K_BWMODE_DEFAULT) {
|
||||
if (ah->ah_radio == AR5K_RF5413) {
|
||||
mode |= (ah->ah_bwmode == AR5K_BWMODE_10MHZ) ?
|
||||
|
||||
@@ -30,3 +30,12 @@ config ATH6KL_DEBUG
|
||||
depends on ATH6KL
|
||||
---help---
|
||||
Enables debug support
|
||||
|
||||
config ATH6KL_REGDOMAIN
|
||||
bool "Atheros ath6kl regdomain support"
|
||||
depends on ATH6KL
|
||||
depends on CFG80211_CERTIFICATION_ONUS
|
||||
---help---
|
||||
Enabling this makes it possible to change the regdomain in
|
||||
the firmware. This can be only enabled if regulatory requirements
|
||||
are taken into account.
|
||||
|
||||
@@ -34,6 +34,7 @@ ath6kl_core-y += main.o
|
||||
ath6kl_core-y += txrx.o
|
||||
ath6kl_core-y += wmi.o
|
||||
ath6kl_core-y += core.o
|
||||
ath6kl_core-y += recovery.o
|
||||
ath6kl_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
|
||||
|
||||
obj-$(CONFIG_ATH6KL_SDIO) += ath6kl_sdio.o
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,6 @@ enum ath6kl_cfg_suspend_mode {
|
||||
ATH6KL_CFG_SUSPEND_DEEPSLEEP,
|
||||
ATH6KL_CFG_SUSPEND_CUTPOWER,
|
||||
ATH6KL_CFG_SUSPEND_WOW,
|
||||
ATH6KL_CFG_SUSPEND_SCHED_SCAN,
|
||||
};
|
||||
|
||||
struct wireless_dev *ath6kl_interface_add(struct ath6kl *ar, const char *name,
|
||||
|
||||
@@ -33,6 +33,8 @@ static unsigned int wow_mode;
|
||||
static unsigned int uart_debug;
|
||||
static unsigned int ath6kl_p2p;
|
||||
static unsigned int testmode;
|
||||
static unsigned int recovery_enable;
|
||||
static unsigned int heart_beat_poll;
|
||||
|
||||
module_param(debug_mask, uint, 0644);
|
||||
module_param(suspend_mode, uint, 0644);
|
||||
@@ -40,6 +42,12 @@ module_param(wow_mode, uint, 0644);
|
||||
module_param(uart_debug, uint, 0644);
|
||||
module_param(ath6kl_p2p, uint, 0644);
|
||||
module_param(testmode, uint, 0644);
|
||||
module_param(recovery_enable, uint, 0644);
|
||||
module_param(heart_beat_poll, uint, 0644);
|
||||
MODULE_PARM_DESC(recovery_enable, "Enable recovery from firmware error");
|
||||
MODULE_PARM_DESC(heart_beat_poll, "Enable fw error detection periodic" \
|
||||
"polling. This also specifies the polling interval in" \
|
||||
"msecs. Set reocvery_enable for this to be effective");
|
||||
|
||||
void ath6kl_core_tx_complete(struct ath6kl *ar, struct sk_buff *skb)
|
||||
{
|
||||
@@ -202,6 +210,17 @@ int ath6kl_core_init(struct ath6kl *ar, enum ath6kl_htc_type htc_type)
|
||||
ath6kl_dbg(ATH6KL_DBG_TRC, "%s: name=%s dev=0x%p, ar=0x%p\n",
|
||||
__func__, wdev->netdev->name, wdev->netdev, ar);
|
||||
|
||||
ar->fw_recovery.enable = !!recovery_enable;
|
||||
if (!ar->fw_recovery.enable)
|
||||
return ret;
|
||||
|
||||
if (heart_beat_poll &&
|
||||
test_bit(ATH6KL_FW_CAPABILITY_HEART_BEAT_POLL,
|
||||
ar->fw_capabilities))
|
||||
ar->fw_recovery.hb_poll = heart_beat_poll;
|
||||
|
||||
ath6kl_recovery_init(ar);
|
||||
|
||||
return ret;
|
||||
|
||||
err_rxbuf_cleanup:
|
||||
@@ -291,6 +310,8 @@ void ath6kl_core_cleanup(struct ath6kl *ar)
|
||||
{
|
||||
ath6kl_hif_power_off(ar);
|
||||
|
||||
ath6kl_recovery_cleanup(ar);
|
||||
|
||||
destroy_workqueue(ar->ath6kl_wq);
|
||||
|
||||
if (ar->htc_target)
|
||||
|
||||
@@ -115,6 +115,27 @@ enum ath6kl_fw_capability {
|
||||
*/
|
||||
ATH6KL_FW_CAPABILITY_SCHED_SCAN_MATCH_LIST,
|
||||
|
||||
/* Firmware supports filtering BSS results by RSSI */
|
||||
ATH6KL_FW_CAPABILITY_RSSI_SCAN_THOLD,
|
||||
|
||||
/* FW sets mac_addr[4] ^= 0x80 for newly created interfaces */
|
||||
ATH6KL_FW_CAPABILITY_CUSTOM_MAC_ADDR,
|
||||
|
||||
/* Firmware supports TX error rate notification */
|
||||
ATH6KL_FW_CAPABILITY_TX_ERR_NOTIFY,
|
||||
|
||||
/* supports WMI_SET_REGDOMAIN_CMDID command */
|
||||
ATH6KL_FW_CAPABILITY_REGDOMAIN,
|
||||
|
||||
/* Firmware supports sched scan decoupled from host sleep */
|
||||
ATH6KL_FW_CAPABILITY_SCHED_SCAN_V2,
|
||||
|
||||
/*
|
||||
* Firmware capability for hang detection through heart beat
|
||||
* challenge messages.
|
||||
*/
|
||||
ATH6KL_FW_CAPABILITY_HEART_BEAT_POLL,
|
||||
|
||||
/* this needs to be last */
|
||||
ATH6KL_FW_CAPABILITY_MAX,
|
||||
};
|
||||
@@ -128,11 +149,15 @@ struct ath6kl_fw_ie {
|
||||
};
|
||||
|
||||
enum ath6kl_hw_flags {
|
||||
ATH6KL_HW_FLAG_64BIT_RATES = BIT(0),
|
||||
ATH6KL_HW_64BIT_RATES = BIT(0),
|
||||
ATH6KL_HW_AP_INACTIVITY_MINS = BIT(1),
|
||||
ATH6KL_HW_MAP_LP_ENDPOINT = BIT(2),
|
||||
ATH6KL_HW_SDIO_CRC_ERROR_WAR = BIT(3),
|
||||
};
|
||||
|
||||
#define ATH6KL_FW_API2_FILE "fw-2.bin"
|
||||
#define ATH6KL_FW_API3_FILE "fw-3.bin"
|
||||
#define ATH6KL_FW_API4_FILE "fw-4.bin"
|
||||
|
||||
/* AR6003 1.0 definitions */
|
||||
#define AR6003_HW_1_0_VERSION 0x300002ba
|
||||
@@ -186,6 +211,13 @@ enum ath6kl_hw_flags {
|
||||
#define AR6004_HW_1_2_DEFAULT_BOARD_DATA_FILE \
|
||||
AR6004_HW_1_2_FW_DIR "/bdata.bin"
|
||||
|
||||
/* AR6004 1.3 definitions */
|
||||
#define AR6004_HW_1_3_VERSION 0x31c8088a
|
||||
#define AR6004_HW_1_3_FW_DIR "ath6k/AR6004/hw1.3"
|
||||
#define AR6004_HW_1_3_FIRMWARE_FILE "fw.ram.bin"
|
||||
#define AR6004_HW_1_3_BOARD_DATA_FILE "ath6k/AR6004/hw1.3/bdata.bin"
|
||||
#define AR6004_HW_1_3_DEFAULT_BOARD_DATA_FILE "ath6k/AR6004/hw1.3/bdata.bin"
|
||||
|
||||
/* Per STA data, used in AP mode */
|
||||
#define STA_PS_AWAKE BIT(0)
|
||||
#define STA_PS_SLEEP BIT(1)
|
||||
@@ -536,6 +568,7 @@ enum ath6kl_vif_state {
|
||||
HOST_SLEEP_MODE_CMD_PROCESSED,
|
||||
NETDEV_MCAST_ALL_ON,
|
||||
NETDEV_MCAST_ALL_OFF,
|
||||
SCHED_SCANNING,
|
||||
};
|
||||
|
||||
struct ath6kl_vif {
|
||||
@@ -580,11 +613,13 @@ struct ath6kl_vif {
|
||||
u16 assoc_bss_beacon_int;
|
||||
u16 listen_intvl_t;
|
||||
u16 bmiss_time_t;
|
||||
u32 txe_intvl;
|
||||
u16 bg_scan_period;
|
||||
u8 assoc_bss_dtim_period;
|
||||
struct net_device_stats net_stats;
|
||||
struct target_stats target_stats;
|
||||
struct wmi_connect_cmd profile;
|
||||
u16 rsn_capab;
|
||||
|
||||
struct list_head mc_filter;
|
||||
};
|
||||
@@ -609,6 +644,7 @@ enum ath6kl_dev_state {
|
||||
SKIP_SCAN,
|
||||
ROAM_TBL_PEND,
|
||||
FIRST_BOOT,
|
||||
RECOVERY_CLEANUP,
|
||||
};
|
||||
|
||||
enum ath6kl_state {
|
||||
@@ -619,7 +655,16 @@ enum ath6kl_state {
|
||||
ATH6KL_STATE_DEEPSLEEP,
|
||||
ATH6KL_STATE_CUTPOWER,
|
||||
ATH6KL_STATE_WOW,
|
||||
ATH6KL_STATE_SCHED_SCAN,
|
||||
ATH6KL_STATE_RECOVERY,
|
||||
};
|
||||
|
||||
/* Fw error recovery */
|
||||
#define ATH6KL_HB_RESP_MISS_THRES 5
|
||||
|
||||
enum ath6kl_fw_err {
|
||||
ATH6KL_FW_ASSERT,
|
||||
ATH6KL_FW_HB_RESP_FAILURE,
|
||||
ATH6KL_FW_EP_FULL,
|
||||
};
|
||||
|
||||
struct ath6kl {
|
||||
@@ -679,6 +724,7 @@ struct ath6kl {
|
||||
struct ath6kl_req_key ap_mode_bkey;
|
||||
struct sk_buff_head mcastpsq;
|
||||
u32 want_ch_switch;
|
||||
u16 last_ch;
|
||||
|
||||
/*
|
||||
* FIXME: protects access to mcastpsq but is actually useless as
|
||||
@@ -764,6 +810,17 @@ struct ath6kl {
|
||||
|
||||
bool wiphy_registered;
|
||||
|
||||
struct ath6kl_fw_recovery {
|
||||
struct work_struct recovery_work;
|
||||
unsigned long err_reason;
|
||||
unsigned long hb_poll;
|
||||
struct timer_list hb_timer;
|
||||
u32 seq_num;
|
||||
bool hb_pending;
|
||||
u8 hb_misscnt;
|
||||
bool enable;
|
||||
} fw_recovery;
|
||||
|
||||
#ifdef CONFIG_ATH6KL_DEBUG
|
||||
struct {
|
||||
struct sk_buff_head fwlog_queue;
|
||||
@@ -899,4 +956,12 @@ int ath6kl_core_init(struct ath6kl *ar, enum ath6kl_htc_type htc_type);
|
||||
void ath6kl_core_cleanup(struct ath6kl *ar);
|
||||
void ath6kl_core_destroy(struct ath6kl *ar);
|
||||
|
||||
/* Fw error recovery */
|
||||
void ath6kl_init_hw_restart(struct ath6kl *ar);
|
||||
void ath6kl_recovery_err_notify(struct ath6kl *ar, enum ath6kl_fw_err reason);
|
||||
void ath6kl_recovery_hb_event(struct ath6kl *ar, u32 cookie);
|
||||
void ath6kl_recovery_init(struct ath6kl *ar);
|
||||
void ath6kl_recovery_cleanup(struct ath6kl *ar);
|
||||
void ath6kl_recovery_suspend(struct ath6kl *ar);
|
||||
void ath6kl_recovery_resume(struct ath6kl *ar);
|
||||
#endif /* CORE_H */
|
||||
|
||||
@@ -44,6 +44,7 @@ enum ATH6K_DEBUG_MASK {
|
||||
ATH6KL_DBG_SUSPEND = BIT(20),
|
||||
ATH6KL_DBG_USB = BIT(21),
|
||||
ATH6KL_DBG_USB_BULK = BIT(22),
|
||||
ATH6KL_DBG_RECOVERY = BIT(23),
|
||||
ATH6KL_DBG_ANY = 0xffffffff /* enable all logs */
|
||||
};
|
||||
|
||||
|
||||
@@ -136,6 +136,7 @@ static int ath6kl_hif_proc_dbg_intr(struct ath6kl_device *dev)
|
||||
|
||||
ath6kl_hif_dump_fw_crash(dev->ar);
|
||||
ath6kl_read_fwlogs(dev->ar);
|
||||
ath6kl_recovery_err_notify(dev->ar, ATH6KL_FW_ASSERT);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -338,8 +339,7 @@ static int ath6kl_hif_proc_err_intr(struct ath6kl_device *dev)
|
||||
status = hif_read_write_sync(dev->ar, ERROR_INT_STATUS_ADDRESS,
|
||||
reg_buf, 4, HIF_WR_SYNC_BYTE_FIX);
|
||||
|
||||
if (status)
|
||||
WARN_ON(1);
|
||||
WARN_ON(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -383,8 +383,7 @@ static int ath6kl_hif_proc_cpu_intr(struct ath6kl_device *dev)
|
||||
status = hif_read_write_sync(dev->ar, CPU_INT_STATUS_ADDRESS,
|
||||
reg_buf, 4, HIF_WR_SYNC_BYTE_FIX);
|
||||
|
||||
if (status)
|
||||
WARN_ON(1);
|
||||
WARN_ON(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -695,11 +694,6 @@ int ath6kl_hif_setup(struct ath6kl_device *dev)
|
||||
ath6kl_dbg(ATH6KL_DBG_HIF, "hif block size %d mbox addr 0x%x\n",
|
||||
dev->htc_cnxt->block_sz, dev->ar->mbox_info.htc_addr);
|
||||
|
||||
/* usb doesn't support enabling interrupts */
|
||||
/* FIXME: remove check once USB support is implemented */
|
||||
if (dev->ar->hif_type == ATH6KL_HIF_TYPE_USB)
|
||||
return 0;
|
||||
|
||||
status = ath6kl_hif_disable_intrs(dev);
|
||||
|
||||
fail_setup:
|
||||
|
||||
@@ -2492,7 +2492,8 @@ static int ath6kl_htc_mbox_conn_service(struct htc_target *target,
|
||||
max_msg_sz = le16_to_cpu(resp_msg->max_msg_sz);
|
||||
}
|
||||
|
||||
if (assigned_ep >= ENDPOINT_MAX || !max_msg_sz) {
|
||||
if (WARN_ON_ONCE(assigned_ep == ENDPOINT_UNUSED ||
|
||||
assigned_ep >= ENDPOINT_MAX || !max_msg_sz)) {
|
||||
status = -ENOMEM;
|
||||
goto fail_tx;
|
||||
}
|
||||
@@ -2655,12 +2656,6 @@ static int ath6kl_htc_mbox_wait_target(struct htc_target *target)
|
||||
struct htc_service_connect_resp resp;
|
||||
int status;
|
||||
|
||||
/* FIXME: remove once USB support is implemented */
|
||||
if (target->dev->ar->hif_type == ATH6KL_HIF_TYPE_USB) {
|
||||
ath6kl_err("HTC doesn't support USB yet. Patience!\n");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
/* we should be getting 1 control message that the target is ready */
|
||||
packet = htc_wait_for_ctrl_msg(target);
|
||||
|
||||
@@ -2890,9 +2885,7 @@ static void ath6kl_htc_mbox_cleanup(struct htc_target *target)
|
||||
{
|
||||
struct htc_packet *packet, *tmp_packet;
|
||||
|
||||
/* FIXME: remove check once USB support is implemented */
|
||||
if (target->dev->ar->hif_type != ATH6KL_HIF_TYPE_USB)
|
||||
ath6kl_hif_cleanup_scatter(target->dev->ar);
|
||||
ath6kl_hif_cleanup_scatter(target->dev->ar);
|
||||
|
||||
list_for_each_entry_safe(packet, tmp_packet,
|
||||
&target->free_ctrl_txbuf, list) {
|
||||
|
||||
@@ -374,9 +374,8 @@ static enum htc_send_queue_result htc_try_send(struct htc_target *target,
|
||||
packet = list_first_entry(txq,
|
||||
struct htc_packet,
|
||||
list);
|
||||
list_del(&packet->list);
|
||||
/* insert into local queue */
|
||||
list_add_tail(&packet->list, &send_queue);
|
||||
/* move to local queue */
|
||||
list_move_tail(&packet->list, &send_queue);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -399,11 +398,10 @@ static enum htc_send_queue_result htc_try_send(struct htc_target *target,
|
||||
* for cleanup */
|
||||
} else {
|
||||
/* callback wants to keep this packet,
|
||||
* remove from caller's queue */
|
||||
list_del(&packet->list);
|
||||
/* put it in the send queue */
|
||||
list_add_tail(&packet->list,
|
||||
&send_queue);
|
||||
* move from caller's queue to the send
|
||||
* queue */
|
||||
list_move_tail(&packet->list,
|
||||
&send_queue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ static const struct ath6kl_hw hw_list[] = {
|
||||
.reserved_ram_size = 6912,
|
||||
.refclk_hz = 26000000,
|
||||
.uarttx_pin = 8,
|
||||
.flags = 0,
|
||||
.flags = ATH6KL_HW_SDIO_CRC_ERROR_WAR,
|
||||
|
||||
/* hw2.0 needs override address hardcoded */
|
||||
.app_start_override_addr = 0x944C00,
|
||||
@@ -68,7 +68,7 @@ static const struct ath6kl_hw hw_list[] = {
|
||||
.refclk_hz = 26000000,
|
||||
.uarttx_pin = 8,
|
||||
.testscript_addr = 0x57ef74,
|
||||
.flags = 0,
|
||||
.flags = ATH6KL_HW_SDIO_CRC_ERROR_WAR,
|
||||
|
||||
.fw = {
|
||||
.dir = AR6003_HW_2_1_1_FW_DIR,
|
||||
@@ -93,7 +93,8 @@ static const struct ath6kl_hw hw_list[] = {
|
||||
.board_addr = 0x433900,
|
||||
.refclk_hz = 26000000,
|
||||
.uarttx_pin = 11,
|
||||
.flags = ATH6KL_HW_FLAG_64BIT_RATES,
|
||||
.flags = ATH6KL_HW_64BIT_RATES |
|
||||
ATH6KL_HW_AP_INACTIVITY_MINS,
|
||||
|
||||
.fw = {
|
||||
.dir = AR6004_HW_1_0_FW_DIR,
|
||||
@@ -113,8 +114,8 @@ static const struct ath6kl_hw hw_list[] = {
|
||||
.board_addr = 0x43d400,
|
||||
.refclk_hz = 40000000,
|
||||
.uarttx_pin = 11,
|
||||
.flags = ATH6KL_HW_FLAG_64BIT_RATES,
|
||||
|
||||
.flags = ATH6KL_HW_64BIT_RATES |
|
||||
ATH6KL_HW_AP_INACTIVITY_MINS,
|
||||
.fw = {
|
||||
.dir = AR6004_HW_1_1_FW_DIR,
|
||||
.fw = AR6004_HW_1_1_FIRMWARE_FILE,
|
||||
@@ -133,7 +134,8 @@ static const struct ath6kl_hw hw_list[] = {
|
||||
.board_addr = 0x435c00,
|
||||
.refclk_hz = 40000000,
|
||||
.uarttx_pin = 11,
|
||||
.flags = ATH6KL_HW_FLAG_64BIT_RATES,
|
||||
.flags = ATH6KL_HW_64BIT_RATES |
|
||||
ATH6KL_HW_AP_INACTIVITY_MINS,
|
||||
|
||||
.fw = {
|
||||
.dir = AR6004_HW_1_2_FW_DIR,
|
||||
@@ -142,6 +144,28 @@ static const struct ath6kl_hw hw_list[] = {
|
||||
.fw_board = AR6004_HW_1_2_BOARD_DATA_FILE,
|
||||
.fw_default_board = AR6004_HW_1_2_DEFAULT_BOARD_DATA_FILE,
|
||||
},
|
||||
{
|
||||
.id = AR6004_HW_1_3_VERSION,
|
||||
.name = "ar6004 hw 1.3",
|
||||
.dataset_patch_addr = 0x437860,
|
||||
.app_load_addr = 0x1234,
|
||||
.board_ext_data_addr = 0x437000,
|
||||
.reserved_ram_size = 7168,
|
||||
.board_addr = 0x436400,
|
||||
.refclk_hz = 40000000,
|
||||
.uarttx_pin = 11,
|
||||
.flags = ATH6KL_HW_64BIT_RATES |
|
||||
ATH6KL_HW_AP_INACTIVITY_MINS |
|
||||
ATH6KL_HW_MAP_LP_ENDPOINT,
|
||||
|
||||
.fw = {
|
||||
.dir = AR6004_HW_1_3_FW_DIR,
|
||||
.fw = AR6004_HW_1_3_FIRMWARE_FILE,
|
||||
},
|
||||
|
||||
.fw_board = AR6004_HW_1_3_BOARD_DATA_FILE,
|
||||
.fw_default_board = AR6004_HW_1_3_DEFAULT_BOARD_DATA_FILE,
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -337,7 +361,7 @@ static int ath6kl_init_service_ep(struct ath6kl *ar)
|
||||
if (ath6kl_connectservice(ar, &connect, "WMI DATA BK"))
|
||||
return -EIO;
|
||||
|
||||
/* connect to Video service, map this to to HI PRI */
|
||||
/* connect to Video service, map this to HI PRI */
|
||||
connect.svc_id = WMI_DATA_VI_SVC;
|
||||
if (ath6kl_connectservice(ar, &connect, "WMI DATA VI"))
|
||||
return -EIO;
|
||||
@@ -1088,6 +1112,12 @@ int ath6kl_init_fetch_firmwares(struct ath6kl *ar)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = ath6kl_fetch_fw_apin(ar, ATH6KL_FW_API4_FILE);
|
||||
if (ret == 0) {
|
||||
ar->fw_api = 4;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = ath6kl_fetch_fw_apin(ar, ATH6KL_FW_API3_FILE);
|
||||
if (ret == 0) {
|
||||
ar->fw_api = 3;
|
||||
@@ -1401,8 +1431,7 @@ static int ath6kl_init_upload(struct ath6kl *ar)
|
||||
return status;
|
||||
|
||||
/* WAR to avoid SDIO CRC err */
|
||||
if (ar->version.target_ver == AR6003_HW_2_0_VERSION ||
|
||||
ar->version.target_ver == AR6003_HW_2_1_1_VERSION) {
|
||||
if (ar->hw.flags & ATH6KL_HW_SDIO_CRC_ERROR_WAR) {
|
||||
ath6kl_err("temporary war to avoid sdio crc error\n");
|
||||
|
||||
param = 0x28;
|
||||
@@ -1520,7 +1549,7 @@ static const char *ath6kl_init_get_hif_name(enum ath6kl_hif_type type)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int ath6kl_init_hw_start(struct ath6kl *ar)
|
||||
static int __ath6kl_init_hw_start(struct ath6kl *ar)
|
||||
{
|
||||
long timeleft;
|
||||
int ret, i;
|
||||
@@ -1616,8 +1645,6 @@ int ath6kl_init_hw_start(struct ath6kl *ar)
|
||||
goto err_htc_stop;
|
||||
}
|
||||
|
||||
ar->state = ATH6KL_STATE_ON;
|
||||
|
||||
return 0;
|
||||
|
||||
err_htc_stop:
|
||||
@@ -1630,7 +1657,18 @@ err_power_off:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ath6kl_init_hw_stop(struct ath6kl *ar)
|
||||
int ath6kl_init_hw_start(struct ath6kl *ar)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = __ath6kl_init_hw_start(ar);
|
||||
if (err)
|
||||
return err;
|
||||
ar->state = ATH6KL_STATE_ON;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __ath6kl_init_hw_stop(struct ath6kl *ar)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -1646,11 +1684,37 @@ int ath6kl_init_hw_stop(struct ath6kl *ar)
|
||||
if (ret)
|
||||
ath6kl_warn("failed to power off hif: %d\n", ret);
|
||||
|
||||
ar->state = ATH6KL_STATE_OFF;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ath6kl_init_hw_stop(struct ath6kl *ar)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = __ath6kl_init_hw_stop(ar);
|
||||
if (err)
|
||||
return err;
|
||||
ar->state = ATH6KL_STATE_OFF;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ath6kl_init_hw_restart(struct ath6kl *ar)
|
||||
{
|
||||
clear_bit(WMI_READY, &ar->flag);
|
||||
|
||||
ath6kl_cfg80211_stop_all(ar);
|
||||
|
||||
if (__ath6kl_init_hw_stop(ar)) {
|
||||
ath6kl_dbg(ATH6KL_DBG_RECOVERY, "Failed to stop during fw error recovery\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (__ath6kl_init_hw_start(ar)) {
|
||||
ath6kl_dbg(ATH6KL_DBG_RECOVERY, "Failed to restart during fw error recovery\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* FIXME: move this to cfg80211.c and rename to ath6kl_cfg80211_vif_stop() */
|
||||
void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user