Merge "wil6210: bus_request platform operation refinement"
This commit is contained in:
commit
b8f01f9bbb
4 changed files with 20 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2016 Qualcomm Atheros, Inc.
|
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -754,6 +754,7 @@ static int wil_cfg80211_connect(struct wiphy *wiphy,
|
||||||
rc = wmi_send(wil, WMI_CONNECT_CMDID, &conn, sizeof(conn));
|
rc = wmi_send(wil, WMI_CONNECT_CMDID, &conn, sizeof(conn));
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
netif_carrier_on(ndev);
|
netif_carrier_on(ndev);
|
||||||
|
wil6210_bus_request(wil, WIL_MAX_BUS_REQUEST_KBPS);
|
||||||
/* Connect can take lots of time */
|
/* Connect can take lots of time */
|
||||||
mod_timer(&wil->connect_timer,
|
mod_timer(&wil->connect_timer,
|
||||||
jiffies + msecs_to_jiffies(2000));
|
jiffies + msecs_to_jiffies(2000));
|
||||||
|
@ -1273,6 +1274,7 @@ static int _wil_cfg80211_start_ap(struct wiphy *wiphy,
|
||||||
wil->pbss = pbss;
|
wil->pbss = pbss;
|
||||||
|
|
||||||
netif_carrier_on(ndev);
|
netif_carrier_on(ndev);
|
||||||
|
wil6210_bus_request(wil, WIL_MAX_BUS_REQUEST_KBPS);
|
||||||
|
|
||||||
rc = wmi_pcp_start(wil, bi, wmi_nettype, chan, hidden_ssid, is_go);
|
rc = wmi_pcp_start(wil, bi, wmi_nettype, chan, hidden_ssid, is_go);
|
||||||
if (rc)
|
if (rc)
|
||||||
|
@ -1288,6 +1290,7 @@ err_bcast:
|
||||||
wmi_pcp_stop(wil);
|
wmi_pcp_stop(wil);
|
||||||
err_pcp_start:
|
err_pcp_start:
|
||||||
netif_carrier_off(ndev);
|
netif_carrier_off(ndev);
|
||||||
|
wil6210_bus_request(wil, WIL_DEFAULT_BUS_REQUEST_KBPS);
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&wil->mutex);
|
mutex_unlock(&wil->mutex);
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -1394,6 +1397,7 @@ static int wil_cfg80211_stop_ap(struct wiphy *wiphy,
|
||||||
wil_dbg_misc(wil, "%s()\n", __func__);
|
wil_dbg_misc(wil, "%s()\n", __func__);
|
||||||
|
|
||||||
netif_carrier_off(ndev);
|
netif_carrier_off(ndev);
|
||||||
|
wil6210_bus_request(wil, WIL_DEFAULT_BUS_REQUEST_KBPS);
|
||||||
wil_set_recovery_state(wil, fw_recovery_idle);
|
wil_set_recovery_state(wil, fw_recovery_idle);
|
||||||
|
|
||||||
mutex_lock(&wil->mutex);
|
mutex_lock(&wil->mutex);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2016 Qualcomm Atheros, Inc.
|
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -270,6 +270,7 @@ static void _wil6210_disconnect(struct wil6210_priv *wil, const u8 *bssid,
|
||||||
wil_bcast_fini(wil);
|
wil_bcast_fini(wil);
|
||||||
wil_update_net_queues_bh(wil, NULL, true);
|
wil_update_net_queues_bh(wil, NULL, true);
|
||||||
netif_carrier_off(ndev);
|
netif_carrier_off(ndev);
|
||||||
|
wil6210_bus_request(wil, WIL_DEFAULT_BUS_REQUEST_KBPS);
|
||||||
|
|
||||||
if (test_bit(wil_status_fwconnected, wil->status)) {
|
if (test_bit(wil_status_fwconnected, wil->status)) {
|
||||||
clear_bit(wil_status_fwconnected, wil->status);
|
clear_bit(wil_status_fwconnected, wil->status);
|
||||||
|
@ -553,6 +554,12 @@ out_wmi_wq:
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wil6210_bus_request(struct wil6210_priv *wil, u32 kbps)
|
||||||
|
{
|
||||||
|
if (wil->platform_ops.bus_request)
|
||||||
|
wil->platform_ops.bus_request(wil->platform_handle, kbps);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wil6210_disconnect - disconnect one connection
|
* wil6210_disconnect - disconnect one connection
|
||||||
* @wil: driver context
|
* @wil: driver context
|
||||||
|
@ -1068,9 +1075,7 @@ int __wil_up(struct wil6210_priv *wil)
|
||||||
napi_enable(&wil->napi_tx);
|
napi_enable(&wil->napi_tx);
|
||||||
set_bit(wil_status_napi_en, wil->status);
|
set_bit(wil_status_napi_en, wil->status);
|
||||||
|
|
||||||
if (wil->platform_ops.bus_request)
|
wil6210_bus_request(wil, WIL_DEFAULT_BUS_REQUEST_KBPS);
|
||||||
wil->platform_ops.bus_request(wil->platform_handle,
|
|
||||||
WIL_MAX_BUS_REQUEST_KBPS);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1094,8 +1099,7 @@ int __wil_down(struct wil6210_priv *wil)
|
||||||
|
|
||||||
set_bit(wil_status_resetting, wil->status);
|
set_bit(wil_status_resetting, wil->status);
|
||||||
|
|
||||||
if (wil->platform_ops.bus_request)
|
wil6210_bus_request(wil, 0);
|
||||||
wil->platform_ops.bus_request(wil->platform_handle, 0);
|
|
||||||
|
|
||||||
wil_disable_irq(wil);
|
wil_disable_irq(wil);
|
||||||
if (test_and_clear_bit(wil_status_napi_en, wil->status)) {
|
if (test_and_clear_bit(wil_status_napi_en, wil->status)) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2016 Qualcomm Atheros, Inc.
|
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -39,6 +39,7 @@ extern bool debug_fw;
|
||||||
#define WIL_FW_NAME "wil6210.fw" /* code */
|
#define WIL_FW_NAME "wil6210.fw" /* code */
|
||||||
#define WIL_FW2_NAME "wil6210.brd" /* board & radio parameters */
|
#define WIL_FW2_NAME "wil6210.brd" /* board & radio parameters */
|
||||||
|
|
||||||
|
#define WIL_DEFAULT_BUS_REQUEST_KBPS 128000 /* ~1Gbps */
|
||||||
#define WIL_MAX_BUS_REQUEST_KBPS 800000 /* ~6.1Gbps */
|
#define WIL_MAX_BUS_REQUEST_KBPS 800000 /* ~6.1Gbps */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -892,7 +893,7 @@ int wmi_aoa_meas(struct wil6210_priv *wil, const void *mac_addr, u8 chan,
|
||||||
u8 type);
|
u8 type);
|
||||||
int wmi_abort_scan(struct wil6210_priv *wil);
|
int wmi_abort_scan(struct wil6210_priv *wil);
|
||||||
void wil_abort_scan(struct wil6210_priv *wil, bool sync);
|
void wil_abort_scan(struct wil6210_priv *wil, bool sync);
|
||||||
|
void wil6210_bus_request(struct wil6210_priv *wil, u32 kbps);
|
||||||
void wil6210_disconnect(struct wil6210_priv *wil, const u8 *bssid,
|
void wil6210_disconnect(struct wil6210_priv *wil, const u8 *bssid,
|
||||||
u16 reason_code, bool from_event);
|
u16 reason_code, bool from_event);
|
||||||
void wil_probe_client_flush(struct wil6210_priv *wil);
|
void wil_probe_client_flush(struct wil6210_priv *wil);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2016 Qualcomm Atheros, Inc.
|
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -566,6 +566,7 @@ static void wmi_evt_connect(struct wil6210_priv *wil, int id, void *d, int len)
|
||||||
(wdev->iftype == NL80211_IFTYPE_P2P_CLIENT)) {
|
(wdev->iftype == NL80211_IFTYPE_P2P_CLIENT)) {
|
||||||
if (rc) {
|
if (rc) {
|
||||||
netif_carrier_off(ndev);
|
netif_carrier_off(ndev);
|
||||||
|
wil6210_bus_request(wil, WIL_DEFAULT_BUS_REQUEST_KBPS);
|
||||||
wil_err(wil,
|
wil_err(wil,
|
||||||
"%s: cfg80211_connect_result with failure\n",
|
"%s: cfg80211_connect_result with failure\n",
|
||||||
__func__);
|
__func__);
|
||||||
|
|
Loading…
Add table
Reference in a new issue