brcmfmac: print error in p2p_ifadd firmware command fails
PATCH 1/1 brcmfmac: print error in p2p_ifadd firmware command fails
This is helpful for debugging, without this all I was getting from "iw" command on device with BCM43602 was:
Quoted 1 line
command failed: Too many open files in system (-23)
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +1 -1
@@ -2031,7 +2031,7 @@ static int brcmf_p2p_request_p2p_if(struct brcmf_p2p_info *p2p, err =brcmf_fil_iovar_data_set (ifp,"p2p_ifadd" , &if_request,sizeof (if_request));if (err) -return err; +brcmf_err ("p2p_ifadd failed %d\n" , err);return err; }
Signature · 1 line
1.8.4.5
PATCH v2 1/1 brcmfmac: print error if p2p_ifadd firmware command fails
This is helpful for debugging, without this all I was getting from "iw" command on device with BCM43602 was:
Quoted 1 line
command failed: Too many open files in system (-23)
---
V2: s/in/if/ in commit message
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +1 -1
@@ -2031,7 +2031,7 @@ static int brcmf_p2p_request_p2p_if(struct brcmf_p2p_info *p2p, err =brcmf_fil_iovar_data_set (ifp,"p2p_ifadd" , &if_request,sizeof (if_request));if (err) -return err; +brcmf_err ("p2p_ifadd failed %d\n" , err);return err; }
Signature · 1 line
1.8.4.5
Arend van Spriel
maintainerRe: [PATCH V2] brcmfmac: print error if p2p_ifadd firmware command fails
Quoted 16 lines · Rafał Miłecki
This is helpful for debugging, without this all I was getting from "iw" command on device with BCM43602 was:
Quoted 1 line
command failed: Too many open files in system (-23)
Signed-off-by Rafał Miłecki <[email protected]>---
V2: s/in/if/ in commit message--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +0
-0
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c static int brcmf_p2p_request_p2p_if(struct brcmf_p2p_info *p2p, · line 2034
Quoted 5 lines
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +1
-1@@ -2031,7 +2031,7 @@ static int brcmf_p2p_request_p2p_if(struct brcmf_p2p_info *p2p, err =brcmf_fil_iovar_data_set (ifp,"p2p_ifadd" , &if_request,sizeof (if_request));if (err) -return err; +brcmf_err ("p2p_ifadd failed %d\n" , err);
I would prefer adding a more generic failure message including ifname and type in brcmf_cfg80211_add_iface() in cfg80211.c.
Regards,
Arend
Quoted 4 lines
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +0
-0return err; }
PATCH v3 1/1 brcmfmac: print error if p2p_ifadd firmware command fails
In reply to Rafał MiłeckiThis is helpful for debugging, without this all I was getting from "iw" command on device with BCM43602 was:
Quoted 1 line
command failed: Too many open files in system (-23)
---
V2: s/in/if/ in commit message
V3: Add one more error message as suggested by Arend
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +2 -1
@@ -2031,7 +2031,7 @@ static int brcmf_p2p_request_p2p_if(struct brcmf_p2p_info *p2p, err =brcmf_fil_iovar_data_set (ifp,"p2p_ifadd" , &if_request,sizeof (if_request));if (err) -return err; +brcmf_err ("p2p_ifadd failed %d\n" , err);return err; }
@@ -2185,6 +2185,7 @@ struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name, err =brcmf_p2p_request_p2p_if (&cfg->p2p, ifp, cfg->p2p.int_addr, iftype);if (err) { +brcmf_err ("Failed to request P2P virtual interface %s\n" , name);brcmf_cfg80211_arm_vif_event (cfg,NULL ); goto fail; }
Signature · 1 line
1.8.4.5
Arend Van Spriel
maintainerRe: [PATCH V3] brcmfmac: print error if p2p_ifadd firmware command fails
Quoted 26 lines · Rafał Miłecki
This is helpful for debugging, without this all I was getting from "iw" command on device with BCM43602 was:
Quoted 1 line
command failed: Too many open files in system (-23)
Signed-off-by Rafał Miłecki <[email protected]>---
V2: s/in/if/ in commit message
V3: Add one more error message as suggested by Arend--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +1
-1@@ -2031,7 +2031,7 @@ static int brcmf_p2p_request_p2p_if(struct brcmf_p2p_info *p2p, err =brcmf_fil_iovar_data_set (ifp,"p2p_ifadd" , &if_request,sizeof (if_request));if (err) -return err; +brcmf_err ("p2p_ifadd failed %d\n" , err);return err; }
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name, · line 2191
Quoted 7 lines
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +1
-0@@ -2185,6 +2185,7 @@ struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name, err =brcmf_p2p_request_p2p_if (&cfg->p2p, ifp, cfg->p2p.int_addr, iftype);if (err) { +brcmf_err ("Failed to request P2P virtual interface %s\n" , name);brcmf_cfg80211_arm_vif_event (cfg,NULL ); goto fail; }
Not exactly what I meant. I meant instead of and the function I would like the error message in is brcmf_cfg80211_add_iface() so you also get an error message when AP interface creation fails.
Regards,
Arend
PATCH v4 1/1 brcmfmac: print errors if creating interface fails
In reply to Rafał MiłeckiThis is helpful for debugging. Without this all I was getting from "iw" command on failed creating of P2P interface was:
Quoted 1 line
command failed: Too many open files in system (-23)
---
V2: s/in/if/ in commit message
V3: Add one more error message as suggested by Arend
V4: Also update brcmf_cfg80211_add_iface & print error for AP
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8 ++++++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +6 -2
@@ -669,14 +669,18 @@ static struct wireless_dev *brcmf_cfg80211_add_iface(struct wiphy *wiphy,return ERR_PTR (-EOPNOTSUPP );case NL80211_IFTYPE_AP : wdev =brcmf_ap_add_vif (wiphy, name, flags, params); -if (!IS_ERR (wdev)) +if (IS_ERR (wdev)) +brcmf_err ("Failed to create AP interface %s: %d\n" , name,PTR_ERR (wdev)); +else brcmf_cfg80211_update_proto_addr_mode (wdev);return wdev;case NL80211_IFTYPE_P2P_CLIENT :case NL80211_IFTYPE_P2P_GO :case NL80211_IFTYPE_P2P_DEVICE : wdev =brcmf_p2p_add_vif (wiphy, name, name_assign_type, type, flags, params); -if (!IS_ERR (wdev)) +if (IS_ERR (wdev)) +brcmf_err ("Failed to create P2P interface %s: %d\n" , name,PTR_ERR (wdev)); +else brcmf_cfg80211_update_proto_addr_mode (wdev);return wdev;case NL80211_IFTYPE_UNSPECIFIED :
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +2 -1
@@ -2031,7 +2031,7 @@ static int brcmf_p2p_request_p2p_if(struct brcmf_p2p_info *p2p, err =brcmf_fil_iovar_data_set (ifp,"p2p_ifadd" , &if_request,sizeof (if_request));if (err) -return err; +brcmf_err ("p2p_ifadd failed %d\n" , err);return err; }
@@ -2185,6 +2185,7 @@ struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name, err =brcmf_p2p_request_p2p_if (&cfg->p2p, ifp, cfg->p2p.int_addr, iftype);if (err) { +brcmf_err ("Failed to request P2P virtual interface %s\n" , name);brcmf_cfg80211_arm_vif_event (cfg,NULL ); goto fail; }
Signature · 1 line
1.8.4.5