mwifiex: silence TDLS link delete failure for nonexistent link
authorAvinash Patil <patila@marvell.com>
Thu, 22 May 2014 05:02:28 +0000 (22:02 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 22 May 2014 18:04:37 +0000 (14:04 -0400)
If TDLS link delete command fails because of non-existent peer
or TDLS peer is absent from driver's entry, it means link was
already deleted. In such case print debug messages with lower
severity.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/sta_cmdresp.c

index bfebb0144df5ac5ae88bd78dd909888d4bb0a0ea..577f2979ed8f2bcacbacc6af6ce9af03d3f86137 100644 (file)
@@ -865,14 +865,20 @@ static int mwifiex_ret_tdls_oper(struct mwifiex_private *priv,
 
        switch (action) {
        case ACT_TDLS_DELETE:
-               if (reason)
-                       dev_err(priv->adapter->dev,
-                               "TDLS link delete for %pM failed: reason %d\n",
-                               cmd_tdls_oper->peer_mac, reason);
-               else
+               if (reason) {
+                       if (!node || reason == TDLS_ERR_LINK_NONEXISTENT)
+                               dev_dbg(priv->adapter->dev,
+                                       "TDLS link delete for %pM failed: reason %d\n",
+                                       cmd_tdls_oper->peer_mac, reason);
+                       else
+                               dev_err(priv->adapter->dev,
+                                       "TDLS link delete for %pM failed: reason %d\n",
+                                       cmd_tdls_oper->peer_mac, reason);
+               } else {
                        dev_dbg(priv->adapter->dev,
-                               "TDLS link config for %pM successful\n",
+                               "TDLS link delete for %pM successful\n",
                                cmd_tdls_oper->peer_mac);
+               }
                break;
        case ACT_TDLS_CREATE:
                if (reason) {