Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94889b1f authored by Hante Meuleman's avatar Hante Meuleman Committed by John W. Linville
Browse files

brcmfmac: Update tracelogging for multiple netdevs.



When supporting multiple netdevs it is usefull to log idx in netdev
related functions. This will be used for features like P2P.

Reviewed-by: default avatarArend Van Spriel <arend@broadcom.com>
Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b1a2a411
Loading
Loading
Loading
Loading
+19 −15
Original line number Original line Diff line number Diff line
@@ -70,9 +70,10 @@ static void _brcmf_set_multicast_list(struct work_struct *work)
	u32 buflen;
	u32 buflen;
	s32 err;
	s32 err;


	brcmf_dbg(TRACE, "enter\n");

	ifp = container_of(work, struct brcmf_if, multicast_work);
	ifp = container_of(work, struct brcmf_if, multicast_work);

	brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->idx);

	ndev = ifp->ndev;
	ndev = ifp->ndev;


	/* Determine initial value of allmulti flag */
	/* Determine initial value of allmulti flag */
@@ -129,9 +130,10 @@ _brcmf_set_mac_address(struct work_struct *work)
	struct brcmf_if *ifp;
	struct brcmf_if *ifp;
	s32 err;
	s32 err;


	brcmf_dbg(TRACE, "enter\n");

	ifp = container_of(work, struct brcmf_if, setmacaddr_work);
	ifp = container_of(work, struct brcmf_if, setmacaddr_work);

	brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->idx);

	err = brcmf_fil_iovar_data_set(ifp, "cur_etheraddr", ifp->mac_addr,
	err = brcmf_fil_iovar_data_set(ifp, "cur_etheraddr", ifp->mac_addr,
				       ETH_ALEN);
				       ETH_ALEN);
	if (err < 0) {
	if (err < 0) {
@@ -168,7 +170,7 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb,
	struct brcmf_pub *drvr = ifp->drvr;
	struct brcmf_pub *drvr = ifp->drvr;
	struct ethhdr *eh;
	struct ethhdr *eh;


	brcmf_dbg(TRACE, "Enter\n");
	brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->idx);


	/* Can the device send data? */
	/* Can the device send data? */
	if (drvr->bus_if->state != BRCMF_BUS_DATA) {
	if (drvr->bus_if->state != BRCMF_BUS_DATA) {
@@ -370,7 +372,7 @@ static struct net_device_stats *brcmf_netdev_get_stats(struct net_device *ndev)
{
{
	struct brcmf_if *ifp = netdev_priv(ndev);
	struct brcmf_if *ifp = netdev_priv(ndev);


	brcmf_dbg(TRACE, "Enter\n");
	brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->idx);


	return &ifp->stats;
	return &ifp->stats;
}
}
@@ -422,7 +424,7 @@ static int brcmf_ethtool(struct brcmf_if *ifp, void __user *uaddr)
	u32 toe_cmpnt, csum_dir;
	u32 toe_cmpnt, csum_dir;
	int ret;
	int ret;


	brcmf_dbg(TRACE, "Enter\n");
	brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->idx);


	/* all ethtool calls start with a cmd word */
	/* all ethtool calls start with a cmd word */
	if (copy_from_user(&cmd, uaddr, sizeof(u32)))
	if (copy_from_user(&cmd, uaddr, sizeof(u32)))
@@ -519,7 +521,7 @@ static int brcmf_netdev_ioctl_entry(struct net_device *ndev, struct ifreq *ifr,
	struct brcmf_if *ifp = netdev_priv(ndev);
	struct brcmf_if *ifp = netdev_priv(ndev);
	struct brcmf_pub *drvr = ifp->drvr;
	struct brcmf_pub *drvr = ifp->drvr;


	brcmf_dbg(TRACE, "ifidx %d, cmd 0x%04x\n", ifp->idx, cmd);
	brcmf_dbg(TRACE, "Enter, bssidx=%d, cmd=0x%04x\n", ifp->idx, cmd);


	if (!drvr->iflist[ifp->idx])
	if (!drvr->iflist[ifp->idx])
		return -1;
		return -1;
@@ -532,7 +534,9 @@ static int brcmf_netdev_ioctl_entry(struct net_device *ndev, struct ifreq *ifr,


static int brcmf_netdev_stop(struct net_device *ndev)
static int brcmf_netdev_stop(struct net_device *ndev)
{
{
	brcmf_dbg(TRACE, "Enter\n");
	struct brcmf_if *ifp = netdev_priv(ndev);

	brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->idx);


	brcmf_cfg80211_down(ndev);
	brcmf_cfg80211_down(ndev);


@@ -550,7 +554,7 @@ static int brcmf_netdev_open(struct net_device *ndev)
	u32 toe_ol;
	u32 toe_ol;
	s32 ret = 0;
	s32 ret = 0;


	brcmf_dbg(TRACE, "ifidx %d\n", ifp->idx);
	brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->idx);


	/* If bus is not ready, can't continue */
	/* If bus is not ready, can't continue */
	if (bus_if->state != BRCMF_BUS_DATA) {
	if (bus_if->state != BRCMF_BUS_DATA) {
@@ -602,7 +606,8 @@ int brcmf_net_attach(struct brcmf_if *ifp)
	struct brcmf_pub *drvr = ifp->drvr;
	struct brcmf_pub *drvr = ifp->drvr;
	struct net_device *ndev;
	struct net_device *ndev;


	brcmf_dbg(TRACE, "ifidx %d mac %pM\n", ifp->idx, ifp->mac_addr);
	brcmf_dbg(TRACE, "Enter, idx=%d mac=%pM\n", ifp->idx,
		  ifp->mac_addr);
	ndev = ifp->ndev;
	ndev = ifp->ndev;


	/* set appropriate operations */
	/* set appropriate operations */
@@ -641,7 +646,7 @@ struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx, s32 bssidx,
	struct net_device *ndev;
	struct net_device *ndev;
	int i;
	int i;


	brcmf_dbg(TRACE, "idx %d\n", ifidx);
	brcmf_dbg(TRACE, "Enter, bssidx=%d, ifidx=%d\n", bssidx, ifidx);


	ifp = drvr->iflist[ifidx];
	ifp = drvr->iflist[ifidx];
	/*
	/*
@@ -695,13 +700,12 @@ void brcmf_del_if(struct brcmf_pub *drvr, int ifidx)
{
{
	struct brcmf_if *ifp;
	struct brcmf_if *ifp;


	brcmf_dbg(TRACE, "idx %d\n", ifidx);

	ifp = drvr->iflist[ifidx];
	ifp = drvr->iflist[ifidx];
	if (!ifp) {
	if (!ifp) {
		brcmf_err("Null interface\n");
		brcmf_err("Null interface, idx=%d\n", ifidx);
		return;
		return;
	}
	}
	brcmf_dbg(TRACE, "Enter, idx=%d, bssidx=%d\n", ifidx, ifp->bssidx);
	if (ifp->ndev) {
	if (ifp->ndev) {
		if (ifidx == 0) {
		if (ifidx == 0) {
			if (ifp->ndev->netdev_ops == &brcmf_netdev_ops_pri) {
			if (ifp->ndev->netdev_ops == &brcmf_netdev_ops_pri) {