[PATCH] wlcore: Allow scans when in AP mode
From: James Minor When in AP mode, scans can be done without changing firmware to the multi-role firmware. Allow the interface to scan if forced in the scan request. Signed-off-by: James Minor Signed-off-by: Xander Huff Reviewed-by: Ben Shelton Reviewed-by: Jaeden Amero --- drivers/net/wireless/ti/wlcore/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 471521a..01ca370 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -6120,6 +6120,8 @@ static int wl1271_init_ieee80211(struct wl1271 *wl) WIPHY_FLAG_SUPPORTS_SCHED_SCAN | WIPHY_FLAG_HAS_CHANNEL_SWITCH; + wl->hw->wiphy->features |= NL80211_FEATURE_AP_SCAN; + /* make sure all our channels fit in the scanned_ch bitmask */ BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) + ARRAY_SIZE(wl1271_channels_5ghz) > -- 1.9.1
[PATCH] net: macb: NULL out phydev after removing mdio bus
From: Nathan Sullivan To ensure the dev->phydev pointer is not used after becoming invalid in mdiobus_unregister, set it to NULL. This happens when removing the macb driver without first taking its interface down, since unregister_netdev will end up calling macb_close. Signed-off-by: Xander Huff Signed-off-by: Nathan Sullivan Signed-off-by: Brad Mouring --- drivers/net/ethernet/cadence/macb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 63144bb..b32444a 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -3117,6 +3117,7 @@ static int macb_remove(struct platform_device *pdev) if (dev->phydev) phy_disconnect(dev->phydev); mdiobus_unregister(bp->mii_bus); + dev->phydev = NULL; mdiobus_free(bp->mii_bus); /* Shutdown the PHY if there is a GPIO reset */ -- 1.9.1
[PATCH v2] net: macb: Increase DMA TX buffer size
From: Nathan Sullivan In recent testing with the RT patchset, we have seen cases where the transmit ring can fill even with up to 200 txbds in the ring. Increase the size of the DMA TX ring to avoid overruns. Signed-off-by: Xander Huff Signed-off-by: Nathan Sullivan --- drivers/net/ethernet/cadence/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 3256839..3efddb7 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -40,7 +40,7 @@ #define RX_RING_SIZE 512 /* must be power of 2 */ #define RX_RING_BYTES (sizeof(struct macb_dma_desc) * RX_RING_SIZE) -#define TX_RING_SIZE 128 /* must be power of 2 */ +#define TX_RING_SIZE 512 /* must be power of 2 */ #define TX_RING_BYTES (sizeof(struct macb_dma_desc) * TX_RING_SIZE) /* level of occupied TX descriptors under which we wake up TX process */ -- 1.9.1
[PATCH v2] Revert "phy: IRQ cannot be shared"
This reverts: commit 33c133cc7598 ("phy: IRQ cannot be shared") On hardware with multiple PHY devices hooked up to the same IRQ line, allow them to share it. Sergei Shtylyov says: "I'm not sure now what was the reason I concluded that the IRQ sharing was impossible... most probably I thought that the kernel IRQ handling code exited the loop over the IRQ actions once IRQ_HANDLED was returned -- which is obviously not so in reality..." Signed-off-by: Xander Huff Signed-off-by: Nathan Sullivan --- Note: this reverted code fails "CHECK: Alignment should match open parentesis" --- drivers/net/phy/phy.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index c5dc2c36..c6f6683 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -722,8 +722,10 @@ phy_err: int phy_start_interrupts(struct phy_device *phydev) { atomic_set(&phydev->irq_disable, 0); - if (request_irq(phydev->irq, phy_interrupt, 0, "phy_interrupt", - phydev) < 0) { + if (request_irq(phydev->irq, phy_interrupt, + IRQF_SHARED, + "phy_interrupt", + phydev) < 0) { pr_warn("%s: Can't get IRQ %d (PHY)\n", phydev->mdio.bus->name, phydev->irq); phydev->irq = PHY_POLL; -- 1.9.1
Re: [PATCH] phy: request shared IRQ
On 8/24/2016 1:41 PM, Sergei Shtylyov wrote: Hello. On 08/24/2016 08:53 PM, Xander Huff wrote: From: Nathan Sullivan On hardware with multiple PHY devices hooked up to the same IRQ line, allow them to share it. Note that it had been allowed until my (erroneous?) commit 33c133cc7598e60976a069344910d63e56cc4401 ("phy: IRQ cannot be shared"), so I'd like this commit just reverted instead... I'm not sure now what was the reason I concluded that the IRQ sharing was impossible... most probably I thought that the kernel IRQ handling code exited the loop over the IRQ actions once IRQ_HANDLED was returned -- which is obviously not so in reality... MBR, Sergei Thanks for the suggestion, Sergei. I'll do just that. -- Xander Huff Staff Software Engineer National Instruments
[PATCH] net: macb: Increase DMA buffer size
From: Nathan Sullivan In recent testing with the RT patchset, we have seen cases where the transmit ring can fill even with up to 200 txbds in the ring. Increase the size of the DMA rings to avoid overruns. Signed-off-by: Nathan Sullivan Acked-by: Ben Shelton Acked-by: Jaeden Amero Natinst-ReviewBoard-ID: 83662 --- drivers/net/ethernet/cadence/macb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 3256839..86a8e20 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -35,12 +35,12 @@ #include "macb.h" -#define MACB_RX_BUFFER_SIZE128 +#define MACB_RX_BUFFER_SIZE1536 #define RX_BUFFER_MULTIPLE 64 /* bytes */ #define RX_RING_SIZE 512 /* must be power of 2 */ #define RX_RING_BYTES (sizeof(struct macb_dma_desc) * RX_RING_SIZE) -#define TX_RING_SIZE 128 /* must be power of 2 */ +#define TX_RING_SIZE 512 /* must be power of 2 */ #define TX_RING_BYTES (sizeof(struct macb_dma_desc) * TX_RING_SIZE) /* level of occupied TX descriptors under which we wake up TX process */ -- 1.9.1
[PATCH] phy: request shared IRQ
From: Nathan Sullivan On hardware with multiple PHY devices hooked up to the same IRQ line, allow them to share it. Signed-off-by: Nathan Sullivan Signed-off-by: Xander Huff Acked-by: Ben Shelton Acked-by: Jaeden Amero --- drivers/net/phy/phy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index c5dc2c36..0050531 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -722,8 +722,8 @@ phy_err: int phy_start_interrupts(struct phy_device *phydev) { atomic_set(&phydev->irq_disable, 0); - if (request_irq(phydev->irq, phy_interrupt, 0, "phy_interrupt", - phydev) < 0) { + if (request_irq(phydev->irq, phy_interrupt, IRQF_SHARED, + "phy_interrupt", phydev) < 0) { pr_warn("%s: Can't get IRQ %d (PHY)\n", phydev->mdio.bus->name, phydev->irq); phydev->irq = PHY_POLL; -- 1.9.1
Re: [PATCH] net: phy: micrel: remove suspend/resume
On 8/23/2016 2:03 PM, Florian Fainelli wrote: +others, On 08/23/2016 04:13 AM, Christophe Leroy wrote: In ERRATA DS8700A dated 05 May 2016, Microship recommends to not use software power down mode on KSZ8041 family. s/Microship/Microchip/ They say they have no plan to fix this ERRATA in future releases. The errata applies to specific revisions, is this revision present in the lower 4 bits of the MII_PHYSID2 register such that it could be used to key the disabling of the power down? http://ww1.microchip.com/downloads/en/DeviceDoc/8700A.pdf Signed-off-by: Christophe Leroy --- drivers/net/phy/micrel.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 053e879..f456c55 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -837,8 +837,6 @@ static struct phy_driver ksphy_driver[] = { .get_sset_count = kszphy_get_sset_count, .get_strings= kszphy_get_strings, .get_stats = kszphy_get_stats, - .suspend= genphy_suspend, - .resume = genphy_resume, }, { .phy_id = PHY_ID_KSZ8041RNLI, .phy_id_mask= MICREL_PHY_ID_MASK, @@ -856,8 +854,6 @@ static struct phy_driver ksphy_driver[] = { .get_sset_count = kszphy_get_sset_count, .get_strings= kszphy_get_strings, .get_stats = kszphy_get_stats, - .suspend= genphy_suspend, - .resume = genphy_resume, }, { .phy_id = PHY_ID_KSZ8051, .phy_id_mask= MICREL_PHY_ID_MASK, It doesn't appear that KSZ9031 is affected by this errata; no mention of suspend: http://ww1.microchip.com/downloads/en/DeviceDoc/KSZ9031MNX_Errata_Rev%20A_A2_032515.pdf -- Xander Huff Staff Software Engineer National Instruments
Re: [PATCH] phy: micrel: Reenable interrupts during on resume for ksz9031
On 8/22/2016 3:43 PM, Xander Huff wrote: Like the ksz8081, the ksz9031 has the behavior where it will clear the interrupt enable bits when leaving power down. This takes advantage of the solution provided by f5aba91. Signed-off-by: Xander Huff Signed-off-by: Nathan Sullivan Natinst-ReviewBoard-ID: 149877 --- drivers/net/phy/micrel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 053e879..885ac9c 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -964,7 +964,7 @@ static struct phy_driver ksphy_driver[] = { .get_strings= kszphy_get_strings, .get_stats = kszphy_get_stats, .suspend= genphy_suspend, - .resume = genphy_resume, + .resume = kszphy_resume, }, { .phy_id = PHY_ID_KSZ8873MLL, .phy_id_mask= MICREL_PHY_ID_MASK, Please disregard this patch as it was accidentally sent. Please instead refer to my subsequent email with the subject: "[PATCH] phy: micrel: Reenable interrupts during resume for ksz9031" -- Xander Huff Staff Software Engineer National Instruments
[PATCH] phy: micrel: Reenable interrupts during on resume for ksz9031
Like the ksz8081, the ksz9031 has the behavior where it will clear the interrupt enable bits when leaving power down. This takes advantage of the solution provided by f5aba91. Signed-off-by: Xander Huff Signed-off-by: Nathan Sullivan Natinst-ReviewBoard-ID: 149877 --- drivers/net/phy/micrel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 053e879..885ac9c 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -964,7 +964,7 @@ static struct phy_driver ksphy_driver[] = { .get_strings= kszphy_get_strings, .get_stats = kszphy_get_stats, .suspend= genphy_suspend, - .resume = genphy_resume, + .resume = kszphy_resume, }, { .phy_id = PHY_ID_KSZ8873MLL, .phy_id_mask= MICREL_PHY_ID_MASK, -- 1.9.1
[PATCH] phy: micrel: Reenable interrupts during resume for ksz9031
Like the ksz8081, the ksz9031 has the behavior where it will clear the interrupt enable bits when leaving power down. This takes advantage of the solution provided by f5aba91. Signed-off-by: Xander Huff Signed-off-by: Nathan Sullivan --- drivers/net/phy/micrel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 053e879..885ac9c 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -964,7 +964,7 @@ static struct phy_driver ksphy_driver[] = { .get_strings= kszphy_get_strings, .get_stats = kszphy_get_stats, .suspend= genphy_suspend, - .resume = genphy_resume, + .resume = kszphy_resume, }, { .phy_id = PHY_ID_KSZ8873MLL, .phy_id_mask= MICREL_PHY_ID_MASK, -- 1.9.1