u32 param_workaround_interval;
/* hardware state */
- int radio_on;
+ bool radio_on;
int infra_mode;
bool connected;
u8 bssid[ETH_ALEN];
}
if (ret == 0) {
memcpy(&priv->essid, ssid, sizeof(priv->essid));
- priv->radio_on = 1;
- devdbg(usbdev, "set_essid: radio_on = 1");
+ priv->radio_on = true;
+ devdbg(usbdev, "set_essid: radio_on = true");
}
return ret;
}
-static int disassociate(struct usbnet *usbdev, int reset_ssid)
+static int disassociate(struct usbnet *usbdev, bool reset_ssid)
{
struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
struct ndis_80211_ssid ssid;
if (priv->radio_on) {
ret = rndis_set_oid(usbdev, OID_802_11_DISASSOCIATE, NULL, 0);
if (ret == 0) {
- priv->radio_on = 0;
- devdbg(usbdev, "disassociate: radio_on = 0");
+ priv->radio_on = false;
+ devdbg(usbdev, "disassociate: radio_on = false");
if (reset_ssid)
msleep(100);
{
int ret;
- ret = disassociate(usbdev, 1);
+ ret = disassociate(usbdev, true);
set_default_iw_params(usbdev);
return ret;
}
*/
if (type == TX_POWER_AUTOMATIC || dbm == get_bcm4320_power_dbm(priv)) {
if (!priv->radio_on)
- disassociate(usbdev, 1); /* turn on radio */
+ disassociate(usbdev, true); /* turn on radio */
return 0;
}
return ret;
err_turn_radio_on:
- disassociate(usbdev, 1);
+ disassociate(usbdev, true);
return ret;
}
return ret;
err_turn_radio_on:
- disassociate(usbdev, 1);
+ disassociate(usbdev, true);
return ret;
}
WIPHY_PARAM_FRAG_THRESHOLD | WIPHY_PARAM_RTS_THRESHOLD);
/* turn radio on */
- priv->radio_on = 1;
- disassociate(usbdev, 1);
+ priv->radio_on = true;
+ disassociate(usbdev, true);
netif_carrier_off(usbdev->net);
return 0;
struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
/* turn radio off */
- disassociate(usbdev, 0);
+ disassociate(usbdev, false);
cancel_delayed_work_sync(&priv->dev_poller_work);
cancel_delayed_work_sync(&priv->scan_work);
devdbg(usbdev, "rndis_wlan_stop");
- retval = disassociate(usbdev, 0);
+ retval = disassociate(usbdev, false);
priv->work_pending = 0;
cancel_delayed_work_sync(&priv->dev_poller_work);