[PATCH] brcmfmac: print error in p2p_ifadd firmware command fails

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] brcmfmac: print error in p2p_ifadd firmware command fails

Rafał Miłecki-2
This is helpful for debugging, without this all I was getting from "iw"
command on device with BCM43602 was:
> command failed: Too many open files in system (-23)

Signed-off-by: Rafał Miłecki <[hidden email]>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
index 1652a48..f7b7e29 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -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;
 }
--
1.8.4.5

Reply | Threaded
Open this post in threaded view
|

[PATCH V2] brcmfmac: print error if p2p_ifadd firmware command fails

Rafał Miłecki-2
This is helpful for debugging, without this all I was getting from "iw"
command on device with BCM43602 was:
> command failed: Too many open files in system (-23)

Signed-off-by: Rafał Miłecki <[hidden email]>
---
V2: s/in/if/ in commit message
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
index 1652a48..f7b7e29 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -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;
 }
--
1.8.4.5

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH V2] brcmfmac: print error if p2p_ifadd firmware command fails

Arend Van Spriel-3
On 24-05-16 23:05, Rafał Miłecki wrote:

> This is helpful for debugging, without this all I was getting from "iw"
> command on device with BCM43602 was:
>> command failed: Too many open files in system (-23)
>
> Signed-off-by: Rafał Miłecki <[hidden email]>
> ---
> V2: s/in/if/ in commit message
> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
> index 1652a48..f7b7e29 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
> @@ -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

>  
>   return err;
>  }
>
Reply | Threaded
Open this post in threaded view
|

[PATCH V3] brcmfmac: print error if p2p_ifadd firmware command fails

Rafał Miłecki-2
In reply to this post by Rafał Miłecki-2
This is helpful for debugging, without this all I was getting from "iw"
command on device with BCM43602 was:
> command failed: Too many open files in system (-23)

Signed-off-by: Rafał Miłecki <[hidden email]>
---
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(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
index 1652a48..bc26aec 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -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;
  }
--
1.8.4.5

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH V3] brcmfmac: print error if p2p_ifadd firmware command fails

Arend Van Spriel-3
On 26-5-2016 0:44, Rafał Miłecki wrote:

> This is helpful for debugging, without this all I was getting from "iw"
> command on device with BCM43602 was:
>> command failed: Too many open files in system (-23)
>
> Signed-off-by: Rafał Miłecki <[hidden email]>
> ---
> 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(-)
>
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
> index 1652a48..bc26aec 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
> @@ -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;
>   }

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