Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / ath / wil6210 / main.c
index 9d05628e450dbfca1827c987d37d4295343e9c2e..a0478e2f68688ebdcc71f2351e7593efa4f3c12a 100644 (file)
@@ -343,9 +343,9 @@ static int __wil_up(struct wil6210_priv *wil)
                        wil_err(wil, "SSID not set\n");
                        return -EINVAL;
                }
-               wmi_set_ssid(wil, wdev->ssid_len, wdev->ssid);
-               if (channel)
-                       wmi_set_channel(wil, channel->hw_value);
+               rc = wmi_set_ssid(wil, wdev->ssid_len, wdev->ssid);
+               if (rc)
+                       return rc;
                break;
        default:
                break;
@@ -355,9 +355,12 @@ static int __wil_up(struct wil6210_priv *wil)
        wmi_set_mac_address(wil, ndev->dev_addr);
 
        /* Set up beaconing if required. */
-       rc = wmi_set_bcon(wil, bi, wmi_nettype);
-       if (rc)
-               return rc;
+       if (bi > 0) {
+               rc = wmi_pcp_start(wil, bi, wmi_nettype,
+                                  (channel ? channel->hw_value : 0));
+               if (rc)
+                       return rc;
+       }
 
        /* Rx VRING. After MAC and beacon */
        wil_rx_init(wil);