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 git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (30 commits) ctcm: rename READ/WRITE defines to avoid redefinitions claw: rename READ/WRITE defines to avoid redefinitions phylib: available for any speed ethernet can: add limit for nframes and clean up signed/unsigned variables pkt_sched: Check .walk and .leaf class handlers pkt_sched: Fix sch_sfq vs tc_modify_qdisc oops caif-spi: Bugfix SPI_DATA_POS settings were inverted. caif: Bugfix - Increase default headroom size for control channel. net: make netpoll_rx return bool for !CONFIG_NETPOLL Bluetooth: Use 3-DH5 payload size for default ERTM max PDU size Bluetooth: Fix incorrect setting of remote_tx_win for L2CAP ERTM Bluetooth: Change default L2CAP ERTM retransmit timeout Bluetooth: Fix endianness issue with L2CAP MPS configuration net: Use NET_XMIT_SUCCESS where possible. isdn: mISDN: call pci_disable_device() if pci_probe() failed isdn: avm: call pci_disable_device() if pci_probe() failed isdn: avm: call pci_disable_device() if pci_probe() failed usbnet: rx_submit() should return an error code. pkt_sched: Add some basic qdisc class ops verification. Was: [PATCH] sfq: add dummy bind/unbind handles pkt_sched: sch_sfq: Add dummy unbind_tcf and put handles. Was: [PATCH] sfq: add dummy bind/unbind handles ...
This commit is contained in:
@@ -1273,6 +1273,7 @@ static int __devinit c4_probe(struct pci_dev *dev,
|
|||||||
if (retval != 0) {
|
if (retval != 0) {
|
||||||
printk(KERN_ERR "c4: no AVM-C%d at i/o %#x, irq %d detected, mem %#x\n",
|
printk(KERN_ERR "c4: no AVM-C%d at i/o %#x, irq %d detected, mem %#x\n",
|
||||||
nr, param.port, param.irq, param.membase);
|
nr, param.port, param.irq, param.membase);
|
||||||
|
pci_disable_device(dev);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ static int __devinit t1pci_probe(struct pci_dev *dev,
|
|||||||
if (retval != 0) {
|
if (retval != 0) {
|
||||||
printk(KERN_ERR "t1pci: no AVM-T1-PCI at i/o %#x, irq %d detected, mem %#x\n",
|
printk(KERN_ERR "t1pci: no AVM-T1-PCI at i/o %#x, irq %d detected, mem %#x\n",
|
||||||
param.port, param.irq, param.membase);
|
param.port, param.irq, param.membase);
|
||||||
|
pci_disable_device(dev);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -1094,6 +1094,7 @@ inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
pr_info("mISDN: do not have informations about adapter at %s\n",
|
pr_info("mISDN: do not have informations about adapter at %s\n",
|
||||||
pci_name(pdev));
|
pci_name(pdev));
|
||||||
kfree(card);
|
kfree(card);
|
||||||
|
pci_disable_device(pdev);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
} else
|
} else
|
||||||
pr_notice("mISDN: found adapter %s at %s\n",
|
pr_notice("mISDN: found adapter %s at %s\n",
|
||||||
@@ -1103,7 +1104,7 @@ inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
pci_set_drvdata(pdev, card);
|
pci_set_drvdata(pdev, card);
|
||||||
err = setup_instance(card);
|
err = setup_instance(card);
|
||||||
if (err) {
|
if (err) {
|
||||||
pci_disable_device(card->pdev);
|
pci_disable_device(pdev);
|
||||||
kfree(card);
|
kfree(card);
|
||||||
pci_set_drvdata(pdev, NULL);
|
pci_set_drvdata(pdev, NULL);
|
||||||
} else if (ent->driver_data == INF_SCT_1) {
|
} else if (ent->driver_data == INF_SCT_1) {
|
||||||
@@ -1114,6 +1115,7 @@ inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
sc = kzalloc(sizeof(struct inf_hw), GFP_KERNEL);
|
sc = kzalloc(sizeof(struct inf_hw), GFP_KERNEL);
|
||||||
if (!sc) {
|
if (!sc) {
|
||||||
release_card(card);
|
release_card(card);
|
||||||
|
pci_disable_device(pdev);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
sc->irq = card->irq;
|
sc->irq = card->irq;
|
||||||
@@ -1121,6 +1123,7 @@ inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
sc->ci = card->ci + i;
|
sc->ci = card->ci + i;
|
||||||
err = setup_instance(sc);
|
err = setup_instance(sc);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
pci_disable_device(pdev);
|
||||||
kfree(sc);
|
kfree(sc);
|
||||||
release_card(card);
|
release_card(card);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -22,13 +22,13 @@
|
|||||||
#include <net/caif/caif_spi.h>
|
#include <net/caif/caif_spi.h>
|
||||||
|
|
||||||
#ifndef CONFIG_CAIF_SPI_SYNC
|
#ifndef CONFIG_CAIF_SPI_SYNC
|
||||||
#define SPI_DATA_POS SPI_CMD_SZ
|
#define SPI_DATA_POS 0
|
||||||
static inline int forward_to_spi_cmd(struct cfspi *cfspi)
|
static inline int forward_to_spi_cmd(struct cfspi *cfspi)
|
||||||
{
|
{
|
||||||
return cfspi->rx_cpck_len;
|
return cfspi->rx_cpck_len;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define SPI_DATA_POS 0
|
#define SPI_DATA_POS SPI_CMD_SZ
|
||||||
static inline int forward_to_spi_cmd(struct cfspi *cfspi)
|
static inline int forward_to_spi_cmd(struct cfspi *cfspi)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
menuconfig PHYLIB
|
menuconfig PHYLIB
|
||||||
tristate "PHY Device support and infrastructure"
|
tristate "PHY Device support and infrastructure"
|
||||||
depends on !S390
|
depends on !S390
|
||||||
depends on NET_ETHERNET
|
depends on NETDEVICES
|
||||||
help
|
help
|
||||||
Ethernet controllers are usually attached to PHY
|
Ethernet controllers are usually attached to PHY
|
||||||
devices. This option provides infrastructure for
|
devices. This option provides infrastructure for
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ EXPORT_SYMBOL(phy_ethtool_gset);
|
|||||||
/**
|
/**
|
||||||
* phy_mii_ioctl - generic PHY MII ioctl interface
|
* phy_mii_ioctl - generic PHY MII ioctl interface
|
||||||
* @phydev: the phy_device struct
|
* @phydev: the phy_device struct
|
||||||
* @mii_data: MII ioctl data
|
* @ifr: &struct ifreq for socket ioctl's
|
||||||
* @cmd: ioctl cmd to execute
|
* @cmd: ioctl cmd to execute
|
||||||
*
|
*
|
||||||
* Note that this function is currently incompatible with the
|
* Note that this function is currently incompatible with the
|
||||||
|
|||||||
@@ -473,48 +473,58 @@ qlcnic_cleanup_pci_map(struct qlcnic_adapter *adapter)
|
|||||||
static int
|
static int
|
||||||
qlcnic_init_pci_info(struct qlcnic_adapter *adapter)
|
qlcnic_init_pci_info(struct qlcnic_adapter *adapter)
|
||||||
{
|
{
|
||||||
struct qlcnic_pci_info pci_info[QLCNIC_MAX_PCI_FUNC];
|
struct qlcnic_pci_info *pci_info;
|
||||||
int i, ret = 0, err;
|
int i, ret = 0, err;
|
||||||
u8 pfn;
|
u8 pfn;
|
||||||
|
|
||||||
if (!adapter->npars)
|
pci_info = kcalloc(QLCNIC_MAX_PCI_FUNC, sizeof(*pci_info), GFP_KERNEL);
|
||||||
adapter->npars = kzalloc(sizeof(struct qlcnic_npar_info) *
|
if (!pci_info)
|
||||||
QLCNIC_MAX_PCI_FUNC, GFP_KERNEL);
|
|
||||||
if (!adapter->npars)
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
if (!adapter->eswitch)
|
adapter->npars = kzalloc(sizeof(struct qlcnic_npar_info) *
|
||||||
adapter->eswitch = kzalloc(sizeof(struct qlcnic_eswitch) *
|
QLCNIC_MAX_PCI_FUNC, GFP_KERNEL);
|
||||||
|
if (!adapter->npars) {
|
||||||
|
err = -ENOMEM;
|
||||||
|
goto err_pci_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
adapter->eswitch = kzalloc(sizeof(struct qlcnic_eswitch) *
|
||||||
QLCNIC_NIU_MAX_XG_PORTS, GFP_KERNEL);
|
QLCNIC_NIU_MAX_XG_PORTS, GFP_KERNEL);
|
||||||
if (!adapter->eswitch) {
|
if (!adapter->eswitch) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_eswitch;
|
goto err_npars;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = qlcnic_get_pci_info(adapter, pci_info);
|
ret = qlcnic_get_pci_info(adapter, pci_info);
|
||||||
if (!ret) {
|
if (ret)
|
||||||
for (i = 0; i < QLCNIC_MAX_PCI_FUNC; i++) {
|
goto err_eswitch;
|
||||||
pfn = pci_info[i].id;
|
|
||||||
if (pfn > QLCNIC_MAX_PCI_FUNC)
|
|
||||||
return QL_STATUS_INVALID_PARAM;
|
|
||||||
adapter->npars[pfn].active = pci_info[i].active;
|
|
||||||
adapter->npars[pfn].type = pci_info[i].type;
|
|
||||||
adapter->npars[pfn].phy_port = pci_info[i].default_port;
|
|
||||||
adapter->npars[pfn].mac_learning = DEFAULT_MAC_LEARN;
|
|
||||||
adapter->npars[pfn].min_bw = pci_info[i].tx_min_bw;
|
|
||||||
adapter->npars[pfn].max_bw = pci_info[i].tx_max_bw;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < QLCNIC_NIU_MAX_XG_PORTS; i++)
|
for (i = 0; i < QLCNIC_MAX_PCI_FUNC; i++) {
|
||||||
adapter->eswitch[i].flags |= QLCNIC_SWITCH_ENABLE;
|
pfn = pci_info[i].id;
|
||||||
|
if (pfn > QLCNIC_MAX_PCI_FUNC)
|
||||||
return ret;
|
return QL_STATUS_INVALID_PARAM;
|
||||||
|
adapter->npars[pfn].active = pci_info[i].active;
|
||||||
|
adapter->npars[pfn].type = pci_info[i].type;
|
||||||
|
adapter->npars[pfn].phy_port = pci_info[i].default_port;
|
||||||
|
adapter->npars[pfn].mac_learning = DEFAULT_MAC_LEARN;
|
||||||
|
adapter->npars[pfn].min_bw = pci_info[i].tx_min_bw;
|
||||||
|
adapter->npars[pfn].max_bw = pci_info[i].tx_max_bw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < QLCNIC_NIU_MAX_XG_PORTS; i++)
|
||||||
|
adapter->eswitch[i].flags |= QLCNIC_SWITCH_ENABLE;
|
||||||
|
|
||||||
|
kfree(pci_info);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
err_eswitch:
|
||||||
kfree(adapter->eswitch);
|
kfree(adapter->eswitch);
|
||||||
adapter->eswitch = NULL;
|
adapter->eswitch = NULL;
|
||||||
err_eswitch:
|
err_npars:
|
||||||
kfree(adapter->npars);
|
kfree(adapter->npars);
|
||||||
|
adapter->npars = NULL;
|
||||||
|
err_pci_info:
|
||||||
|
kfree(pci_info);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -3361,15 +3371,21 @@ qlcnic_sysfs_read_pci_config(struct file *file, struct kobject *kobj,
|
|||||||
struct device *dev = container_of(kobj, struct device, kobj);
|
struct device *dev = container_of(kobj, struct device, kobj);
|
||||||
struct qlcnic_adapter *adapter = dev_get_drvdata(dev);
|
struct qlcnic_adapter *adapter = dev_get_drvdata(dev);
|
||||||
struct qlcnic_pci_func_cfg pci_cfg[QLCNIC_MAX_PCI_FUNC];
|
struct qlcnic_pci_func_cfg pci_cfg[QLCNIC_MAX_PCI_FUNC];
|
||||||
struct qlcnic_pci_info pci_info[QLCNIC_MAX_PCI_FUNC];
|
struct qlcnic_pci_info *pci_info;
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
if (size != sizeof(pci_cfg))
|
if (size != sizeof(pci_cfg))
|
||||||
return QL_STATUS_INVALID_PARAM;
|
return QL_STATUS_INVALID_PARAM;
|
||||||
|
|
||||||
|
pci_info = kcalloc(QLCNIC_MAX_PCI_FUNC, sizeof(*pci_info), GFP_KERNEL);
|
||||||
|
if (!pci_info)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
ret = qlcnic_get_pci_info(adapter, pci_info);
|
ret = qlcnic_get_pci_info(adapter, pci_info);
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
kfree(pci_info);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < QLCNIC_MAX_PCI_FUNC ; i++) {
|
for (i = 0; i < QLCNIC_MAX_PCI_FUNC ; i++) {
|
||||||
pci_cfg[i].pci_func = pci_info[i].id;
|
pci_cfg[i].pci_func = pci_info[i].id;
|
||||||
@@ -3380,8 +3396,8 @@ qlcnic_sysfs_read_pci_config(struct file *file, struct kobject *kobj,
|
|||||||
memcpy(&pci_cfg[i].def_mac_addr, &pci_info[i].mac, ETH_ALEN);
|
memcpy(&pci_cfg[i].def_mac_addr, &pci_info[i].mac, ETH_ALEN);
|
||||||
}
|
}
|
||||||
memcpy(buf, &pci_cfg, size);
|
memcpy(buf, &pci_cfg, size);
|
||||||
|
kfree(pci_info);
|
||||||
return size;
|
return size;
|
||||||
|
|
||||||
}
|
}
|
||||||
static struct bin_attribute bin_attr_npar_config = {
|
static struct bin_attribute bin_attr_npar_config = {
|
||||||
.attr = {.name = "npar_config", .mode = (S_IRUGO | S_IWUSR)},
|
.attr = {.name = "npar_config", .mode = (S_IRUGO | S_IWUSR)},
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ EXPORT_SYMBOL_GPL(usbnet_defer_kevent);
|
|||||||
|
|
||||||
static void rx_complete (struct urb *urb);
|
static void rx_complete (struct urb *urb);
|
||||||
|
|
||||||
static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
|
static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
struct skb_data *entry;
|
struct skb_data *entry;
|
||||||
@@ -327,7 +327,7 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
|
|||||||
netif_dbg(dev, rx_err, dev->net, "no rx skb\n");
|
netif_dbg(dev, rx_err, dev->net, "no rx skb\n");
|
||||||
usbnet_defer_kevent (dev, EVENT_RX_MEMORY);
|
usbnet_defer_kevent (dev, EVENT_RX_MEMORY);
|
||||||
usb_free_urb (urb);
|
usb_free_urb (urb);
|
||||||
return;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
skb_reserve (skb, NET_IP_ALIGN);
|
skb_reserve (skb, NET_IP_ALIGN);
|
||||||
|
|
||||||
@@ -357,6 +357,9 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
|
|||||||
netif_dbg(dev, ifdown, dev->net, "device gone\n");
|
netif_dbg(dev, ifdown, dev->net, "device gone\n");
|
||||||
netif_device_detach (dev->net);
|
netif_device_detach (dev->net);
|
||||||
break;
|
break;
|
||||||
|
case -EHOSTUNREACH:
|
||||||
|
retval = -ENOLINK;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
netif_dbg(dev, rx_err, dev->net,
|
netif_dbg(dev, rx_err, dev->net,
|
||||||
"rx submit, %d\n", retval);
|
"rx submit, %d\n", retval);
|
||||||
@@ -374,6 +377,7 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
|
|||||||
dev_kfree_skb_any (skb);
|
dev_kfree_skb_any (skb);
|
||||||
usb_free_urb (urb);
|
usb_free_urb (urb);
|
||||||
}
|
}
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -912,6 +916,7 @@ fail_halt:
|
|||||||
/* tasklet could resubmit itself forever if memory is tight */
|
/* tasklet could resubmit itself forever if memory is tight */
|
||||||
if (test_bit (EVENT_RX_MEMORY, &dev->flags)) {
|
if (test_bit (EVENT_RX_MEMORY, &dev->flags)) {
|
||||||
struct urb *urb = NULL;
|
struct urb *urb = NULL;
|
||||||
|
int resched = 1;
|
||||||
|
|
||||||
if (netif_running (dev->net))
|
if (netif_running (dev->net))
|
||||||
urb = usb_alloc_urb (0, GFP_KERNEL);
|
urb = usb_alloc_urb (0, GFP_KERNEL);
|
||||||
@@ -922,10 +927,12 @@ fail_halt:
|
|||||||
status = usb_autopm_get_interface(dev->intf);
|
status = usb_autopm_get_interface(dev->intf);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
goto fail_lowmem;
|
goto fail_lowmem;
|
||||||
rx_submit (dev, urb, GFP_KERNEL);
|
if (rx_submit (dev, urb, GFP_KERNEL) == -ENOLINK)
|
||||||
|
resched = 0;
|
||||||
usb_autopm_put_interface(dev->intf);
|
usb_autopm_put_interface(dev->intf);
|
||||||
fail_lowmem:
|
fail_lowmem:
|
||||||
tasklet_schedule (&dev->bh);
|
if (resched)
|
||||||
|
tasklet_schedule (&dev->bh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1175,8 +1182,11 @@ static void usbnet_bh (unsigned long param)
|
|||||||
// don't refill the queue all at once
|
// don't refill the queue all at once
|
||||||
for (i = 0; i < 10 && dev->rxq.qlen < qlen; i++) {
|
for (i = 0; i < 10 && dev->rxq.qlen < qlen; i++) {
|
||||||
urb = usb_alloc_urb (0, GFP_ATOMIC);
|
urb = usb_alloc_urb (0, GFP_ATOMIC);
|
||||||
if (urb != NULL)
|
if (urb != NULL) {
|
||||||
rx_submit (dev, urb, GFP_ATOMIC);
|
if (rx_submit (dev, urb, GFP_ATOMIC) ==
|
||||||
|
-ENOLINK)
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (temp != dev->rxq.qlen)
|
if (temp != dev->rxq.qlen)
|
||||||
netif_dbg(dev, link, dev->net,
|
netif_dbg(dev, link, dev->net,
|
||||||
|
|||||||
@@ -885,20 +885,21 @@ fst_rx_dma_complete(struct fst_card_info *card, struct fst_port_info *port,
|
|||||||
* Receive a frame through the DMA
|
* Receive a frame through the DMA
|
||||||
*/
|
*/
|
||||||
static inline void
|
static inline void
|
||||||
fst_rx_dma(struct fst_card_info *card, unsigned char *skb,
|
fst_rx_dma(struct fst_card_info *card, dma_addr_t skb,
|
||||||
unsigned char *mem, int len)
|
dma_addr_t mem, int len)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* This routine will setup the DMA and start it
|
* This routine will setup the DMA and start it
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dbg(DBG_RX, "In fst_rx_dma %p %p %d\n", skb, mem, len);
|
dbg(DBG_RX, "In fst_rx_dma %lx %lx %d\n",
|
||||||
|
(unsigned long) skb, (unsigned long) mem, len);
|
||||||
if (card->dmarx_in_progress) {
|
if (card->dmarx_in_progress) {
|
||||||
dbg(DBG_ASS, "In fst_rx_dma while dma in progress\n");
|
dbg(DBG_ASS, "In fst_rx_dma while dma in progress\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
outl((unsigned long) skb, card->pci_conf + DMAPADR0); /* Copy to here */
|
outl(skb, card->pci_conf + DMAPADR0); /* Copy to here */
|
||||||
outl((unsigned long) mem, card->pci_conf + DMALADR0); /* from here */
|
outl(mem, card->pci_conf + DMALADR0); /* from here */
|
||||||
outl(len, card->pci_conf + DMASIZ0); /* for this length */
|
outl(len, card->pci_conf + DMASIZ0); /* for this length */
|
||||||
outl(0x00000000c, card->pci_conf + DMADPR0); /* In this direction */
|
outl(0x00000000c, card->pci_conf + DMADPR0); /* In this direction */
|
||||||
|
|
||||||
@@ -1309,8 +1310,8 @@ fst_intr_rx(struct fst_card_info *card, struct fst_port_info *port)
|
|||||||
card->dma_port_rx = port;
|
card->dma_port_rx = port;
|
||||||
card->dma_len_rx = len;
|
card->dma_len_rx = len;
|
||||||
card->dma_rxpos = rxp;
|
card->dma_rxpos = rxp;
|
||||||
fst_rx_dma(card, (char *) card->rx_dma_handle_card,
|
fst_rx_dma(card, card->rx_dma_handle_card,
|
||||||
(char *) BUF_OFFSET(rxBuffer[pi][rxp][0]), len);
|
BUF_OFFSET(rxBuffer[pi][rxp][0]), len);
|
||||||
}
|
}
|
||||||
if (rxp != port->rxpos) {
|
if (rxp != port->rxpos) {
|
||||||
dbg(DBG_ASS, "About to increment rxpos by more than 1\n");
|
dbg(DBG_ASS, "About to increment rxpos by more than 1\n");
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
|
|||||||
.shadow_ram_support = false,
|
.shadow_ram_support = false,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.support_ct_kill_exit = true,
|
.support_ct_kill_exit = true,
|
||||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
|
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
|
||||||
|
|||||||
@@ -769,22 +769,6 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv,
|
|||||||
rts_retry_limit = data_retry_limit;
|
rts_retry_limit = data_retry_limit;
|
||||||
tx_cmd->rts_retry_limit = rts_retry_limit;
|
tx_cmd->rts_retry_limit = rts_retry_limit;
|
||||||
|
|
||||||
if (ieee80211_is_mgmt(fc)) {
|
|
||||||
switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) {
|
|
||||||
case cpu_to_le16(IEEE80211_STYPE_AUTH):
|
|
||||||
case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
|
|
||||||
case cpu_to_le16(IEEE80211_STYPE_ASSOC_REQ):
|
|
||||||
case cpu_to_le16(IEEE80211_STYPE_REASSOC_REQ):
|
|
||||||
if (tx_flags & TX_CMD_FLG_RTS_MSK) {
|
|
||||||
tx_flags &= ~TX_CMD_FLG_RTS_MSK;
|
|
||||||
tx_flags |= TX_CMD_FLG_CTS_MSK;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tx_cmd->rate = rate;
|
tx_cmd->rate = rate;
|
||||||
tx_cmd->tx_flags = tx_flags;
|
tx_cmd->tx_flags = tx_flags;
|
||||||
|
|
||||||
@@ -2717,7 +2701,7 @@ static struct iwl_lib_ops iwl3945_lib = {
|
|||||||
static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = {
|
static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = {
|
||||||
.get_hcmd_size = iwl3945_get_hcmd_size,
|
.get_hcmd_size = iwl3945_get_hcmd_size,
|
||||||
.build_addsta_hcmd = iwl3945_build_addsta_hcmd,
|
.build_addsta_hcmd = iwl3945_build_addsta_hcmd,
|
||||||
.rts_tx_cmd_flag = iwlcore_rts_tx_cmd_flag,
|
.tx_cmd_protection = iwlcore_tx_cmd_protection,
|
||||||
.request_scan = iwl3945_request_scan,
|
.request_scan = iwl3945_request_scan,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2223,7 +2223,7 @@ static struct iwl_hcmd_utils_ops iwl4965_hcmd_utils = {
|
|||||||
.build_addsta_hcmd = iwl4965_build_addsta_hcmd,
|
.build_addsta_hcmd = iwl4965_build_addsta_hcmd,
|
||||||
.chain_noise_reset = iwl4965_chain_noise_reset,
|
.chain_noise_reset = iwl4965_chain_noise_reset,
|
||||||
.gain_computation = iwl4965_gain_computation,
|
.gain_computation = iwl4965_gain_computation,
|
||||||
.rts_tx_cmd_flag = iwlcore_rts_tx_cmd_flag,
|
.tx_cmd_protection = iwlcore_tx_cmd_protection,
|
||||||
.calc_rssi = iwl4965_calc_rssi,
|
.calc_rssi = iwl4965_calc_rssi,
|
||||||
.request_scan = iwlagn_request_scan,
|
.request_scan = iwlagn_request_scan,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ struct iwl_cfg iwl5300_agn_cfg = {
|
|||||||
.use_bsm = false,
|
.use_bsm = false,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||||
.chain_noise_scale = 1000,
|
.chain_noise_scale = 1000,
|
||||||
@@ -537,7 +537,7 @@ struct iwl_cfg iwl5100_bgn_cfg = {
|
|||||||
.use_bsm = false,
|
.use_bsm = false,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||||
.chain_noise_scale = 1000,
|
.chain_noise_scale = 1000,
|
||||||
@@ -597,7 +597,7 @@ struct iwl_cfg iwl5100_agn_cfg = {
|
|||||||
.use_bsm = false,
|
.use_bsm = false,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||||
.chain_noise_scale = 1000,
|
.chain_noise_scale = 1000,
|
||||||
@@ -628,7 +628,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
|
|||||||
.use_bsm = false,
|
.use_bsm = false,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||||
.chain_noise_scale = 1000,
|
.chain_noise_scale = 1000,
|
||||||
@@ -659,7 +659,7 @@ struct iwl_cfg iwl5150_agn_cfg = {
|
|||||||
.use_bsm = false,
|
.use_bsm = false,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
|
||||||
.chain_noise_scale = 1000,
|
.chain_noise_scale = 1000,
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = {
|
|||||||
.shadow_ram_support = true,
|
.shadow_ram_support = true,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.supports_idle = true,
|
.supports_idle = true,
|
||||||
.adv_thermal_throttle = true,
|
.adv_thermal_throttle = true,
|
||||||
@@ -489,7 +489,7 @@ struct iwl_cfg iwl6000g2b_2agn_cfg = {
|
|||||||
.shadow_ram_support = true,
|
.shadow_ram_support = true,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.supports_idle = true,
|
.supports_idle = true,
|
||||||
.adv_thermal_throttle = true,
|
.adv_thermal_throttle = true,
|
||||||
@@ -563,7 +563,7 @@ struct iwl_cfg iwl6000g2b_2bgn_cfg = {
|
|||||||
.shadow_ram_support = true,
|
.shadow_ram_support = true,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.supports_idle = true,
|
.supports_idle = true,
|
||||||
.adv_thermal_throttle = true,
|
.adv_thermal_throttle = true,
|
||||||
@@ -637,7 +637,7 @@ struct iwl_cfg iwl6000g2b_bgn_cfg = {
|
|||||||
.shadow_ram_support = true,
|
.shadow_ram_support = true,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.supports_idle = true,
|
.supports_idle = true,
|
||||||
.adv_thermal_throttle = true,
|
.adv_thermal_throttle = true,
|
||||||
@@ -714,7 +714,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
|
|||||||
.shadow_ram_support = true,
|
.shadow_ram_support = true,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.supports_idle = true,
|
.supports_idle = true,
|
||||||
.adv_thermal_throttle = true,
|
.adv_thermal_throttle = true,
|
||||||
@@ -821,7 +821,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
|
|||||||
.shadow_ram_support = true,
|
.shadow_ram_support = true,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.supports_idle = true,
|
.supports_idle = true,
|
||||||
.adv_thermal_throttle = true,
|
.adv_thermal_throttle = true,
|
||||||
@@ -859,7 +859,7 @@ struct iwl_cfg iwl6050g2_bgn_cfg = {
|
|||||||
.shadow_ram_support = true,
|
.shadow_ram_support = true,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.supports_idle = true,
|
.supports_idle = true,
|
||||||
.adv_thermal_throttle = true,
|
.adv_thermal_throttle = true,
|
||||||
@@ -933,7 +933,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
|
|||||||
.shadow_ram_support = true,
|
.shadow_ram_support = true,
|
||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.supports_idle = true,
|
.supports_idle = true,
|
||||||
.adv_thermal_throttle = true,
|
.adv_thermal_throttle = true,
|
||||||
|
|||||||
@@ -211,10 +211,21 @@ static void iwlagn_chain_noise_reset(struct iwl_priv *priv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void iwlagn_rts_tx_cmd_flag(struct ieee80211_tx_info *info,
|
static void iwlagn_tx_cmd_protection(struct iwl_priv *priv,
|
||||||
__le32 *tx_flags)
|
struct ieee80211_tx_info *info,
|
||||||
|
__le16 fc, __le32 *tx_flags)
|
||||||
{
|
{
|
||||||
*tx_flags |= TX_CMD_FLG_PROT_REQUIRE_MSK;
|
if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS ||
|
||||||
|
info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
|
||||||
|
*tx_flags |= TX_CMD_FLG_PROT_REQUIRE_MSK;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (priv->cfg->use_rts_for_aggregation &&
|
||||||
|
info->flags & IEEE80211_TX_CTL_AMPDU) {
|
||||||
|
*tx_flags |= TX_CMD_FLG_PROT_REQUIRE_MSK;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calc max signal level (dBm) among 3 possible receivers */
|
/* Calc max signal level (dBm) among 3 possible receivers */
|
||||||
@@ -268,7 +279,7 @@ struct iwl_hcmd_utils_ops iwlagn_hcmd_utils = {
|
|||||||
.build_addsta_hcmd = iwlagn_build_addsta_hcmd,
|
.build_addsta_hcmd = iwlagn_build_addsta_hcmd,
|
||||||
.gain_computation = iwlagn_gain_computation,
|
.gain_computation = iwlagn_gain_computation,
|
||||||
.chain_noise_reset = iwlagn_chain_noise_reset,
|
.chain_noise_reset = iwlagn_chain_noise_reset,
|
||||||
.rts_tx_cmd_flag = iwlagn_rts_tx_cmd_flag,
|
.tx_cmd_protection = iwlagn_tx_cmd_protection,
|
||||||
.calc_rssi = iwlagn_calc_rssi,
|
.calc_rssi = iwlagn_calc_rssi,
|
||||||
.request_scan = iwlagn_request_scan,
|
.request_scan = iwlagn_request_scan,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -379,10 +379,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
|
|||||||
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
|
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->cfg->ops->utils->rts_tx_cmd_flag(info, &tx_flags);
|
priv->cfg->ops->utils->tx_cmd_protection(priv, info, fc, &tx_flags);
|
||||||
|
|
||||||
if ((tx_flags & TX_CMD_FLG_RTS_MSK) || (tx_flags & TX_CMD_FLG_CTS_MSK))
|
|
||||||
tx_flags |= TX_CMD_FLG_FULL_TXOP_PROT_MSK;
|
|
||||||
|
|
||||||
tx_flags &= ~(TX_CMD_FLG_ANT_SEL_MSK);
|
tx_flags &= ~(TX_CMD_FLG_ANT_SEL_MSK);
|
||||||
if (ieee80211_is_mgmt(fc)) {
|
if (ieee80211_is_mgmt(fc)) {
|
||||||
@@ -456,21 +453,6 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
|
|||||||
if ((rate_idx >= IWL_FIRST_CCK_RATE) && (rate_idx <= IWL_LAST_CCK_RATE))
|
if ((rate_idx >= IWL_FIRST_CCK_RATE) && (rate_idx <= IWL_LAST_CCK_RATE))
|
||||||
rate_flags |= RATE_MCS_CCK_MSK;
|
rate_flags |= RATE_MCS_CCK_MSK;
|
||||||
|
|
||||||
/* Set up RTS and CTS flags for certain packets */
|
|
||||||
switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) {
|
|
||||||
case cpu_to_le16(IEEE80211_STYPE_AUTH):
|
|
||||||
case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
|
|
||||||
case cpu_to_le16(IEEE80211_STYPE_ASSOC_REQ):
|
|
||||||
case cpu_to_le16(IEEE80211_STYPE_REASSOC_REQ):
|
|
||||||
if (tx_cmd->tx_flags & TX_CMD_FLG_RTS_MSK) {
|
|
||||||
tx_cmd->tx_flags &= ~TX_CMD_FLG_RTS_MSK;
|
|
||||||
tx_cmd->tx_flags |= TX_CMD_FLG_CTS_MSK;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set up antennas */
|
/* Set up antennas */
|
||||||
priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant,
|
priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant,
|
||||||
priv->hw_params.valid_tx_ant);
|
priv->hw_params.valid_tx_ant);
|
||||||
|
|||||||
@@ -202,13 +202,6 @@ int iwl_commit_rxon(struct iwl_priv *priv)
|
|||||||
|
|
||||||
priv->start_calib = 0;
|
priv->start_calib = 0;
|
||||||
if (new_assoc) {
|
if (new_assoc) {
|
||||||
/*
|
|
||||||
* allow CTS-to-self if possible for new association.
|
|
||||||
* this is relevant only for 5000 series and up,
|
|
||||||
* but will not damage 4965
|
|
||||||
*/
|
|
||||||
priv->staging_rxon.flags |= RXON_FLG_SELF_CTS_EN;
|
|
||||||
|
|
||||||
/* Apply the new configuration
|
/* Apply the new configuration
|
||||||
* RXON assoc doesn't clear the station table in uCode,
|
* RXON assoc doesn't clear the station table in uCode,
|
||||||
*/
|
*/
|
||||||
@@ -1618,45 +1611,9 @@ static ssize_t store_tx_power(struct device *d,
|
|||||||
|
|
||||||
static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power);
|
static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power);
|
||||||
|
|
||||||
static ssize_t show_rts_ht_protection(struct device *d,
|
|
||||||
struct device_attribute *attr, char *buf)
|
|
||||||
{
|
|
||||||
struct iwl_priv *priv = dev_get_drvdata(d);
|
|
||||||
|
|
||||||
return sprintf(buf, "%s\n",
|
|
||||||
priv->cfg->use_rts_for_ht ? "RTS/CTS" : "CTS-to-self");
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t store_rts_ht_protection(struct device *d,
|
|
||||||
struct device_attribute *attr,
|
|
||||||
const char *buf, size_t count)
|
|
||||||
{
|
|
||||||
struct iwl_priv *priv = dev_get_drvdata(d);
|
|
||||||
unsigned long val;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = strict_strtoul(buf, 10, &val);
|
|
||||||
if (ret)
|
|
||||||
IWL_INFO(priv, "Input is not in decimal form.\n");
|
|
||||||
else {
|
|
||||||
if (!iwl_is_associated(priv))
|
|
||||||
priv->cfg->use_rts_for_ht = val ? true : false;
|
|
||||||
else
|
|
||||||
IWL_ERR(priv, "Sta associated with AP - "
|
|
||||||
"Change protection mechanism is not allowed\n");
|
|
||||||
ret = count;
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DEVICE_ATTR(rts_ht_protection, S_IWUSR | S_IRUGO,
|
|
||||||
show_rts_ht_protection, store_rts_ht_protection);
|
|
||||||
|
|
||||||
|
|
||||||
static struct attribute *iwl_sysfs_entries[] = {
|
static struct attribute *iwl_sysfs_entries[] = {
|
||||||
&dev_attr_temperature.attr,
|
&dev_attr_temperature.attr,
|
||||||
&dev_attr_tx_power.attr,
|
&dev_attr_tx_power.attr,
|
||||||
&dev_attr_rts_ht_protection.attr,
|
|
||||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||||
&dev_attr_debug_level.attr,
|
&dev_attr_debug_level.attr,
|
||||||
#endif
|
#endif
|
||||||
@@ -3464,25 +3421,6 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* switch to RTS/CTS for TX
|
|
||||||
*/
|
|
||||||
static void iwl_enable_rts_cts(struct iwl_priv *priv)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
|
||||||
return;
|
|
||||||
|
|
||||||
priv->staging_rxon.flags &= ~RXON_FLG_SELF_CTS_EN;
|
|
||||||
if (!test_bit(STATUS_SCANNING, &priv->status)) {
|
|
||||||
IWL_DEBUG_INFO(priv, "use RTS/CTS protection\n");
|
|
||||||
iwlcore_commit_rxon(priv);
|
|
||||||
} else {
|
|
||||||
/* scanning, defer the request until scan completed */
|
|
||||||
IWL_DEBUG_INFO(priv, "defer setting RTS/CTS protection\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int iwl_mac_ampdu_action(struct ieee80211_hw *hw,
|
static int iwl_mac_ampdu_action(struct ieee80211_hw *hw,
|
||||||
struct ieee80211_vif *vif,
|
struct ieee80211_vif *vif,
|
||||||
enum ieee80211_ampdu_mlme_action action,
|
enum ieee80211_ampdu_mlme_action action,
|
||||||
@@ -3529,14 +3467,33 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw,
|
|||||||
}
|
}
|
||||||
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
if (priv->cfg->use_rts_for_aggregation) {
|
||||||
|
struct iwl_station_priv *sta_priv =
|
||||||
|
(void *) sta->drv_priv;
|
||||||
|
/*
|
||||||
|
* switch off RTS/CTS if it was previously enabled
|
||||||
|
*/
|
||||||
|
|
||||||
|
sta_priv->lq_sta.lq.general_params.flags &=
|
||||||
|
~LINK_QUAL_FLAGS_SET_STA_TLC_RTS_MSK;
|
||||||
|
iwl_send_lq_cmd(priv, &sta_priv->lq_sta.lq,
|
||||||
|
CMD_ASYNC, false);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case IEEE80211_AMPDU_TX_OPERATIONAL:
|
case IEEE80211_AMPDU_TX_OPERATIONAL:
|
||||||
if (priv->cfg->use_rts_for_ht) {
|
if (priv->cfg->use_rts_for_aggregation) {
|
||||||
|
struct iwl_station_priv *sta_priv =
|
||||||
|
(void *) sta->drv_priv;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* switch to RTS/CTS if it is the prefer protection
|
* switch to RTS/CTS if it is the prefer protection
|
||||||
* method for HT traffic
|
* method for HT traffic
|
||||||
*/
|
*/
|
||||||
iwl_enable_rts_cts(priv);
|
|
||||||
|
sta_priv->lq_sta.lq.general_params.flags |=
|
||||||
|
LINK_QUAL_FLAGS_SET_STA_TLC_RTS_MSK;
|
||||||
|
iwl_send_lq_cmd(priv, &sta_priv->lq_sta.lq,
|
||||||
|
CMD_ASYNC, false);
|
||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -401,21 +401,38 @@ void iwlcore_free_geos(struct iwl_priv *priv)
|
|||||||
EXPORT_SYMBOL(iwlcore_free_geos);
|
EXPORT_SYMBOL(iwlcore_free_geos);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* iwlcore_rts_tx_cmd_flag: Set rts/cts. 3945 and 4965 only share this
|
* iwlcore_tx_cmd_protection: Set rts/cts. 3945 and 4965 only share this
|
||||||
* function.
|
* function.
|
||||||
*/
|
*/
|
||||||
void iwlcore_rts_tx_cmd_flag(struct ieee80211_tx_info *info,
|
void iwlcore_tx_cmd_protection(struct iwl_priv *priv,
|
||||||
__le32 *tx_flags)
|
struct ieee80211_tx_info *info,
|
||||||
|
__le16 fc, __le32 *tx_flags)
|
||||||
{
|
{
|
||||||
if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) {
|
if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) {
|
||||||
*tx_flags |= TX_CMD_FLG_RTS_MSK;
|
*tx_flags |= TX_CMD_FLG_RTS_MSK;
|
||||||
*tx_flags &= ~TX_CMD_FLG_CTS_MSK;
|
*tx_flags &= ~TX_CMD_FLG_CTS_MSK;
|
||||||
|
*tx_flags |= TX_CMD_FLG_FULL_TXOP_PROT_MSK;
|
||||||
|
|
||||||
|
if (!ieee80211_is_mgmt(fc))
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) {
|
||||||
|
case cpu_to_le16(IEEE80211_STYPE_AUTH):
|
||||||
|
case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
|
||||||
|
case cpu_to_le16(IEEE80211_STYPE_ASSOC_REQ):
|
||||||
|
case cpu_to_le16(IEEE80211_STYPE_REASSOC_REQ):
|
||||||
|
*tx_flags &= ~TX_CMD_FLG_RTS_MSK;
|
||||||
|
*tx_flags |= TX_CMD_FLG_CTS_MSK;
|
||||||
|
break;
|
||||||
|
}
|
||||||
} else if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
|
} else if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
|
||||||
*tx_flags &= ~TX_CMD_FLG_RTS_MSK;
|
*tx_flags &= ~TX_CMD_FLG_RTS_MSK;
|
||||||
*tx_flags |= TX_CMD_FLG_CTS_MSK;
|
*tx_flags |= TX_CMD_FLG_CTS_MSK;
|
||||||
|
*tx_flags |= TX_CMD_FLG_FULL_TXOP_PROT_MSK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(iwlcore_rts_tx_cmd_flag);
|
EXPORT_SYMBOL(iwlcore_tx_cmd_protection);
|
||||||
|
|
||||||
|
|
||||||
static bool is_single_rx_stream(struct iwl_priv *priv)
|
static bool is_single_rx_stream(struct iwl_priv *priv)
|
||||||
{
|
{
|
||||||
@@ -1869,6 +1886,10 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
|
|||||||
priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK;
|
priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK;
|
||||||
else
|
else
|
||||||
priv->staging_rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
|
priv->staging_rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
|
||||||
|
if (bss_conf->use_cts_prot)
|
||||||
|
priv->staging_rxon.flags |= RXON_FLG_SELF_CTS_EN;
|
||||||
|
else
|
||||||
|
priv->staging_rxon.flags &= ~RXON_FLG_SELF_CTS_EN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changes & BSS_CHANGED_BASIC_RATES) {
|
if (changes & BSS_CHANGED_BASIC_RATES) {
|
||||||
|
|||||||
@@ -104,8 +104,9 @@ struct iwl_hcmd_utils_ops {
|
|||||||
u32 min_average_noise,
|
u32 min_average_noise,
|
||||||
u8 default_chain);
|
u8 default_chain);
|
||||||
void (*chain_noise_reset)(struct iwl_priv *priv);
|
void (*chain_noise_reset)(struct iwl_priv *priv);
|
||||||
void (*rts_tx_cmd_flag)(struct ieee80211_tx_info *info,
|
void (*tx_cmd_protection)(struct iwl_priv *priv,
|
||||||
__le32 *tx_flags);
|
struct ieee80211_tx_info *info,
|
||||||
|
__le16 fc, __le32 *tx_flags);
|
||||||
int (*calc_rssi)(struct iwl_priv *priv,
|
int (*calc_rssi)(struct iwl_priv *priv,
|
||||||
struct iwl_rx_phy_res *rx_resp);
|
struct iwl_rx_phy_res *rx_resp);
|
||||||
void (*request_scan)(struct iwl_priv *priv, struct ieee80211_vif *vif);
|
void (*request_scan)(struct iwl_priv *priv, struct ieee80211_vif *vif);
|
||||||
@@ -249,7 +250,7 @@ struct iwl_mod_params {
|
|||||||
* @led_compensation: compensate on the led on/off time per HW according
|
* @led_compensation: compensate on the led on/off time per HW according
|
||||||
* to the deviation to achieve the desired led frequency.
|
* to the deviation to achieve the desired led frequency.
|
||||||
* The detail algorithm is described in iwl-led.c
|
* The detail algorithm is described in iwl-led.c
|
||||||
* @use_rts_for_ht: use rts/cts protection for HT traffic
|
* @use_rts_for_aggregation: use rts/cts protection for HT traffic
|
||||||
* @chain_noise_num_beacons: number of beacons used to compute chain noise
|
* @chain_noise_num_beacons: number of beacons used to compute chain noise
|
||||||
* @adv_thermal_throttle: support advance thermal throttle
|
* @adv_thermal_throttle: support advance thermal throttle
|
||||||
* @support_ct_kill_exit: support ct kill exit condition
|
* @support_ct_kill_exit: support ct kill exit condition
|
||||||
@@ -318,7 +319,7 @@ struct iwl_cfg {
|
|||||||
const bool ht_greenfield_support;
|
const bool ht_greenfield_support;
|
||||||
u16 led_compensation;
|
u16 led_compensation;
|
||||||
const bool broken_powersave;
|
const bool broken_powersave;
|
||||||
bool use_rts_for_ht;
|
bool use_rts_for_aggregation;
|
||||||
int chain_noise_num_beacons;
|
int chain_noise_num_beacons;
|
||||||
const bool supports_idle;
|
const bool supports_idle;
|
||||||
bool adv_thermal_throttle;
|
bool adv_thermal_throttle;
|
||||||
@@ -390,8 +391,9 @@ void iwl_config_ap(struct iwl_priv *priv, struct ieee80211_vif *vif);
|
|||||||
void iwl_mac_reset_tsf(struct ieee80211_hw *hw);
|
void iwl_mac_reset_tsf(struct ieee80211_hw *hw);
|
||||||
int iwl_alloc_txq_mem(struct iwl_priv *priv);
|
int iwl_alloc_txq_mem(struct iwl_priv *priv);
|
||||||
void iwl_free_txq_mem(struct iwl_priv *priv);
|
void iwl_free_txq_mem(struct iwl_priv *priv);
|
||||||
void iwlcore_rts_tx_cmd_flag(struct ieee80211_tx_info *info,
|
void iwlcore_tx_cmd_protection(struct iwl_priv *priv,
|
||||||
__le32 *tx_flags);
|
struct ieee80211_tx_info *info,
|
||||||
|
__le16 fc, __le32 *tx_flags);
|
||||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||||
int iwl_alloc_traffic_mem(struct iwl_priv *priv);
|
int iwl_alloc_traffic_mem(struct iwl_priv *priv);
|
||||||
void iwl_free_traffic_mem(struct iwl_priv *priv);
|
void iwl_free_traffic_mem(struct iwl_priv *priv);
|
||||||
|
|||||||
@@ -435,10 +435,7 @@ static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv,
|
|||||||
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
|
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->cfg->ops->utils->rts_tx_cmd_flag(info, &tx_flags);
|
priv->cfg->ops->utils->tx_cmd_protection(priv, info, fc, &tx_flags);
|
||||||
|
|
||||||
if ((tx_flags & TX_CMD_FLG_RTS_MSK) || (tx_flags & TX_CMD_FLG_CTS_MSK))
|
|
||||||
tx_flags |= TX_CMD_FLG_FULL_TXOP_PROT_MSK;
|
|
||||||
|
|
||||||
tx_flags &= ~(TX_CMD_FLG_ANT_SEL_MSK);
|
tx_flags &= ~(TX_CMD_FLG_ANT_SEL_MSK);
|
||||||
if (ieee80211_is_mgmt(fc)) {
|
if (ieee80211_is_mgmt(fc)) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user