diff mbox

[4/4] brcmfmac: set NET_NAME_USER for P2P ifs

Message ID 1393512434-1325-5-git-send-email-dh.herrmann@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

David Herrmann Feb. 27, 2014, 2:47 p.m. UTC
Netdevs created via nl80211 (currently only P2P ifs) have names provided
by user-space. Therefore, set the naming-policy to NET_NAME_USER so it is
correctly shown in sysfs.

Cc: Arend van Spriel <arend@broadcom.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
---
 drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Arend van Spriel Feb. 27, 2014, 5:30 p.m. UTC | #1
On 02/27/2014 03:47 PM, David Herrmann wrote:
> Netdevs created via nl80211 (currently only P2P ifs) have names provided
> by user-space. Therefore, set the naming-policy to NET_NAME_USER so it is
> correctly shown in sysfs.
> 
- Cc: Arend van Spriel <arend@broadcom.com>
+ Acked-by: Arend van Spriel <arend@broadcom.com>

> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
> ---
>  drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
> index fc4f98b..6af4d26 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
> @@ -2310,6 +2310,7 @@ struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name,
>  		goto fail;
>  	}
>  
> +	ifp->ndev->name_assign_type = NET_NAME_USER;
>  	strncpy(ifp->ndev->name, name, sizeof(ifp->ndev->name) - 1);
>  	err = brcmf_net_attach(ifp, true);
>  	if (err) {
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
index fc4f98b..6af4d26 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
@@ -2310,6 +2310,7 @@  struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name,
 		goto fail;
 	}
 
+	ifp->ndev->name_assign_type = NET_NAME_USER;
 	strncpy(ifp->ndev->name, name, sizeof(ifp->ndev->name) - 1);
 	err = brcmf_net_attach(ifp, true);
 	if (err) {