brcmfmac: new device support and P2P fixes
cover brcmfmac: new device support and P2P fixes
This series is intended for v4.4 containing the following highlights:
* support for BCM4350, BCM4365, and BCM4366 PCIE devices.
* fixed for legacy P2P and P2P device handling.
* correct set and get tx-power.
The series should be applied to master branch of the wireless-drivers-next repository after the series sent earlier with
Message-ID: <[email protected]> and patch "brcmfmac: Reset PCIE devices after recognition." with
Message-ID: <[email protected]>.
Hante Meuleman (16):
brcmfmac: Fix exception handling.
brcmfmac: Add support for the BCM4350 PCIE device.
brcmfmac: Fix set and get tx-power functions.
brcmfmac: Only assign primary netdev to if2bss array.
brcmfmac: Inform p2p module about p2pon through API
brcmfmac: Fix bug in flowring management.
brcmfmac: Make p2pon module param always available.
brcmfmac: Workaround in change vif for wpa_supplicant support.
brcmfmac: Deleting of p2p device is leaking memory.
brcmfmac: Only handle p2p_stop_device if vif is valid
brcmfmac: Fix p2p bug for older firmwares.
brcmfmac: Add module parameter to disable features.
brcmfmac: Fix race condition bug when deleting p2p interface.
brcmfmac: Add support for the BCM4365 and BCM4366 PCIE devices.
brcmfmac: Fix TDLS setup by properly handling p2p noif.
brcmfmac: Accept events when TDLS is used in combination with p2p.
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 186 +++++++-------------- drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h | 3 +- drivers/net/wireless/brcm80211/brcmfmac/chip.c | 111 ++++++++++-- drivers/net/wireless/brcm80211/brcmfmac/core.c | 34 +++- drivers/net/wireless/brcm80211/brcmfmac/feature.c | 13 ++ drivers/net/wireless/brcm80211/brcmfmac/flowring.h | 2 +- drivers/net/wireless/brcm80211/brcmfmac/fweh.c | 26 ++- drivers/net/wireless/brcm80211/brcmfmac/fweh.h | 3 + drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 92 ++++++---- drivers/net/wireless/brcm80211/brcmfmac/p2p.h | 5 +- drivers/net/wireless/brcm80211/brcmfmac/pcie.c | 31 ++++ .../net/wireless/brcm80211/include/brcm_hw_ids.h | 11 ++ include/linux/bcma/bcma.h | 2 + 13 files changed, 331 insertions(+), 188 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/16 brcmfmac: Fix exception handling.
From: Hante Meuleman <[email protected]>
In some exception situations the ifp->vif was not properly assigned which could result in crash.
--- drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +1 -0
@@ -6332,6 +6332,7 @@ wiphy_unreg_out: priv_out:wl_deinit_priv (cfg);brcmf_free_vif (vif); + ifp->vif =NULL ; wiphy_out:brcmf_free_wiphy (wiphy);return NULL ;
Signature · 1 line
1.9.1
Re: [PATCH 01/16] brcmfmac: Fix exception handling.
Quoted 4 lines · Arend van Spriel
From: Hante Meuleman <[email protected]>
In some exception situations the
ifp->vifwas not properly assigned which could result in crash.
Quoted 21 lines
Reviewed-by Arend Van Spriel <[email protected]>Reviewed-by Pieter-Paul Giesberts <[email protected]>Signed-off-by Hante Meuleman <[email protected]>Signed-off-by Arend van Spriel <[email protected]>--- drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 1 + 1 file changed, 1 insertion(+)drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +1
-0@@ -6332,6 +6332,7 @@ wiphy_unreg_out: priv_out:wl_deinit_priv (cfg);brcmf_free_vif (vif); + ifp->vif =NULL ; wiphy_out:brcmf_free_wiphy (wiphy);return NULL ;
Re: [01/16] brcmfmac: Fix exception handling.
In reply to Arend van SprielQuoted 10 lines
From: Hante Meuleman <[email protected]>
In some exception situations the
ifp->vifwas not properly assigned which could result in crash.Reviewed-by Arend Van Spriel <[email protected]>Reviewed-by Pieter-Paul Giesberts <[email protected]>Signed-off-by Hante Meuleman <[email protected]>Signed-off-by Arend van Spriel <[email protected]>
Thanks, 16 patches applied to wireless-drivers-next.git:
2b5d348ee786 brcmfmac: Fix exception handling.e3c92cb2eea3 brcmfmac: Add support for the BCM4350 PCIE device. 60dc35ef9ffd brcmfmac: Fix set and get tx-power functions. 6ea696eb4e26 brcmfmac: Only assign primary netdev to if2bss array. ae7c03f68ee2 brcmfmac: Inform p2p module about p2pon through API 9f64df940cfe brcmfmac: Fix bug in flowring management. 43e55a2a1cf0 brcmfmac: Make p2pon module param always available. 178e9ef9b6c6 brcmfmac: Workaround in change vif for wpa_supplicant support. 9831bcb987df brcmfmac: Deleting of p2p device is leaking memory. d1bb34c128f5 brcmfmac: Only handle p2p_stop_device if vif is valid 35a3cbcc49b5 brcmfmac: Fix p2p bug for older firmwares. 8268c2011d25 brcmfmac: Add module parameter to disable features. a2044d91d9d2 brcmfmac: Fix race condition bug when deleting p2p interface. 55acca90da52 brcmfmac: Add support for the BCM4365 and BCM4366 PCIE devices. cb8dc71f516a brcmfmac: Fix TDLS setup by properly handling p2p noif. 29b93c0e3c38 brcmfmac: Accept events when TDLS is used in combination with p2p.
Kalle Valo
PATCH 2/16 brcmfmac: Add support for the BCM4350 PCIE device.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
This patch adds support fo the BRCM4350 2x2 11ac PCIE device.
--- drivers/net/wireless/brcm80211/brcmfmac/chip.c | 1 + drivers/net/wireless/brcm80211/brcmfmac/pcie.c | 9 +++++++++ drivers/net/wireless/brcm80211/include/brcm_hw_ids.h | 2 ++ 3 files changed, 12 insertions(+)
drivers/net/wireless/brcm80211/brcmfmac/chip.c +1 -0
@@ -647,6 +647,7 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci)return 0x198000 ;case BRCM_CC_4335_CHIP_ID :case BRCM_CC_4339_CHIP_ID : +case BRCM_CC_4350_CHIP_ID :case BRCM_CC_4354_CHIP_ID :case BRCM_CC_4356_CHIP_ID :case BRCM_CC_43567_CHIP_ID :
drivers/net/wireless/brcm80211/brcmfmac/pcie.c +9 -0
@@ -47,6 +47,8 @@ enum brcmf_pcie_state {#define BRCMF_PCIE_43602_FW_NAME "brcm/brcmfmac43602-pcie.bin"#define BRCMF_PCIE_43602_NVRAM_NAME "brcm/brcmfmac43602-pcie.txt" +#define BRCMF_PCIE_4350_FW_NAME "brcm/brcmfmac4350-pcie.bin" +#define BRCMF_PCIE_4350_NVRAM_NAME "brcm/brcmfmac4350-pcie.txt"#define BRCMF_PCIE_4356_FW_NAME "brcm/brcmfmac4356-pcie.bin"#define BRCMF_PCIE_4356_NVRAM_NAME "brcm/brcmfmac4356-pcie.txt"#define BRCMF_PCIE_43570_FW_NAME "brcm/brcmfmac43570-pcie.bin"
@@ -194,6 +196,8 @@ enum brcmf_pcie_state {MODULE_FIRMWARE (BRCMF_PCIE_43602_FW_NAME );MODULE_FIRMWARE (BRCMF_PCIE_43602_NVRAM_NAME ); +MODULE_FIRMWARE (BRCMF_PCIE_4350_FW_NAME ); +MODULE_FIRMWARE (BRCMF_PCIE_4350_NVRAM_NAME );MODULE_FIRMWARE (BRCMF_PCIE_4356_FW_NAME );MODULE_FIRMWARE (BRCMF_PCIE_4356_NVRAM_NAME );MODULE_FIRMWARE (BRCMF_PCIE_43570_FW_NAME );
@@ -1418,6 +1422,10 @@ static int brcmf_pcie_get_fwnames(struct brcmf_pciedev_info *devinfo) fw_name =BRCMF_PCIE_43602_FW_NAME ; nvram_name =BRCMF_PCIE_43602_NVRAM_NAME ;break ; +case BRCM_CC_4350_CHIP_ID : + fw_name =BRCMF_PCIE_4350_FW_NAME ; + nvram_name =BRCMF_PCIE_4350_NVRAM_NAME ; +break ;case BRCM_CC_4356_CHIP_ID : fw_name =BRCMF_PCIE_4356_FW_NAME ; nvram_name =BRCMF_PCIE_4356_NVRAM_NAME ;
@@ -1956,6 +1964,7 @@ cleanup: PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, 0 }static struct pci_device_id brcmf_pcie_devid_table[] = { +BRCMF_PCIE_DEVICE (BRCM_PCIE_4350_DEVICE_ID ),BRCMF_PCIE_DEVICE (BRCM_PCIE_4356_DEVICE_ID ),BRCMF_PCIE_DEVICE (BRCM_PCIE_43567_DEVICE_ID ),BRCMF_PCIE_DEVICE (BRCM_PCIE_43570_DEVICE_ID ),
drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +2 -0
@@ -39,6 +39,7 @@#define BRCM_CC_4339_CHIP_ID 0x4339#define BRCM_CC_43430_CHIP_ID 43430#define BRCM_CC_4345_CHIP_ID 0x4345 +#define BRCM_CC_4350_CHIP_ID 0x4350#define BRCM_CC_4354_CHIP_ID 0x4354#define BRCM_CC_4356_CHIP_ID 0x4356#define BRCM_CC_43566_CHIP_ID 43566
@@ -56,6 +57,7 @@#define BRCM_USB_BCMFW_DEVICE_ID 0x0bdc/* PCIE Device IDs */ +#define BRCM_PCIE_4350_DEVICE_ID 0x43a3#define BRCM_PCIE_4354_DEVICE_ID 0x43df#define BRCM_PCIE_4356_DEVICE_ID 0x43ec#define BRCM_PCIE_43567_DEVICE_ID 0x43d3
Signature · 1 line
1.9.1
PATCH 3/16 brcmfmac: Fix set and get tx-power functions.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
Implementation of tx-power (get and set) related functions are still assuming mW interface. This is wrong as functions use dbm (or mbm) nowadays. As a result a tx power configuration could result in wrong power configuration.
--- drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 137 ++++----------------- 1 file changed, 26 insertions(+), 111 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +26 -111
@@ -236,89 +236,6 @@ static int brcmf_roamoff;module_param_named (roamoff, brcmf_roamoff, int,S_IRUSR );MODULE_PARM_DESC (roamoff,"do not use internal roaming engine" ); -/* Quarter dBm units to mW -* Table starts at QDBM_OFFSET, so the first entry is mW for qdBm=153 -* Table is offset so the last entry is largest mW value that fits in -* a u16. -*/ - -#define QDBM_OFFSET 153/* Offset for first entry */ -#define QDBM_TABLE_LEN 40/* Table size */ - -/* Smallest mW value that will round up to the first table entry, QDBM_OFFSET. -* Value is ( mW(QDBM_OFFSET - 1) + mW(QDBM_OFFSET) ) / 2 -*/ -#define QDBM_TABLE_LOW_BOUND 6493/* Low bound */ - -/* Largest mW value that will round down to the last table entry, -* QDBM_OFFSET + QDBM_TABLE_LEN-1. -* Value is ( mW(QDBM_OFFSET + QDBM_TABLE_LEN - 1) + -* mW(QDBM_OFFSET + QDBM_TABLE_LEN) ) / 2. -*/ -#define QDBM_TABLE_HIGH_BOUND 64938/* High bound */ - -static const u16 nqdBm_to_mW_map[QDBM_TABLE_LEN ] = { -/* qdBm: +0 +1 +2 +3 +4 +5 +6 +7 */ -/* 153: */ 6683 ,7079 ,7499 ,7943 ,8414 ,8913 ,9441 ,10000 , -/* 161: */ 10593 ,11220 ,11885 ,12589 ,13335 ,14125 ,14962 ,15849 , -/* 169: */ 16788 ,17783 ,18836 ,19953 ,21135 ,22387 ,23714 ,25119 , -/* 177: */ 26607 ,28184 ,29854 ,31623 ,33497 ,35481 ,37584 ,39811 , -/* 185: */ 42170 ,44668 ,47315 ,50119 ,53088 ,56234 ,59566 ,63096 -}; - -static u16 brcmf_qdbm_to_mw (u8 qdbm) -{ -uint factor =1 ; -int idx = qdbm -QDBM_OFFSET ; - -if (idx >=QDBM_TABLE_LEN ) -/* clamp to max u16 mW value */ -return 0xFFFF ; - -/* scale the qdBm index up to the range of the table 0-40 -* where an offset of 40 qdBm equals a factor of 10 mW. -*/ -while (idx <0 ) { - idx +=40 ; - factor *=10 ; - } - -/* return the mW value scaled down to the correct factor of 10, -* adding in factor/2 to get proper rounding. -*/ -return (nqdBm_to_mW_map[idx] + factor /2 ) / factor; -} - -static u8 brcmf_mw_to_qdbm (u16 mw) -{ -u8 qdbm; -int offset; -uint mw_uint = mw; -uint boundary; - -/* handle boundary case */ -if (mw_uint <=1 ) -return 0 ; - - offset =QDBM_OFFSET ; - -/* move mw into the range of the table */ -while (mw_uint <QDBM_TABLE_LOW_BOUND ) { - mw_uint *=10 ; - offset -=40 ; - } - -for (qdbm =0 ; qdbm <QDBM_TABLE_LEN -1 ; qdbm++) { - boundary = nqdBm_to_mW_map[qdbm] + (nqdBm_to_mW_map[qdbm +1 ] - - nqdBm_to_mW_map[qdbm]) /2 ; -if (mw_uint < boundary) -break ; - } - - qdbm += (u8 ) offset; - -return qdbm; -}static u16 chandef_to_chanspec (struct brcmu_d11inf *d11inf,struct cfg80211_chan_def *ch)
@@ -2017,16 +1934,14 @@ static s32 brcmf_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, enum nl80211_tx_power_setting type, s32 mbm) { - struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);struct net_device *ndev =cfg_to_ndev (cfg);struct brcmf_if *ifp =netdev_priv (ndev); -u16 txpwrmw; -s32 err =0 ; -s32 disable =0 ; -s32 dbm =MBM_TO_DBM (mbm); +s32 err; +s32 disable; +u32 qdbm =127 ; -brcmf_dbg (TRACE ,"Enter\n" ); +brcmf_dbg (TRACE ,"Enter %d %d\n" , type, mbm);if (!check_vif_up (ifp->vif))return -EIO ;
@@ -2035,12 +1950,20 @@ brcmf_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,break ;case NL80211_TX_POWER_LIMITED :case NL80211_TX_POWER_FIXED : -if (dbm <0 ) { +if (mbm <0 ) {brcmf_err ("TX_POWER_FIXED - dbm is negative\n" ); err = -EINVAL ; goto done; } + qdbm =MBM_TO_DBM (4 * mbm); +if (qdbm >127 ) + qdbm =127 ; + qdbm |=WL_TXPWR_OVERRIDE ;break ; +default : +brcmf_err ("Unsupported type %d\n" , type); + err = -EINVAL ; + goto done; }/* Make sure radio is off or on as far as software is concerned */ disable =WL_RADIO_SW_DISABLE <<16 ;
@@ -2048,52 +1971,44 @@ brcmf_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,if (err)brcmf_err ("WLC_SET_RADIO error (%d)\n" , err); -if (dbm >0xffff ) - txpwrmw =0xffff ; -else - txpwrmw = (u16 ) dbm; - err =brcmf_fil_iovar_int_set (ifp,"qtxpower" , - (s32 )brcmf_mw_to_qdbm (txpwrmw)); + err =brcmf_fil_iovar_int_set (ifp,"qtxpower" , qdbm);if (err)brcmf_err ("qtxpower error (%d)\n" , err); - cfg->conf->tx_power = dbm; done: -brcmf_dbg (TRACE ,"Exit\n" ); +brcmf_dbg (TRACE ,"Exit %d (qdbm)\n" , qdbm & ~WL_TXPWR_OVERRIDE );return err; } -static s32 brcmf_cfg80211_get_tx_power (struct wiphy *wiphy, -struct wireless_dev *wdev, -s32 *dbm) +static s32 +brcmf_cfg80211_get_tx_power (struct wiphy *wiphy,struct wireless_dev *wdev, +s32 *dbm) {struct brcmf_cfg80211_info *cfg =wiphy_to_cfg (wiphy); -struct brcmf_if *ifp =netdev_priv (cfg_to_ndev (cfg)); -s32 txpwrdbm; -u8 result; -s32 err =0 ; +struct net_device *ndev =cfg_to_ndev (cfg); +struct brcmf_if *ifp =netdev_priv (ndev); +s32 qdbm =0 ; +s32 err;brcmf_dbg (TRACE ,"Enter\n" );if (!check_vif_up (ifp->vif))return -EIO ; - err =brcmf_fil_iovar_int_get (ifp,"qtxpower" , &txpwrdbm); + err =brcmf_fil_iovar_int_get (ifp,"qtxpower" , &qdbm);if (err) {brcmf_err ("error (%d)\n" , err); goto done; } - - result = (u8) (txpwrdbm & ~WL_TXPWR_OVERRIDE ); - *dbm = (s32 )brcmf_qdbm_to_mw (result); + *dbm = (qdbm & ~WL_TXPWR_OVERRIDE ) /4 ; done: -brcmf_dbg (TRACE ,"Exit\n" ); +brcmf_dbg (TRACE ,"Exit (0x%x %d)\n" , qdbm, *dbm);return err; }static s32 brcmf_cfg80211_config_default_key (struct wiphy *wiphy,struct net_device *ndev, -u8 key_idx,bool unicast,bool multicast) +u8 key_idx,bool unicast,bool multicast) {struct brcmf_if *ifp =netdev_priv (ndev);u32 index;
Signature · 1 line
1.9.1
PATCH 4/16 brcmfmac: Only assign primary netdev to if2bss array.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
The if2bss allows for translation of ifidx to bssidx which has a 1:n relation. Therefor only the first (primary) netdev should be assigned in this array. This fixes the p2pon=1 module param usage.
--- drivers/net/wireless/brcm80211/brcmfmac/core.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/core.c +10 -4
@@ -53,6 +53,8 @@ MODULE_LICENSE("Dual BSD/GPL");#define BRCMF_RXREORDER_EXPIDX_VALID 0x08#define BRCMF_RXREORDER_NEW_HOLE 0x10 +#define BRCMF_BSSIDX_INVALID -1 +/* Error bits */ int brcmf_msg_level;module_param_named (debug, brcmf_msg_level, int,S_IRUSR |S_IWUSR );
@@ -837,7 +839,8 @@ struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bssidx, s32 ifidx, ifp =netdev_priv (ndev); ifp->ndev = ndev;/* store mapping ifidx to bssidx */ - drvr->if2bss[ifidx] = bssidx; +if (drvr->if2bss[ifidx] ==BRCMF_BSSIDX_INVALID ) + drvr->if2bss[ifidx] = bssidx; } ifp->drvr = drvr;
@@ -862,15 +865,15 @@ static void brcmf_del_if(struct brcmf_pub *drvr, s32 bssidx)struct brcmf_if *ifp; ifp = drvr->iflist[bssidx]; - drvr->if2bss[ifp->ifidx] =-1 ; drvr->iflist[bssidx] =NULL ;if (!ifp) {brcmf_err ("Null interface, idx=%d\n" , bssidx);return ; }brcmf_dbg (TRACE ,"Enter, idx=%d, ifidx=%d\n" , bssidx, ifp->ifidx); +if (drvr->if2bss[ifp->ifidx] == bssidx) + drvr->if2bss[ifp->ifidx] =BRCMF_BSSIDX_INVALID ;if (ifp->ndev) { - drvr->if2bss[ifp->ifidx] =-1 ;if (bssidx ==0 ) {if (ifp->ndev->netdev_ops == &brcmf_netdev_ops_pri) {rtnl_lock ();
@@ -926,6 +929,7 @@ int brcmf_attach(struct device *dev) {struct brcmf_pub *drvr =NULL ;int ret =0 ; +int i;brcmf_dbg (TRACE ,"Enter\n" );
@@ -934,7 +938,9 @@ int brcmf_attach(struct device *dev)if (!drvr)return -ENOMEM ; -memset (drvr->if2bss,0xFF ,sizeof (drvr->if2bss)); +for (i =0 ; i <ARRAY_SIZE (drvr->if2bss); i++) + drvr->if2bss[i] =BRCMF_BSSIDX_INVALID ; +mutex_init (&drvr->proto_block);/* Link to bus module */
Signature · 1 line
1.9.1
PATCH 5/16 brcmfmac: Inform p2p module about p2pon through API
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
When the p2pon module param is used then p2p attach will initialize p2p device iface in the firmware, but it is doing that by checking data. It is cleaner to pass the p2pon information to p2p by API. This information is also needed for other patch.
--- drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 5 +++-- drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h | 3 ++- drivers/net/wireless/brcm80211/brcmfmac/core.c | 3 ++- drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 12 ++++++++---- drivers/net/wireless/brcm80211/brcmfmac/p2p.h | 4 +++- 5 files changed, 18 insertions(+), 9 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +3 -2
@@ -6127,7 +6127,8 @@ static void brcmf_free_wiphy(struct wiphy *wiphy) }struct brcmf_cfg80211_info *brcmf_cfg80211_attach (struct brcmf_pub *drvr, -struct device *busdev) +struct device *busdev, +bool p2pdev_forced) {struct net_device *ndev =brcmf_get_ifp (drvr,0 )->ndev;struct brcmf_cfg80211_info *cfg;
@@ -6219,7 +6220,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr, *cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40 ; } - err =brcmf_p2p_attach (cfg); + err =brcmf_p2p_attach (cfg, p2pdev_forced);if (err) {brcmf_err ("P2P initilisation failed (%d)\n" , err); goto wiphy_unreg_out;
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +2 -1
@@ -469,7 +469,8 @@ brcmf_cfg80211_connect_info *cfg_to_conn(struct brcmf_cfg80211_info *cfg) }struct brcmf_cfg80211_info *brcmf_cfg80211_attach (struct brcmf_pub *drvr, -struct device *busdev); +struct device *busdev, +bool p2pdev_forced);void brcmf_cfg80211_detach (struct brcmf_cfg80211_info *cfg);s32 brcmf_cfg80211_up (struct net_device *ndev);s32 brcmf_cfg80211_down (struct net_device *ndev);
drivers/net/wireless/brcm80211/brcmfmac/core.c +2 -1
@@ -1044,7 +1044,8 @@ int brcmf_bus_start(struct device *dev)brcmf_fws_add_interface (ifp); - drvr->config =brcmf_cfg80211_attach (drvr, bus_if->dev); + drvr->config =brcmf_cfg80211_attach (drvr, bus_if->dev, + brcmf_p2p_enable);if (drvr->config ==NULL ) { ret = -ENOMEM ; goto fail;
drivers/net/wireless/brcm80211/brcmfmac/p2p.c +8 -4
@@ -2336,7 +2336,7 @@ void brcmf_p2p_stop_device(struct wiphy *wiphy, struct wireless_dev *wdev)* * @cfg: driver private data for cfg80211 interface. */ -s32 brcmf_p2p_attach (struct brcmf_cfg80211_info *cfg) +s32 brcmf_p2p_attach (struct brcmf_cfg80211_info *cfg,bool p2pdev_forced) {struct brcmf_if *pri_ifp;struct brcmf_if *p2p_ifp;
@@ -2351,11 +2351,15 @@ s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg) drvr = cfg->pub; - pri_ifp = drvr->iflist[0 ]; - p2p_ifp = drvr->iflist[1 ]; - + pri_ifp =brcmf_get_ifp (drvr,0 ); p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY ].vif = pri_ifp->vif; +if (p2pdev_forced) { + p2p_ifp = drvr->iflist[1 ]; + }else { + p2p_ifp =NULL ; + p2p->p2pdev_dynamically = true; + }if (p2p_ifp) { p2p_vif =brcmf_alloc_vif (cfg,NL80211_IFTYPE_P2P_DEVICE , false);
drivers/net/wireless/brcm80211/brcmfmac/p2p.h +3 -1
@@ -124,6 +124,7 @@ struct afx_hdl {* @wait_next_af: thread synchronizing struct. * @gon_req_action: about to send go negotiation requets frame. * @block_gon_req_tx: drop tx go negotiation requets frame. +* @p2pdev_dynamically: is p2p device if created by module param or supplicant. */ struct brcmf_p2p_info {struct brcmf_cfg80211_info *cfg;
@@ -144,9 +145,10 @@ struct brcmf_p2p_info {struct completion wait_next_af;bool gon_req_action;bool block_gon_req_tx; +bool p2pdev_dynamically; }; -s32 brcmf_p2p_attach (struct brcmf_cfg80211_info *cfg); +s32 brcmf_p2p_attach (struct brcmf_cfg80211_info *cfg,bool p2pdev_forced);void brcmf_p2p_detach (struct brcmf_p2p_info *p2p); struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name, unsigned char name_assign_type,
Signature · 1 line
1.9.1
PATCH 6/16 brcmfmac: Fix bug in flowring management.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
The hash index stored in the flowrings is of type u16 but gets stored in u8. This can result in incorrect indexing and possibly result in crashes. This patch fixes the type.
--- drivers/net/wireless/brcm80211/brcmfmac/flowring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/brcm80211/brcmfmac/flowring.h +1 -1
@@ -34,7 +34,7 @@ enum ring_status { };struct brcmf_flowring_ring { -u8 hash_id; +u16 hash_id;bool blocked;enum ring_status status;struct sk_buff_head skblist;
Signature · 1 line
1.9.1
PATCH 7/16 brcmfmac: Make p2pon module param always available.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
p2pon module param is currently under define BRCMDBG. Though it is a needed option for older versions of the wpa_supplicant which do not support the P2P_DEVICE interface.
--- drivers/net/wireless/brcm80211/brcmfmac/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/core.c +1 -3
@@ -62,10 +62,8 @@ MODULE_PARM_DESC(debug, "level of debug output");/* P2P0 enable */ static int brcmf_p2p_enable; -#ifdef CONFIG_BRCMDBG module_param_named (p2pon, brcmf_p2p_enable, int,0 ); -MODULE_PARM_DESC (p2pon,"enable p2p management functionality" ); -#endif +MODULE_PARM_DESC (p2pon,"enable legacy p2p management functionality" );char *brcmf_ifname (struct brcmf_pub *drvr,int ifidx) {
Signature · 1 line
1.9.1
PATCH 8/16 brcmfmac: Workaround in change vif for wpa_supplicant support.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
Different wpa_supplicants have different behavior and expectations regarding the change_virtual_intf behavior. This patch implements a workaround for the different versions and possible brcmfmac configuration.
--- drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 43 ++++++++++++++++------ 1 file changed, 31 insertions(+), 12 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +31 -12
@@ -777,6 +777,37 @@ brcmf_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,s32 err =0 ;brcmf_dbg (TRACE ,"Enter, idx=%d, type=%d\n" , ifp->bssidx, type); + +/* WAR: There are a number of p2p interface related problems which +* need to be handled initially (before doing the validate). +* wpa_supplicant tends to do iface changes on p2p device/client/go +* which are not always possible/allowed. However we need to return +* OK otherwise the wpa_supplicant wont start. The situation differs +* on configuration and setup (p2pon=1 module param). The first check +* is to see if the request is a change to station for p2p iface. +*/ +if ((type ==NL80211_IFTYPE_STATION ) && + ((vif->wdev.iftype ==NL80211_IFTYPE_P2P_CLIENT ) || + (vif->wdev.iftype ==NL80211_IFTYPE_P2P_GO ) || + (vif->wdev.iftype ==NL80211_IFTYPE_P2P_DEVICE ))) { +brcmf_dbg (TRACE ,"Ignoring cmd for p2p if\n" ); +/* Now depending on whether module param p2pon=1 was used the +* response needs to be either 0 or EOPNOTSUPP. The reason is +* that if p2pon=1 is used, but a newer supplicant is used then +* we should return an error, as this combination wont work. +* In other situations 0 is returned and supplicant will start +* normally. It will give a trace in cfg80211, but it is the +* only way to get it working. Unfortunately this will result +* in situation where we wont support new supplicant in +* combination with module param p2pon=1, but that is the way +* it is. If the user tries this then unloading of driver might +* fail/lock. +*/ +if (cfg->p2p.p2pdev_dynamically) +return -EOPNOTSUPP ; +else +return 0 ; + } err =brcmf_vif_change_validate (wiphy_to_cfg (wiphy), vif, type);if (err) {brcmf_err ("iface validation failed: err=%d\n" , err);
@@ -792,18 +823,6 @@ brcmf_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev, infra =0 ;break ;case NL80211_IFTYPE_STATION : -/* Ignore change for p2p IF. Unclear why supplicant does this */ -if ((vif->wdev.iftype ==NL80211_IFTYPE_P2P_CLIENT ) || - (vif->wdev.iftype ==NL80211_IFTYPE_P2P_GO )) { -brcmf_dbg (TRACE ,"Ignoring cmd for p2p if\n" ); -/* WAR: It is unexpected to get a change of VIF for P2P -* IF, but it happens. The request can not be handled -* but returning EPERM causes a crash. Returning 0 -* without setting ieee80211_ptr->iftype causes trace -* (WARN_ON) but it works with wpa_supplicant -*/ -return 0 ; - } infra =1 ;break ;case NL80211_IFTYPE_AP :
Signature · 1 line
1.9.1
PATCH 9/16 brcmfmac: Deleting of p2p device is leaking memory.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
When a p2p device gets deleted, the memory for the vif is not being released. This is solved by reorganizing the cleanup path and properly freeing the memory.
--- drivers/net/wireless/brcm80211/brcmfmac/core.c | 13 ++++++++- drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 38 +++++++++++++------------- drivers/net/wireless/brcm80211/brcmfmac/p2p.h | 1 + 3 files changed, 32 insertions(+), 20 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/core.c +12 -1
@@ -887,6 +887,16 @@ static void brcmf_del_if(struct brcmf_pub *drvr, s32 bssidx)cancel_work_sync (&ifp->multicast_work); }brcmf_net_detach (ifp->ndev); + }else { +/* Only p2p device interfaces which get dynamically created +* end up here. In this case the p2p module should be informed +* about the removal of the interface within the firmware. If +* not then p2p commands towards the firmware will cause some +* serious troublesome side effects. The p2p module will clean +* up the ifp if needed. +*/ +brcmf_p2p_ifp_removed (ifp); +kfree (ifp); } }
@@ -894,7 +904,8 @@ void brcmf_remove_interface(struct brcmf_if *ifp) {if (!ifp ||WARN_ON (ifp->drvr->iflist[ifp->bssidx] != ifp))return ; - +brcmf_dbg (TRACE ,"Enter, bssidx=%d, ifidx=%d\n" , ifp->bssidx, + ifp->ifidx);brcmf_fws_del_interface (ifp);brcmf_del_if (ifp->drvr, ifp->bssidx); }
drivers/net/wireless/brcm80211/brcmfmac/p2p.c +19 -19
@@ -2131,20 +2131,6 @@ fail: }/** -* brcmf_p2p_delete_p2pdev() - delete P2P_DEVICE virtual interface. -* -* @vif: virtual interface object to delete. -*/ -static void brcmf_p2p_delete_p2pdev (struct brcmf_p2p_info *p2p, -struct brcmf_cfg80211_vif *vif) -{ -cfg80211_unregister_wdev (&vif->wdev); - p2p->bss_idx[P2PAPI_BSSCFG_DEVICE ].vif =NULL ; -brcmf_remove_interface (vif->ifp); -brcmf_free_vif (vif); -} - -/** * brcmf_p2p_add_vif() - create a new P2P virtual interface. * * @wiphy: wiphy device of new interface.
@@ -2267,9 +2253,11 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev)break ;case NL80211_IFTYPE_P2P_DEVICE : +if (!p2p->bss_idx[P2PAPI_BSSCFG_DEVICE ].vif) +return 0 ;brcmf_p2p_cancel_remain_on_channel (vif->ifp);brcmf_p2p_deinit_discovery (p2p); -brcmf_p2p_delete_p2pdev (p2p, vif); +brcmf_remove_interface (vif->ifp);return 0 ;default :return -ENOTSUPP ;
@@ -2301,6 +2289,21 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev)return err; } +void brcmf_p2p_ifp_removed (struct brcmf_if *ifp) +{ +struct brcmf_cfg80211_info *cfg; +struct brcmf_cfg80211_vif *vif; + +brcmf_dbg (INFO ,"P2P: device interface removed\n" ); + vif = ifp->vif; + cfg =wdev_to_cfg (&vif->wdev); + cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE ].vif =NULL ; +rtnl_lock (); +cfg80211_unregister_wdev (&vif->wdev); +rtnl_unlock (); +brcmf_free_vif (vif); +} +int brcmf_p2p_start_device (struct wiphy *wiphy,struct wireless_dev *wdev) {struct brcmf_cfg80211_info *cfg =wiphy_to_cfg (wiphy);
@@ -2425,10 +2428,7 @@ void brcmf_p2p_detach(struct brcmf_p2p_info *p2p)if (vif !=NULL ) {brcmf_p2p_cancel_remain_on_channel (vif->ifp);brcmf_p2p_deinit_discovery (p2p); -/* remove discovery interface */ -rtnl_lock (); -brcmf_p2p_delete_p2pdev (p2p, vif); -rtnl_unlock (); +brcmf_remove_interface (vif->ifp); }/* just set it all to zero */ memset (p2p,0 ,sizeof (*p2p));
drivers/net/wireless/brcm80211/brcmfmac/p2p.h +1 -0
@@ -157,6 +157,7 @@ struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name,int brcmf_p2p_del_vif (struct wiphy *wiphy,struct wireless_dev *wdev);int brcmf_p2p_ifchange (struct brcmf_cfg80211_info *cfg,enum brcmf_fil_p2p_if_types if_type); +void brcmf_p2p_ifp_removed (struct brcmf_if *ifp);int brcmf_p2p_start_device (struct wiphy *wiphy,struct wireless_dev *wdev);void brcmf_p2p_stop_device (struct wiphy *wiphy,struct wireless_dev *wdev); int brcmf_p2p_scan_prep(struct wiphy *wiphy,
Signature · 1 line
1.9.1
PATCH 10/16 brcmfmac: Only handle p2p_stop_device if vif is valid
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
In some situations it is possible that vif has been removed while cfg80211 invokes the p2p_stop_device handler. This will result in crash.
--- drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/p2p.c +11 -5
@@ -2327,11 +2327,17 @@ void brcmf_p2p_stop_device(struct wiphy *wiphy, struct wireless_dev *wdev)struct brcmf_cfg80211_vif *vif; vif = container_of(wdev, struct brcmf_cfg80211_vif, wdev); -mutex_lock (&cfg->usr_sync); - (void )brcmf_p2p_deinit_discovery (p2p); -brcmf_abort_scanning (cfg); -clear_bit (BRCMF_VIF_STATUS_READY , &vif->sme_state); -mutex_unlock (&cfg->usr_sync); +/* This call can be result of the unregister_wdev call. In that case +* we dont want to do anything anymore. Just return. The config vif +* will have been cleared at this point. +*/ +if (p2p->bss_idx[P2PAPI_BSSCFG_DEVICE ].vif == vif) { +mutex_lock (&cfg->usr_sync); + (void )brcmf_p2p_deinit_discovery (p2p); +brcmf_abort_scanning (cfg); +clear_bit (BRCMF_VIF_STATUS_READY , &vif->sme_state); +mutex_unlock (&cfg->usr_sync); + } }/**
Signature · 1 line
1.9.1
PATCH 11/16 brcmfmac: Fix p2p bug for older firmwares.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
Some devices with older firmwares are reporting new p2p device interface with the wrong type. Accept this type to get p2p working for these devices.
--- drivers/net/wireless/brcm80211/brcmfmac/fweh.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/fweh.c +6 -4
@@ -186,11 +186,13 @@ static void brcmf_fweh_handle_if_event(struct brcmf_pub *drvr, ifevent->action, ifevent->ifidx, ifevent->bssidx, ifevent->flags, ifevent->role); -/* The P2P Device interface event must not be ignored -* contrary to what firmware tells us. +/* The P2P Device interface event must not be ignored contrary to what +* firmware tells us. Older firmware uses p2p noif, with sta role. +* This should be accepted. */ - is_p2pdev = (ifevent->flags &BRCMF_E_IF_FLAG_NOIF ) && - ifevent->role ==BRCMF_E_IF_ROLE_P2P_CLIENT ; + is_p2pdev = ((ifevent->flags &BRCMF_E_IF_FLAG_NOIF ) && + (ifevent->role ==BRCMF_E_IF_ROLE_P2P_CLIENT || + ifevent->role ==BRCMF_E_IF_ROLE_STA ));if (!is_p2pdev && (ifevent->flags &BRCMF_E_IF_FLAG_NOIF )) {brcmf_dbg (EVENT ,"event can be ignored\n" );return ;
Signature · 1 line
1.9.1
PATCH 12/16 brcmfmac: Add module parameter to disable features.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
For debugging purpose it is very handy to be able to disable features. It has happened a few times that new features turned out not always being properly detected for all devices/firmwares. Making it possible to disable the feature with a module parameter will make testing/debugging easier.
--- drivers/net/wireless/brcm80211/brcmfmac/feature.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/net/wireless/brcm80211/brcmfmac/feature.c +13 -0
@@ -15,6 +15,7 @@*/ #include <linux/netdevice.h> +#include <linux/module.h> #include <brcm_hw_ids.h> #include "core.h"
@@ -23,6 +24,12 @@#include "fwil.h" #include "feature.h" + +/* Module param feature_disable (global for all devices) */ +static int brcmf_feature_disable; +module_param_named (feature_disable, brcmf_feature_disable, int,0 ); +MODULE_PARM_DESC (feature_disable,"Disable features" ); +/* * expand feature list to array of feature strings. */
@@ -131,6 +138,12 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)brcmf_feat_iovar_int_set (ifp,BRCMF_FEAT_MBSS ,"mbss" ,0 );brcmf_feat_iovar_int_get (ifp,BRCMF_FEAT_P2P ,"p2p" ); +if (brcmf_feature_disable) { +brcmf_dbg (INFO ,"Features: 0x%02x, disable: 0x%02x\n" , + ifp->drvr->feat_flags, brcmf_feature_disable); + ifp->drvr->feat_flags &= ~brcmf_feature_disable; + } +/* set chip related quirks */ switch (drvr->bus_if->chip) {case BRCM_CC_43236_CHIP_ID :
Signature · 1 line
1.9.1
PATCH 13/16 brcmfmac: Fix race condition bug when deleting p2p interface.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
When p2p device interface gets deleted by deinitialising discovery it will result in an event which removes the interface, but that is also done by delete p2p interface code. This results in race condition which sometimes results in lockup/crash. With this patch the delete device interface will wait for the event (with timeout) removing the possible race condition. Also on the stop device call from cfg80211 the deinitialisation of the discovery device should be avoided as it can result in a similar situation.
--- drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/p2p.c +14 -8
@@ -2241,6 +2241,7 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev)brcmf_dbg (TRACE ,"delete P2P vif\n" ); vif = container_of(wdev, struct brcmf_cfg80211_vif, wdev); +brcmf_cfg80211_arm_vif_event (cfg, vif);switch (vif->wdev.iftype) {case NL80211_IFTYPE_P2P_CLIENT :if (test_bit (BRCMF_VIF_STATUS_DISCONNECTING , &vif->sme_state))
@@ -2257,8 +2258,6 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev)return 0 ;brcmf_p2p_cancel_remain_on_channel (vif->ifp);brcmf_p2p_deinit_discovery (p2p); -brcmf_remove_interface (vif->ifp); -return 0 ;default :return -ENOTSUPP ; }
@@ -2270,10 +2269,11 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev)wait_for_completion_timeout (&cfg->vif_disabled,msecs_to_jiffies (500 )); -brcmf_vif_clear_mgmt_ies (vif); - -brcmf_cfg80211_arm_vif_event (cfg, vif); - err =brcmf_p2p_release_p2p_if (vif); + err =0 ; +if (vif->wdev.iftype !=NL80211_IFTYPE_P2P_DEVICE ) { +brcmf_vif_clear_mgmt_ies (vif); + err =brcmf_p2p_release_p2p_if (vif); + }if (!err) {/* wait for firmware event */ err = brcmf_cfg80211_wait_vif_event_timeout(cfg, BRCMF_E_IF_DEL,
@@ -2283,8 +2283,12 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev)else err =0 ; } +if (err) +brcmf_remove_interface (vif->ifp); +brcmf_cfg80211_arm_vif_event (cfg,NULL ); - p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION ].vif =NULL ; +if (vif->wdev.iftype !=NL80211_IFTYPE_P2P_DEVICE ) + p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION ].vif =NULL ;return err; }
@@ -2333,7 +2337,9 @@ void brcmf_p2p_stop_device(struct wiphy *wiphy, struct wireless_dev *wdev)*/ if (p2p->bss_idx[P2PAPI_BSSCFG_DEVICE ].vif == vif) {mutex_lock (&cfg->usr_sync); - (void )brcmf_p2p_deinit_discovery (p2p); +/* Set the discovery state to SCAN */ + (void )brcmf_p2p_set_discover_state (vif->ifp, +WL_P2P_DISC_ST_SCAN ,0 ,0 );brcmf_abort_scanning (cfg);clear_bit (BRCMF_VIF_STATUS_READY , &vif->sme_state);mutex_unlock (&cfg->usr_sync);
Signature · 1 line
1.9.1
PATCH 14/16 brcmfmac: Add support for the BCM4365 and BCM4366 PCIE devices.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
This patch adds support for the BCM4365 and BCM4366 11ac Wave2 PCIE devices.
--- drivers/net/wireless/brcm80211/brcmfmac/chip.c | 110 +++++++++++++++++++-- drivers/net/wireless/brcm80211/brcmfmac/pcie.c | 22 +++++ .../net/wireless/brcm80211/include/brcm_hw_ids.h | 9 ++ include/linux/bcma/bcma.h | 2 + 4 files changed, 133 insertions(+), 10 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/chip.c +100 -10
@@ -208,6 +208,7 @@ struct sbsocramregs { };#define SOCRAMREGOFFS (_f) offsetof(struct sbsocramregs, _f) +#define SYSMEMREGOFFS (_f) offsetof(struct sbsocramregs, _f)#define ARMCR4_CAP (0x04)#define ARMCR4_BANKIDX (0x40)
@@ -516,6 +517,9 @@ static int brcmf_chip_cores_check(struct brcmf_chip_priv *ci)case BCMA_CORE_ARM_CR4 : cpu_found = true;break ; +case BCMA_CORE_ARM_CA7 : + cpu_found = true; +break ;default :break ; }
@@ -614,6 +618,29 @@ static void brcmf_chip_socram_ramsize(struct brcmf_core_priv *sr, u32 *ramsize, } } +/** Return the SYS MEM size */ +static u32 brcmf_chip_sysmem_ramsize (struct brcmf_core_priv *sysmem) +{ +u32 memsize =0 ; +u32 coreinfo; +u32 idx; +u32 nb; +u32 banksize; + +if (!brcmf_chip_iscoreup (&sysmem->pub)) +brcmf_chip_resetcore (&sysmem->pub,0 ,0 ,0 ); + + coreinfo =brcmf_chip_core_read32 (sysmem,SYSMEMREGOFFS (coreinfo)); + nb = (coreinfo &SRCI_SRNB_MASK ) >>SRCI_SRNB_SHIFT ; + +for (idx =0 ; idx < nb; idx++) { +brcmf_chip_socram_banksize (sysmem, idx, &banksize); + memsize += banksize; + } + +return memsize; +} +/** Return the TCM-RAM size of the ARMCR4 core. */ static u32 brcmf_chip_tcm_ramsize (struct brcmf_core_priv *cr4) {
@@ -656,6 +683,9 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci)case BRCM_CC_4358_CHIP_ID :case BRCM_CC_43602_CHIP_ID :return 0x180000 ; +case BRCM_CC_4365_CHIP_ID : +case BRCM_CC_4366_CHIP_ID : +return 0x200000 ;default :brcmf_err ("unknown chip: %s\n" , ci->pub.name);break ;
@@ -678,10 +708,28 @@ static int brcmf_chip_get_raminfo(struct brcmf_chip_priv *ci)return -EINVAL ; } }else { - mem =brcmf_chip_get_core (&ci->pub,BCMA_CORE_INTERNAL_MEM ); - mem_core = container_of(mem, struct brcmf_core_priv, pub); -brcmf_chip_socram_ramsize (mem_core, &ci->pub.ramsize, - &ci->pub.srsize); + mem =brcmf_chip_get_core (&ci->pub,BCMA_CORE_SYS_MEM ); +if (mem) { + mem_core = container_of(mem, struct brcmf_core_priv, + pub); + ci->pub.ramsize =brcmf_chip_sysmem_ramsize (mem_core); + ci->pub.rambase =brcmf_chip_tcm_rambase (ci); +if (!ci->pub.rambase) { +brcmf_err ("RAM base not provided with ARM CA7 core\n" ); +return -EINVAL ; + } + }else { + mem =brcmf_chip_get_core (&ci->pub, +BCMA_CORE_INTERNAL_MEM ); +if (!mem) { +brcmf_err ("No memory cores found\n" ); +return -ENOMEM ; + } + mem_core = container_of(mem, struct brcmf_core_priv, + pub); +brcmf_chip_socram_ramsize (mem_core, &ci->pub.ramsize, + &ci->pub.srsize); + } } brcmf_dbg(INFO, "RAM: base=0x%x size=%d (0x%x) sr=%d (0x%x)\n", ci->pub.rambase, ci->pub.ramsize, ci->pub.ramsize,
@@ -924,7 +972,7 @@ static int brcmf_chip_recognition(struct brcmf_chip_priv *ci)static void brcmf_chip_disable_arm (struct brcmf_chip_priv *chip,u16 id) {struct brcmf_core *core; -struct brcmf_core_priv *cr4; +struct brcmf_core_priv *cpu;u32 val;
@@ -937,10 +985,11 @@ static void brcmf_chip_disable_arm(struct brcmf_chip_priv *chip, u16 id)brcmf_chip_coredisable (core,0 ,0 );break ;case BCMA_CORE_ARM_CR4 : - cr4 = container_of(core, struct brcmf_core_priv, pub); +case BCMA_CORE_ARM_CA7 : + cpu = container_of(core, struct brcmf_core_priv, pub);/* clear all IOCTL bits except HALT bit */ - val = chip->ops->read32 (chip->ctx, cr4->wrapbase +BCMA_IOCTL ); + val = chip->ops->read32 (chip->ctx, cpu->wrapbase +BCMA_IOCTL ); val &=ARMCR4_BCMA_IOCTL_CPUHALT ;brcmf_chip_resetcore (core, val,ARMCR4_BCMA_IOCTL_CPUHALT ,ARMCR4_BCMA_IOCTL_CPUHALT );
@@ -1162,6 +1211,33 @@ static bool brcmf_chip_cr4_set_active(struct brcmf_chip_priv *chip, u32 rstvec)return true; } +static inline void +brcmf_chip_ca7_set_passive (struct brcmf_chip_priv *chip) +{ +struct brcmf_core *core; + +brcmf_chip_disable_arm (chip,BCMA_CORE_ARM_CA7 ); + + core =brcmf_chip_get_core (&chip->pub,BCMA_CORE_80211 ); +brcmf_chip_resetcore (core,D11_BCMA_IOCTL_PHYRESET | +D11_BCMA_IOCTL_PHYCLOCKEN , +D11_BCMA_IOCTL_PHYCLOCKEN , +D11_BCMA_IOCTL_PHYCLOCKEN ); +} + +static bool brcmf_chip_ca7_set_active (struct brcmf_chip_priv *chip,u32 rstvec) +{ +struct brcmf_core *core; + + chip->ops->activate (chip->ctx, &chip->pub, rstvec); + +/* restore ARM */ + core =brcmf_chip_get_core (&chip->pub,BCMA_CORE_ARM_CA7 ); +brcmf_chip_resetcore (core,ARMCR4_BCMA_IOCTL_CPUHALT ,0 ,0 ); + +return true; +} +void brcmf_chip_set_passive (struct brcmf_chip *pub) {struct brcmf_chip_priv *chip;
@@ -1175,8 +1251,16 @@ void brcmf_chip_set_passive(struct brcmf_chip *pub)brcmf_chip_cr4_set_passive (chip);return ; } - -brcmf_chip_cm3_set_passive (chip); + arm =brcmf_chip_get_core (pub,BCMA_CORE_ARM_CA7 ); +if (arm) { +brcmf_chip_ca7_set_passive (chip); +return ; + } + arm =brcmf_chip_get_core (pub,BCMA_CORE_ARM_CM3 ); +if (arm) { +brcmf_chip_cm3_set_passive (chip); +return ; + } }bool brcmf_chip_set_active (struct brcmf_chip *pub,u32 rstvec)
@@ -1190,8 +1274,14 @@ bool brcmf_chip_set_active(struct brcmf_chip *pub, u32 rstvec) arm =brcmf_chip_get_core (pub,BCMA_CORE_ARM_CR4 );if (arm)return brcmf_chip_cr4_set_active (chip, rstvec); + arm =brcmf_chip_get_core (pub,BCMA_CORE_ARM_CA7 ); +if (arm) +return brcmf_chip_ca7_set_active (chip, rstvec); + arm =brcmf_chip_get_core (pub,BCMA_CORE_ARM_CM3 ); +if (arm) +return brcmf_chip_cm3_set_active (chip); -return brcmf_chip_cm3_set_active (chip); +return false; }bool brcmf_chip_sr_capable (struct brcmf_chip *pub)
drivers/net/wireless/brcm80211/brcmfmac/pcie.c +22 -0
@@ -55,6 +55,10 @@ enum brcmf_pcie_state {#define BRCMF_PCIE_43570_NVRAM_NAME "brcm/brcmfmac43570-pcie.txt"#define BRCMF_PCIE_4358_FW_NAME "brcm/brcmfmac4358-pcie.bin"#define BRCMF_PCIE_4358_NVRAM_NAME "brcm/brcmfmac4358-pcie.txt" +#define BRCMF_PCIE_4365_FW_NAME "brcm/brcmfmac4365b-pcie.bin" +#define BRCMF_PCIE_4365_NVRAM_NAME "brcm/brcmfmac4365b-pcie.txt" +#define BRCMF_PCIE_4366_FW_NAME "brcm/brcmfmac4366b-pcie.bin" +#define BRCMF_PCIE_4366_NVRAM_NAME "brcm/brcmfmac4366b-pcie.txt"#define BRCMF_PCIE_FW_UP_TIMEOUT 2000/* msec */
@@ -204,6 +208,10 @@ MODULE_FIRMWARE(BRCMF_PCIE_43570_FW_NAME);MODULE_FIRMWARE (BRCMF_PCIE_43570_NVRAM_NAME );MODULE_FIRMWARE (BRCMF_PCIE_4358_FW_NAME );MODULE_FIRMWARE (BRCMF_PCIE_4358_NVRAM_NAME ); +MODULE_FIRMWARE (BRCMF_PCIE_4365_FW_NAME ); +MODULE_FIRMWARE (BRCMF_PCIE_4365_NVRAM_NAME ); +MODULE_FIRMWARE (BRCMF_PCIE_4366_FW_NAME ); +MODULE_FIRMWARE (BRCMF_PCIE_4366_NVRAM_NAME );struct brcmf_pcie_console {
@@ -1440,6 +1448,14 @@ static int brcmf_pcie_get_fwnames(struct brcmf_pciedev_info *devinfo) fw_name =BRCMF_PCIE_4358_FW_NAME ; nvram_name =BRCMF_PCIE_4358_NVRAM_NAME ;break ; +case BRCM_CC_4365_CHIP_ID : + fw_name =BRCMF_PCIE_4365_FW_NAME ; + nvram_name =BRCMF_PCIE_4365_NVRAM_NAME ; +break ; +case BRCM_CC_4366_CHIP_ID : + fw_name =BRCMF_PCIE_4366_FW_NAME ; + nvram_name =BRCMF_PCIE_4366_NVRAM_NAME ; +break ;default :brcmf_err ("Unsupported chip 0x%04x\n" , devinfo->ci->chip);return -ENODEV ;
@@ -1973,6 +1989,12 @@ static struct pci_device_id brcmf_pcie_devid_table[] = {BRCMF_PCIE_DEVICE (BRCM_PCIE_43602_2G_DEVICE_ID ),BRCMF_PCIE_DEVICE (BRCM_PCIE_43602_5G_DEVICE_ID ),BRCMF_PCIE_DEVICE (BRCM_PCIE_43602_RAW_DEVICE_ID ), +BRCMF_PCIE_DEVICE (BRCM_PCIE_4365_DEVICE_ID ), +BRCMF_PCIE_DEVICE (BRCM_PCIE_4365_2G_DEVICE_ID ), +BRCMF_PCIE_DEVICE (BRCM_PCIE_4365_5G_DEVICE_ID ), +BRCMF_PCIE_DEVICE (BRCM_PCIE_4366_DEVICE_ID ), +BRCMF_PCIE_DEVICE (BRCM_PCIE_4366_2G_DEVICE_ID ), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_5G_DEVICE_ID), { /* end: all zeroes */ } };
drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +9 -0
@@ -48,6 +48,8 @@#define BRCM_CC_43570_CHIP_ID 43570#define BRCM_CC_4358_CHIP_ID 0x4358#define BRCM_CC_43602_CHIP_ID 43602 +#define BRCM_CC_4365_CHIP_ID 0x4365 +#define BRCM_CC_4366_CHIP_ID 0x4366/* USB Device IDs */ #define BRCM_USB_43143_DEVICE_ID 0xbd1e
@@ -67,6 +69,13 @@#define BRCM_PCIE_43602_2G_DEVICE_ID 0x43bb#define BRCM_PCIE_43602_5G_DEVICE_ID 0x43bc#define BRCM_PCIE_43602_RAW_DEVICE_ID 43602 +#define BRCM_PCIE_4365_DEVICE_ID 0x43ca +#define BRCM_PCIE_4365_2G_DEVICE_ID 0x43cb +#define BRCM_PCIE_4365_5G_DEVICE_ID 0x43cc +#define BRCM_PCIE_4366_DEVICE_ID 0x43c3 +#define BRCM_PCIE_4366_2G_DEVICE_ID 0x43c4 +#define BRCM_PCIE_4366_5G_DEVICE_ID 0x43c5 +/* brcmsmac IDs */ #define BCM4313_D11N2G_ID 0x4727/* 4313 802.11n 2.4G device */
include/linux/bcma/bcma.h +2 -0
@@ -151,6 +151,8 @@ struct bcma_host_ops {#define BCMA_CORE_PCIE2 0x83C/* PCI Express Gen2 */ #define BCMA_CORE_USB30_DEV 0x83D#define BCMA_CORE_ARM_CR4 0x83E +#define BCMA_CORE_ARM_CA7 0x847 +#define BCMA_CORE_SYS_MEM 0x849#define BCMA_CORE_DEFAULT 0xFFF#define BCMA_MAX_NR_CORES 16
Signature · 1 line
1.9.1
PATCH 15/16 brcmfmac: Fix TDLS setup by properly handling p2p noif.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
There is a workaround needed for p2p device setup which breaks tdls functionality. This patch fixes that by properly signalling fweh that p2p device setup is ongoing.
--- drivers/net/wireless/brcm80211/brcmfmac/fweh.c | 17 +++++++++++++++-- drivers/net/wireless/brcm80211/brcmfmac/fweh.h | 3 +++ drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 8 +++++++- 3 files changed, 25 insertions(+), 3 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/fweh.c +15 -2
@@ -188,11 +188,13 @@ static void brcmf_fweh_handle_if_event(struct brcmf_pub *drvr,/* The P2P Device interface event must not be ignored contrary to what * firmware tells us. Older firmware uses p2p noif, with sta role. -* This should be accepted. +* This should be accepted when p2pdev_setup is ongoing. TDLS setup will +* use the same ifevent and should be ignored. */ is_p2pdev = ((ifevent->flags &BRCMF_E_IF_FLAG_NOIF ) && (ifevent->role ==BRCMF_E_IF_ROLE_P2P_CLIENT || - ifevent->role ==BRCMF_E_IF_ROLE_STA )); + ((ifevent->role ==BRCMF_E_IF_ROLE_STA ) && + (drvr->fweh.p2pdev_setup_ongoing))));if (!is_p2pdev && (ifevent->flags &BRCMF_E_IF_FLAG_NOIF )) {brcmf_dbg (EVENT ,"event can be ignored\n" );return ;
@@ -316,6 +318,17 @@ event_free: }/** +* brcmf_fweh_p2pdev_setup() - P2P device setup ongoing (or not). +* +* @ifp: ifp on which setup is taking place or finished. +* @ongoing: p2p device setup in progress (or not). +*/ +void brcmf_fweh_p2pdev_setup (struct brcmf_if *ifp,bool ongoing) +{ + ifp->drvr->fweh.p2pdev_setup_ongoing = ongoing; +} + +/** * brcmf_fweh_attach() - initialize firmware event handling. * * @drvr: driver information object.
drivers/net/wireless/brcm80211/brcmfmac/fweh.h +3 -0
@@ -230,12 +230,14 @@ typedef int (*brcmf_fweh_handler_t)(struct brcmf_if *ifp,/** * struct brcmf_fweh_info - firmware event handling information. * +* @p2pdev_setup_ongoing: P2P device creation in progress. * @event_work: event worker. * @evt_q_lock: lock for event queue protection. * @event_q: event queue. * @evt_handler: registered event handlers. */ struct brcmf_fweh_info { +bool p2pdev_setup_ongoing;struct work_struct event_work;spinlock_t evt_q_lock;struct list_head event_q;
@@ -255,6 +257,7 @@ void brcmf_fweh_unregister(struct brcmf_pub *drvr,int brcmf_fweh_activate_events (struct brcmf_if *ifp);void brcmf_fweh_process_event (struct brcmf_pub *drvr,struct brcmf_event *event_packet); +void brcmf_fweh_p2pdev_setup (struct brcmf_if *ifp,bool ongoing);static inline void brcmf_fweh_process_skb (struct brcmf_pub *drvr,struct sk_buff *skb)
drivers/net/wireless/brcm80211/brcmfmac/p2p.c +7 -1
@@ -2084,11 +2084,13 @@ static struct wireless_dev *brcmf_p2p_create_p2pdev(struct brcmf_p2p_info *p2p,brcmf_p2p_set_firmware (pri_ifp, p2p->dev_addr);brcmf_cfg80211_arm_vif_event (p2p->cfg, p2p_vif); +brcmf_fweh_p2pdev_setup (pri_ifp, true);/* Initialize P2P Discovery in the firmware */ err =brcmf_fil_iovar_int_set (pri_ifp,"p2p_disc" ,1 );if (err <0 ) {brcmf_err ("set p2p_disc error\n" ); +brcmf_fweh_p2pdev_setup (pri_ifp, false);brcmf_cfg80211_arm_vif_event (p2p->cfg,NULL ); goto fail; }
@@ -2097,6 +2099,7 @@ static struct wireless_dev *brcmf_p2p_create_p2pdev(struct brcmf_p2p_info *p2p, err =brcmf_cfg80211_wait_vif_event_timeout (p2p->cfg,BRCMF_E_IF_ADD ,msecs_to_jiffies (1500 ));brcmf_cfg80211_arm_vif_event (p2p->cfg,NULL ); +brcmf_fweh_p2pdev_setup (pri_ifp, false);if (!err) {brcmf_err ("timeout occurred\n" ); err = -EIO ;
@@ -2396,6 +2399,8 @@ s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg, bool p2pdev_forced)memcpy (p2p_ifp->mac_addr, p2p->dev_addr,ETH_ALEN );brcmf_p2p_set_firmware (pri_ifp, p2p->dev_addr); +brcmf_fweh_p2pdev_setup (pri_ifp, true); +/* Initialize P2P Discovery in the firmware */ err =brcmf_fil_iovar_int_set (pri_ifp,"p2p_disc" ,1 );if (err <0 ) {
@@ -2422,8 +2427,9 @@ s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg, bool p2pdev_forced)INIT_WORK (&p2p->afx_hdl.afx_work, brcmf_p2p_afx_handler);init_completion (&p2p->afx_hdl.act_frm_scan);init_completion (&p2p->wait_next_af); - } exit: +brcmf_fweh_p2pdev_setup (pri_ifp, false); + }return err; }
Signature · 1 line
1.9.1
PATCH 16/16 brcmfmac: Accept events when TDLS is used in combination with p2p.
In reply to Arend van SprielFrom: Hante Meuleman <[email protected]>
TDLS events are mapped back to primary interface but when p2p is in use then this fails because the check was incorrect by checking bsscfg number. Which can be different when a p2p device has been created.
--- drivers/net/wireless/brcm80211/brcmfmac/fweh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/fweh.c +1 -2
@@ -300,8 +300,7 @@ static void brcmf_fweh_event_worker(struct work_struct *work) goto event_free; } -if ((event->code ==BRCMF_E_TDLS_PEER_EVENT ) && - (emsg.bsscfgidx ==1 )) +if (event->code ==BRCMF_E_TDLS_PEER_EVENT ) ifp = drvr->iflist[0 ];else ifp = drvr->iflist[emsg.bsscfgidx];
Signature · 1 line
1.9.1
Re: [PATCH 16/16] brcmfmac: Accept events when TDLS is used in combination with p2p.
Quoted 6 lines · Arend van Spriel
From: Hante Meuleman <[email protected]>
TDLS events are mapped back to primary interface but when p2p is in use then this fails because the check was incorrect by checking bsscfg number. Which can be different when a p2p device has been created.
Quoted 23 lines
Reviewed-by Arend Van Spriel <[email protected]>Reviewed-by Pieter-Paul Giesberts <[email protected]>Signed-off-by Hante Meuleman <[email protected]>Signed-off-by Arend van Spriel <[email protected]>--- drivers/net/wireless/brcm80211/brcmfmac/fweh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/wireless/brcm80211/brcmfmac/fweh.c +1
-2@@ -300,8 +300,7 @@ static void brcmf_fweh_event_worker(struct work_struct *work) goto event_free; } -if ((event->code ==BRCMF_E_TDLS_PEER_EVENT ) && - (emsg.bsscfgidx ==1 )) +if (event->code ==BRCMF_E_TDLS_PEER_EVENT ) ifp = drvr->iflist[0 ];else ifp = drvr->iflist[emsg.bsscfgidx];
Rafał Miłecki
maintainerQuoted 1 line · Arend van Spriel
* correct set and get tx-power.
Oh, I got a similar patch, you were faster :)
Quoted 5 lines
The series should be applied to master branch of the wireless-drivers-next repository after the series sent earlier with
Message-ID: <[email protected]> and patch "brcmfmac: Reset PCIE devices after recognition." with
Message-ID: <[email protected]>.
Applied and tested with SR400ac (2 * BCM43602), no regressions noticed. Nice work!
Quoted 4 lines · Rafał Miłecki
Quoted 1 line · Arend van Spriel
* correct set and get tx-power.
Oh, I got a similar patch, you were faster :)
Hope our patch works for you.
Quoted 8 lines
Quoted 5 lines
The series should be applied to master branch of the wireless-drivers-next repository after the series sent earlier with
Message-ID: <[email protected]> and patch "brcmfmac: Reset PCIE devices after recognition." with
Message-ID: <[email protected]>.Applied and tested with SR400ac (2 * BCM43602), no regressions noticed. Nice work!
Thanks for testing.
Regards,
Arend
Quoted 6 lines · Rafał Miłecki
Quoted 1 line · Arend van Spriel
* correct set and get tx-power.
Oh, I got a similar patch, you were faster :)
Quoted 8 lines
Quoted 5 lines
The series should be applied to master branch of the wireless-drivers-next repository after the series sent earlier with
Message-ID: <[email protected]> and patch "brcmfmac: Reset PCIE devices after recognition." with
Message-ID: <[email protected]>.Applied and tested with SR400ac (2 * BCM43602), no regressions noticed. Nice work!o
I replied to first and last patch so you are acknowledged for testing. Doing it for each patch in the series was too much trouble for me :-p
Regards,
Arend
Rafał Miłecki
maintainerQuoted 18 lines · Arend van Spriel
Quoted 17 lines · Rafał Miłecki
Quoted 2 lines · Arend van Spriel
* correct set and get tx-power.
Oh, I got a similar patch, you were faster :)
Quoted 6 lines
The series should be applied to master branch of the wireless-drivers-next
repository after the series sent earlier with
Message-ID: <[email protected]> and patch "brcmfmac: Reset PCIE devices after recognition." with
Message-ID: <[email protected]>.
Quoted 6 lines
Quoted 2 lines
Applied and tested with SR400ac (2 * BCM43602), no regressions noticed. Nice work!o
I replied to first and last patch so you are acknowledged for testing. Doing it for each patch in the series was too much trouble for me :-p
Sure. I didn't really bother because of old patchwork installed on kernel.org. It doesn't understand UTF and malforms my name forcing Kalle to fixup patches manually:
https://patchwork.kernel.org/patch/7220471/
https://patchwork.kernel.org/patch/7220401/
Signature · 1 line
Rafał
Quoted 23 lines · Rafał Miłecki
Quoted 22 lines · Arend van Spriel
Quoted 19 lines · Rafał Miłecki
Quoted 2 lines · Arend van Spriel
* correct set and get tx-power.
Oh, I got a similar patch, you were faster :)
Quoted 6 lines
The series should be applied to master branch of the wireless-drivers-next
repository after the series sent earlier with
Message-ID: <[email protected]> and patch "brcmfmac: Reset PCIE devices after recognition." with
Message-ID: <[email protected]>.Applied and tested with SR400ac (2 * BCM43602), no regressions noticed. Nice work!o
Quoted 8 lines
Quoted 2 lines
I replied to first and last patch so you are acknowledged for testing. Doing it for each patch in the series was too much trouble for me :-p
Sure. I didn't really bother because of old patchwork installed on kernel.org. It doesn't understand UTF and malforms my name forcing Kalle to fixup patches manually:
https://patchwork.kernel.org/patch/7220471/
https://patchwork.kernel.org/patch/7220401/
So the patchwork upgrade request did not get through yet ;-)
Regards,
Arend
Quoted 6 lines · Arend van Spriel
Quoted 5 lines · Rafał Miłecki
Quoted 2 lines · Arend van Spriel
I replied to first and last patch so you are acknowledged for testing. Doing it for each patch in the series was too much trouble for me :-p
Quoted 7 lines
Quoted 5 lines
Sure. I didn't really bother because of old patchwork installed on kernel.org. It doesn't understand UTF and malforms my name forcing Kalle to fixup patches manually:
https://patchwork.kernel.org/patch/7220471/
https://patchwork.kernel.org/patch/7220401/So the patchwork upgrade request did not get through yet ;-)
At least I haven't heard anything and the ticket is still open :/
Signature · 1 line
Kalle Valo
Quoted 11 lines · Arend van Spriel
This series is intended for v4.4 containing the following highlights:
* support for BCM4350, BCM4365, and BCM4366 PCIE devices.
* fixed for legacy P2P and P2P device handling.
* correct set and get tx-power.The series should be applied to master branch of the wireless-drivers-next repository after the series sent earlier with
Message-ID: <[email protected]> and patch "brcmfmac: Reset PCIE devices after recognition." with
Message-ID: <[email protected]>.
Hi Kalle,
If my administration is correct there are 29 patches pending. Any chance these will get applied. Or did I miss some remarks requiring a resend.
Regards,
Arend
Quoted 33 lines
Hante Meuleman (16):
brcmfmac: Fix exception handling.
brcmfmac: Add support for the BCM4350 PCIE device.
brcmfmac: Fix set and get tx-power functions.
brcmfmac: Only assign primary netdev to if2bss array.
brcmfmac: Inform p2p module about p2pon through API
brcmfmac: Fix bug in flowring management.
brcmfmac: Make p2pon module param always available.
brcmfmac: Workaround in change vif forwpa_supplicantsupport.
brcmfmac: Deleting of p2p device is leaking memory.
brcmfmac: Only handlep2p_stop_deviceif vif is valid
brcmfmac: Fix p2p bug for older firmwares.
brcmfmac: Add module parameter to disable features.
brcmfmac: Fix race condition bug when deleting p2p interface.
brcmfmac: Add support for the BCM4365 and BCM4366 PCIE devices.
brcmfmac: Fix TDLS setup by properly handling p2p noif.
brcmfmac: Accept events when TDLS is used in combination with p2p.drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 186 +++++++-------------- drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h | 3 +- drivers/net/wireless/brcm80211/brcmfmac/chip.c | 111 ++++++++++-- drivers/net/wireless/brcm80211/brcmfmac/core.c | 34 +++- drivers/net/wireless/brcm80211/brcmfmac/feature.c | 13 ++ drivers/net/wireless/brcm80211/brcmfmac/flowring.h | 2 +- drivers/net/wireless/brcm80211/brcmfmac/fweh.c | 26 ++- drivers/net/wireless/brcm80211/brcmfmac/fweh.h | 3 + drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 92 ++++++---- drivers/net/wireless/brcm80211/brcmfmac/p2p.h | 5 +- drivers/net/wireless/brcm80211/brcmfmac/pcie.c | 31 ++++ .../net/wireless/brcm80211/include/brcm_hw_ids.h | 11 ++ include/linux/bcma/bcma.h | 2 + 13 files changed, 331 insertions(+), 188 deletions(-)
Pending patches in patchwork and their states
Quoted 3 lines · Arend van Spriel
If my administration is correct there are 29 patches pending. Any chance these will get applied. Or did I miss some remarks requiring a resend.
Yeah, I have been lagging behind patches due to other stuff and I have 64 patches pending right now. Sorry about that, I should get to them in a day or two. Here's a short summary how I use patchwork. Hopefully it makes it easier for people to follow their patch status and I get less emails ;)
If the patch in patchwork is in state New or Under Review they are on my queue and waiting my action:
https://patchwork.kernel.org/project/linux-wireless/list/
If the patch is Deferred it means that there was a problem and I look at the patch more closely later (when I have more time etc):
https://patchwork.kernel.org/project/linux-wireless/list/?state=10
Awaiting Upstream means that I cannot apply the patch right now due to a mising patch in some other component, for example to mac80211. I will apply the patch once the dependency is available in my tree:
https://patchwork.kernel.org/project/linux-wireless/list/?state=8
Any other state means that the patch is out of my radar due to one reason or another, and a resend is needed to get the patch active again:
Rejected = In my opinion not acceptable patch
RFC = Request For Comments, submitter didn't officially send the patch yet Not Applicaple = Not a wireless patch
Changes Requested = Needs a new version due to review comments Superseded = A new version of the patch submitted without comments
And Accepted state of course means that I have commited the patch :)
Signature · 1 line
Kalle Valo
Rafał Miłecki
maintainerQuoted 5 lines · Arend van Spriel
This series is intended for v4.4 containing the following highlights:
* support for BCM4350, BCM4365, and BCM4366 PCIE devices.
* fixed for legacy P2P and P2P device handling.
* correct set and get tx-power.
Hi Arend, can you provide us some update on progress of releasing brcmfmac4366b-pcie.bin, please?
Quoted 9 lines · Rafał Miłecki
Quoted 5 lines · Arend van Spriel
This series is intended for v4.4 containing the following highlights:
* support for BCM4350, BCM4365, and BCM4366 PCIE devices.
* fixed for legacy P2P and P2P device handling.
* correct set and get tx-power.Hi Arend, can you provide us some update on progress of releasing brcmfmac4366b-pcie.bin, please?
Sure. No progress. You also want to know about brcmfmac4365b-pcie.bin? Both devices are still in development or just taped-out if I am not mistaken (maybe missed a memo or two). I will ask for expected eta.
Regards,
Arend
Rafał Miłecki
maintainerQuoted 12 lines · Arend van Spriel
Quoted 11 lines · Rafał Miłecki
Quoted 6 lines · Arend van Spriel
This series is intended for v4.4 containing the following highlights:
* support for BCM4350, BCM4365, and BCM4366 PCIE devices.
* fixed for legacy P2P and P2P device handling.
* correct set and get tx-power.
Quoted 7 lines
Quoted 2 lines
Hi Arend, can you provide us some update on progress of releasing brcmfmac4366b-pcie.bin, please?
Sure. No progress. You also want to know about brcmfmac4365b-pcie.bin? Both devices are still in development or just taped-out if I am not mistaken (maybe missed a memo or two). I will ask for expected eta.
I'm not really interested in BCM4365 as I can't find any market device using this chipset.
BCM4366 can be found in following devices:
ASUS RT-AC3100
ASUS RT-AC5300
ASUS RT-AC88U
D-Link DIR-885L rev A1
D-Link DIR-895L rev A1
Netgear R8500
You can already buy most of them in US, ASUS RT-AC5300 is also available in Europe.
Signature · 1 line
Rafał
Quoted 32 lines · Rafał Miłecki
Quoted 12 lines · Arend van Spriel
Quoted 11 lines · Rafał Miłecki
Quoted 6 lines · Arend van Spriel
This series is intended for v4.4 containing the following highlights:
* support for BCM4350, BCM4365, and BCM4366 PCIE devices.
* fixed for legacy P2P and P2P device handling.
* correct set and get tx-power.Quoted 7 lines
Quoted 2 lines
Hi Arend, can you provide us some update on progress of releasing brcmfmac4366b-pcie.bin, please?
Sure. No progress. You also want to know about brcmfmac4365b-pcie.bin? Both devices are still in development or just taped-out if I am not mistaken (maybe missed a memo or two). I will ask for expected eta.
I'm not really interested in BCM4365 as I can't find any market device using this chipset.
BCM4366 can be found in following devices:
ASUS RT-AC3100
ASUS RT-AC5300
ASUS RT-AC88U
D-Link DIR-885L rev A1
D-Link DIR-895L rev A1
Netgear R8500
Quoted 2 lines
You can already buy most of them in US, ASUS RT-AC5300 is also available in Europe.
So I missed the memo. Thanks.
Gr. AvS