* [PATCH v4 0/7] wcn36xx: Tidy up BSS/STA config
@ 2020-09-09 15:36 Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 1/7] wcn36xx: Functionally decompose wcn36xx_smd_config_sta() Bryan O'Donoghue
` (6 more replies)
0 siblings, 7 replies; 15+ messages in thread
From: Bryan O'Donoghue @ 2020-09-09 15:36 UTC (permalink / raw)
To: kvalo, wcn36xx, linux-wireless; +Cc: bryan.odonoghue, shawn.guo, loic.poulain
This series is three in a set of seven to add support for wcn3680 at 802.11ac
data-rates.
Both the BSS and STA config paths have redundant/duplicate code. Before
adding more code to either it makes sense to reduce/reuse and functionally
decompose as much as possible.
While not strictly necessary to get the wcn3680/80211.ac functioning in
this driver, it seems like a missed opportunity to leave the code as is.
Lets reduce down before adding more.
V4:
- No functional change.
Sending out full set again using --base=ath-202009090652 to aid kernel
test robot
- https://lore.kernel.org/linux-wireless/20200908182455.2870345-1-bryan.odonoghue@linaro.org/T/#t
V3:
- No functional difference to V2
https://lore.kernel.org/linux-wireless/CAMZdPi___9yry0icuZVdnyiO7ZT0w=Xt8f8Pn7wkxRejxhXyYw@mail.gmail.com/T/#t
- Adds Loic's Reviewed-by as indicated
https://lore.kernel.org/linux-wireless/CAMZdPi___9yry0icuZVdnyiO7ZT0w=Xt8f8Pn7wkxRejxhXyYw@mail.gmail.com/T/#m2256137b97859c8eac26a2836f96db5e82475d3f
V2:
- Adds a memset to wcn36xx_smd_config_bss_v1()
Since we are doing one less kzalloc() we need to make sure we clear
out the bss config.
V1:
https://lore.kernel.org/linux-wireless/87eensldhi.fsf@codeaurora.org/T/#t
Bryan O'Donoghue (7):
wcn36xx: Functionally decompose wcn36xx_smd_config_sta()
wcn36xx: Move wcn36xx_smd_set_sta_params() inside
wcn36xx_smd_config_bss()
wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params()
wcn36xx: Update wcn36xx_smd_config_bss_v1() to operate internally
wcn36xx: Add wcn36xx_smd_config_bss_v0
wcn36xx: Convert to using wcn36xx_smd_config_bss_v0()
wcn36xx: Remove dead code in wcn36xx_smd_config_bss()
drivers/net/wireless/ath/wcn36xx/smd.c | 416 ++++++++++++++-----------
1 file changed, 228 insertions(+), 188 deletions(-)
base-commit: 160b351d75cb50a0dd2abf9b63e1891935aa9e4a
prerequisite-patch-id: 9a4ac7faca179f6594c9b3a115ee69a2da540a69
prerequisite-patch-id: 183286f9c22d1aaa12f356651224e6b337ef1938
prerequisite-patch-id: af468d413daaf8d2aad195fcb43c6e66390d8468
prerequisite-patch-id: 1a7fb93ee5874d2d011409eaed0b4fd764666b9c
prerequisite-patch-id: 77cc008b21a650fa7a33c4acad2fb632b09634fd
prerequisite-patch-id: 988ae4802971d6895b03b2752122b2be42baf188
prerequisite-patch-id: a3ba2a1963e03e23e86c937cd4cfb649e1b819b2
prerequisite-patch-id: 8a1fe4f63bc80e9a8035aa52356da8c46eab8665
prerequisite-patch-id: d75c1a60d1ede373c1f3eb684bb15c853c88eedc
--
2.27.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v4 1/7] wcn36xx: Functionally decompose wcn36xx_smd_config_sta()
2020-09-09 15:36 [PATCH v4 0/7] wcn36xx: Tidy up BSS/STA config Bryan O'Donoghue
@ 2020-09-09 15:36 ` Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 2/7] wcn36xx: Move wcn36xx_smd_set_sta_params() inside wcn36xx_smd_config_bss() Bryan O'Donoghue
` (5 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Bryan O'Donoghue @ 2020-09-09 15:36 UTC (permalink / raw)
To: kvalo, wcn36xx, linux-wireless; +Cc: bryan.odonoghue, shawn.guo, loic.poulain
This commit functionally decomposes wcn36xx_smd_config_sta into a clearly
defined wcn36xx_smd_config_sta_v0 and wcn36xx_smd_config_sta_v1 path.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 53 ++++++++++++++++----------
1 file changed, 32 insertions(+), 21 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index f434c355d32d..e26752396bdf 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1308,54 +1308,65 @@ static int wcn36xx_smd_config_sta_rsp(struct wcn36xx *wcn,
}
static int wcn36xx_smd_config_sta_v1(struct wcn36xx *wcn,
- const struct wcn36xx_hal_config_sta_req_msg *orig)
+ struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta)
{
struct wcn36xx_hal_config_sta_req_msg_v1 msg_body;
- struct wcn36xx_hal_config_sta_params_v1 *sta = &msg_body.sta_params;
+ struct wcn36xx_hal_config_sta_params_v1 *sta_params;
INIT_HAL_MSG(msg_body, WCN36XX_HAL_CONFIG_STA_REQ);
msg_body.header.len -= WCN36XX_DIFF_STA_PARAMS_V1_NOVHT;
- wcn36xx_smd_convert_sta_to_v1(wcn, &orig->sta_params,
- &msg_body.sta_params);
+ sta_params = &msg_body.sta_params;
+
+ wcn36xx_smd_set_sta_params_v1(wcn, vif, sta, sta_params);
PREPARE_HAL_BUF(wcn->hal_buf, msg_body);
wcn36xx_dbg(WCN36XX_DBG_HAL,
"hal config sta v1 action %d sta_index %d bssid_index %d bssid %pM type %d mac %pM aid %d\n",
- sta->action, sta->sta_index, sta->bssid_index,
- sta->bssid, sta->type, sta->mac, sta->aid);
+ sta_params->action, sta_params->sta_index, sta_params->bssid_index,
+ sta_params->bssid, sta_params->type, sta_params->mac, sta_params->aid);
return wcn36xx_smd_send_and_wait(wcn, msg_body.header.len);
}
-int wcn36xx_smd_config_sta(struct wcn36xx *wcn, struct ieee80211_vif *vif,
- struct ieee80211_sta *sta)
+static int wcn36xx_smd_config_sta_v0(struct wcn36xx *wcn,
+ struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta)
{
struct wcn36xx_hal_config_sta_req_msg msg;
struct wcn36xx_hal_config_sta_params *sta_params;
- int ret;
- mutex_lock(&wcn->hal_mutex);
INIT_HAL_MSG(msg, WCN36XX_HAL_CONFIG_STA_REQ);
sta_params = &msg.sta_params;
wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
- if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) {
- ret = wcn36xx_smd_config_sta_v1(wcn, &msg);
- } else {
- PREPARE_HAL_BUF(wcn->hal_buf, msg);
+ PREPARE_HAL_BUF(wcn->hal_buf, msg);
- wcn36xx_dbg(WCN36XX_DBG_HAL,
- "hal config sta action %d sta_index %d bssid_index %d bssid %pM type %d mac %pM aid %d\n",
- sta_params->action, sta_params->sta_index,
- sta_params->bssid_index, sta_params->bssid,
- sta_params->type, sta_params->mac, sta_params->aid);
+ wcn36xx_dbg(WCN36XX_DBG_HAL,
+ "hal config sta action %d sta_index %d bssid_index %d bssid %pM type %d mac %pM aid %d\n",
+ sta_params->action, sta_params->sta_index,
+ sta_params->bssid_index, sta_params->bssid,
+ sta_params->type, sta_params->mac, sta_params->aid);
+
+ return wcn36xx_smd_send_and_wait(wcn, msg.header.len);
+}
+
+int wcn36xx_smd_config_sta(struct wcn36xx *wcn, struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta)
+{
+ int ret;
+
+ mutex_lock(&wcn->hal_mutex);
+
+ if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24))
+ ret = wcn36xx_smd_config_sta_v1(wcn, vif, sta);
+ else
+ ret = wcn36xx_smd_config_sta_v0(wcn, vif, sta);
- ret = wcn36xx_smd_send_and_wait(wcn, msg.header.len);
- }
if (ret) {
wcn36xx_err("Sending hal_config_sta failed\n");
goto out;
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v4 2/7] wcn36xx: Move wcn36xx_smd_set_sta_params() inside wcn36xx_smd_config_bss()
2020-09-09 15:36 [PATCH v4 0/7] wcn36xx: Tidy up BSS/STA config Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 1/7] wcn36xx: Functionally decompose wcn36xx_smd_config_sta() Bryan O'Donoghue
@ 2020-09-09 15:36 ` Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 3/7] wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params() Bryan O'Donoghue
` (4 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Bryan O'Donoghue @ 2020-09-09 15:36 UTC (permalink / raw)
To: kvalo, wcn36xx, linux-wireless; +Cc: bryan.odonoghue, shawn.guo, loic.poulain
In order to facilitate functional decomposition of
wcn36xx_smd_config_bss() we need to move wcn36xx_smd_set_sta_params() later
in function.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index e26752396bdf..28a571918b19 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1606,7 +1606,6 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_NONE;
bss->reserved = 0;
- wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
/* wcn->ssid is only valid in AP and IBSS mode */
bss->ssid.length = vif_priv->ssid.length;
@@ -1632,6 +1631,8 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
vif_priv->bss_type = bss->bss_type;
+ wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
+
wcn36xx_dbg(WCN36XX_DBG_HAL,
"hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n",
bss->bssid, bss->self_mac_addr, bss->bss_type,
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v4 3/7] wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params()
2020-09-09 15:36 [PATCH v4 0/7] wcn36xx: Tidy up BSS/STA config Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 1/7] wcn36xx: Functionally decompose wcn36xx_smd_config_sta() Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 2/7] wcn36xx: Move wcn36xx_smd_set_sta_params() inside wcn36xx_smd_config_bss() Bryan O'Donoghue
@ 2020-09-09 15:36 ` Bryan O'Donoghue
2020-09-09 19:16 ` kernel test robot
2020-09-10 7:11 ` kernel test robot
2020-09-09 15:36 ` [PATCH v4 4/7] wcn36xx: Update wcn36xx_smd_config_bss_v1() to operate internally Bryan O'Donoghue
` (3 subsequent siblings)
6 siblings, 2 replies; 15+ messages in thread
From: Bryan O'Donoghue @ 2020-09-09 15:36 UTC (permalink / raw)
To: kvalo, wcn36xx, linux-wireless; +Cc: bryan.odonoghue, shawn.guo, loic.poulain
This commit moves BSS parameter setup to a separate function
wcn36xx_smd_set_bss_params(). This will allow for further functional
decomposition and fewer kzalloc() operations in subsequent patches.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 172 +++++++++++++------------
1 file changed, 92 insertions(+), 80 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 28a571918b19..3e8b929f45fc 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1384,6 +1384,97 @@ int wcn36xx_smd_config_sta(struct wcn36xx *wcn, struct ieee80211_vif *vif,
return ret;
}
+void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
+ struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta,
+ const u8 *bssid,
+ bool update,
+ struct wcn36xx_hal_config_bss_params *bss)
+{
+ struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
+ struct wcn36xx_hal_config_sta_params *sta_params;
+
+ sta_params = &bss->sta;
+
+ WARN_ON(is_zero_ether_addr(bssid));
+
+ memcpy(&bss->bssid, bssid, ETH_ALEN);
+
+ memcpy(bss->self_mac_addr, vif->addr, ETH_ALEN);
+
+ if (vif->type == NL80211_IFTYPE_STATION) {
+ bss->bss_type = WCN36XX_HAL_INFRASTRUCTURE_MODE;
+
+ /* STA */
+ bss->oper_mode = 1;
+ bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_MODE;
+ } else if (vif->type == NL80211_IFTYPE_AP ||
+ vif->type == NL80211_IFTYPE_MESH_POINT) {
+ bss->bss_type = WCN36XX_HAL_INFRA_AP_MODE;
+
+ /* AP */
+ bss->oper_mode = 0;
+ bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_SAP_MODE;
+ } else if (vif->type == NL80211_IFTYPE_ADHOC) {
+ bss->bss_type = WCN36XX_HAL_IBSS_MODE;
+
+ /* STA */
+ bss->oper_mode = 1;
+ } else {
+ wcn36xx_warn("Unknown type for bss config: %d\n", vif->type);
+ }
+
+ if (vif->type == NL80211_IFTYPE_STATION)
+ wcn36xx_smd_set_bss_nw_type(wcn, sta, bss);
+ else
+ bss->nw_type = WCN36XX_HAL_11N_NW_TYPE;
+
+ bss->short_slot_time_supported = vif->bss_conf.use_short_slot;
+ bss->lla_coexist = 0;
+ bss->llb_coexist = 0;
+ bss->llg_coexist = 0;
+ bss->rifs_mode = 0;
+ bss->beacon_interval = vif->bss_conf.beacon_int;
+ bss->dtim_period = vif_priv->dtim_period;
+
+ wcn36xx_smd_set_bss_ht_params(vif, sta, bss);
+
+ bss->oper_channel = WCN36XX_HW_CHANNEL(wcn);
+
+ if (conf_is_ht40_minus(&wcn->hw->conf))
+ bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_BELOW;
+ else if (conf_is_ht40_plus(&wcn->hw->conf))
+ bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
+ else
+ bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_NONE;
+
+ bss->reserved = 0;
+
+ /* wcn->ssid is only valid in AP and IBSS mode */
+ bss->ssid.length = vif_priv->ssid.length;
+ memcpy(bss->ssid.ssid, vif_priv->ssid.ssid, vif_priv->ssid.length);
+
+ bss->obss_prot_enabled = 0;
+ bss->rmf = 0;
+ bss->max_probe_resp_retry_limit = 0;
+ bss->hidden_ssid = vif->bss_conf.hidden_ssid;
+ bss->proxy_probe_resp = 0;
+ bss->edca_params_valid = 0;
+
+ /* FIXME: set acbe, acbk, acvi and acvo */
+
+ bss->ext_set_sta_key_param_valid = 0;
+
+ /* FIXME: set ext_set_sta_key_param */
+
+ bss->spectrum_mgt_enable = 0;
+ bss->tx_mgmt_power = 0;
+ bss->max_tx_power = WCN36XX_MAX_POWER(wcn);
+ bss->action = update;
+
+ vif_priv->bss_type = bss->bss_type;
+}
+
static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn,
const struct wcn36xx_hal_config_bss_req_msg *orig)
{
@@ -1487,7 +1578,6 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn,
return ret;
}
-
static int wcn36xx_smd_config_bss_rsp(struct wcn36xx *wcn,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
@@ -1539,7 +1629,6 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
struct wcn36xx_hal_config_bss_req_msg *msg;
struct wcn36xx_hal_config_bss_params *bss;
struct wcn36xx_hal_config_sta_params *sta_params;
- struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
int ret;
mutex_lock(&wcn->hal_mutex);
@@ -1553,84 +1642,7 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
bss = &msg->bss_params;
sta_params = &bss->sta;
- WARN_ON(is_zero_ether_addr(bssid));
-
- memcpy(&bss->bssid, bssid, ETH_ALEN);
-
- memcpy(bss->self_mac_addr, vif->addr, ETH_ALEN);
-
- if (vif->type == NL80211_IFTYPE_STATION) {
- bss->bss_type = WCN36XX_HAL_INFRASTRUCTURE_MODE;
-
- /* STA */
- bss->oper_mode = 1;
- bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_MODE;
- } else if (vif->type == NL80211_IFTYPE_AP ||
- vif->type == NL80211_IFTYPE_MESH_POINT) {
- bss->bss_type = WCN36XX_HAL_INFRA_AP_MODE;
-
- /* AP */
- bss->oper_mode = 0;
- bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_SAP_MODE;
- } else if (vif->type == NL80211_IFTYPE_ADHOC) {
- bss->bss_type = WCN36XX_HAL_IBSS_MODE;
-
- /* STA */
- bss->oper_mode = 1;
- } else {
- wcn36xx_warn("Unknown type for bss config: %d\n", vif->type);
- }
-
- if (vif->type == NL80211_IFTYPE_STATION)
- wcn36xx_smd_set_bss_nw_type(wcn, sta, bss);
- else
- bss->nw_type = WCN36XX_HAL_11N_NW_TYPE;
-
- bss->short_slot_time_supported = vif->bss_conf.use_short_slot;
- bss->lla_coexist = 0;
- bss->llb_coexist = 0;
- bss->llg_coexist = 0;
- bss->rifs_mode = 0;
- bss->beacon_interval = vif->bss_conf.beacon_int;
- bss->dtim_period = vif_priv->dtim_period;
-
- wcn36xx_smd_set_bss_ht_params(vif, sta, bss);
-
- bss->oper_channel = WCN36XX_HW_CHANNEL(wcn);
-
- if (conf_is_ht40_minus(&wcn->hw->conf))
- bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_BELOW;
- else if (conf_is_ht40_plus(&wcn->hw->conf))
- bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
- else
- bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_NONE;
-
- bss->reserved = 0;
-
- /* wcn->ssid is only valid in AP and IBSS mode */
- bss->ssid.length = vif_priv->ssid.length;
- memcpy(bss->ssid.ssid, vif_priv->ssid.ssid, vif_priv->ssid.length);
-
- bss->obss_prot_enabled = 0;
- bss->rmf = 0;
- bss->max_probe_resp_retry_limit = 0;
- bss->hidden_ssid = vif->bss_conf.hidden_ssid;
- bss->proxy_probe_resp = 0;
- bss->edca_params_valid = 0;
-
- /* FIXME: set acbe, acbk, acvi and acvo */
-
- bss->ext_set_sta_key_param_valid = 0;
-
- /* FIXME: set ext_set_sta_key_param */
-
- bss->spectrum_mgt_enable = 0;
- bss->tx_mgmt_power = 0;
- bss->max_tx_power = WCN36XX_MAX_POWER(wcn);
- bss->action = update;
-
- vif_priv->bss_type = bss->bss_type;
-
+ wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss);
wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
wcn36xx_dbg(WCN36XX_DBG_HAL,
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v4 4/7] wcn36xx: Update wcn36xx_smd_config_bss_v1() to operate internally
2020-09-09 15:36 [PATCH v4 0/7] wcn36xx: Tidy up BSS/STA config Bryan O'Donoghue
` (2 preceding siblings ...)
2020-09-09 15:36 ` [PATCH v4 3/7] wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params() Bryan O'Donoghue
@ 2020-09-09 15:36 ` Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0 Bryan O'Donoghue
` (2 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Bryan O'Donoghue @ 2020-09-09 15:36 UTC (permalink / raw)
To: kvalo, wcn36xx, linux-wireless; +Cc: bryan.odonoghue, shawn.guo, loic.poulain
This patch updates wcn36xx_smd_config_bss_v1() to update on internally
derived parameters only, specifically making use of STA v1 wrapper routines
previously added.
Once done we no longer need to pass a struct wcn36xx_hal_config_bss_req_msg
which gives us options in later patches to eliminate the kzalloc() in
wcn36xx_smd_config_bss entirely.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 116 +++++++++++++------------
1 file changed, 61 insertions(+), 55 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 3e8b929f45fc..7e3302ba97fa 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1476,10 +1476,14 @@ void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
}
static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn,
- const struct wcn36xx_hal_config_bss_req_msg *orig)
+ struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta_80211,
+ const u8 *bssid,
+ bool update)
{
struct wcn36xx_hal_config_bss_req_msg_v1 *msg_body;
struct wcn36xx_hal_config_bss_params_v1 *bss;
+ struct wcn36xx_hal_config_bss_params bss_v0;
struct wcn36xx_hal_config_sta_params_v1 *sta;
int ret;
@@ -1493,72 +1497,74 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn,
bss = &msg_body->bss_params;
sta = &bss->sta;
+ memset(&bss_v0, 0x00, sizeof(bss_v0));
+ wcn36xx_smd_set_bss_params(wcn, vif, sta_80211, bssid, update, &bss_v0);
+ wcn36xx_smd_set_sta_params_v1(wcn, vif, sta_80211, sta);
+
/* convert orig to v1 */
- memcpy(bss->bssid, &orig->bss_params.bssid, ETH_ALEN);
- memcpy(bss->self_mac_addr, &orig->bss_params.self_mac_addr, ETH_ALEN);
+ memcpy(bss->bssid, &bss_v0.bssid, ETH_ALEN);
+ memcpy(bss->self_mac_addr, &bss_v0.self_mac_addr, ETH_ALEN);
- bss->bss_type = orig->bss_params.bss_type;
- bss->oper_mode = orig->bss_params.oper_mode;
- bss->nw_type = orig->bss_params.nw_type;
+ bss->bss_type = bss_v0.bss_type;
+ bss->oper_mode = bss_v0.oper_mode;
+ bss->nw_type = bss_v0.nw_type;
bss->short_slot_time_supported =
- orig->bss_params.short_slot_time_supported;
- bss->lla_coexist = orig->bss_params.lla_coexist;
- bss->llb_coexist = orig->bss_params.llb_coexist;
- bss->llg_coexist = orig->bss_params.llg_coexist;
- bss->ht20_coexist = orig->bss_params.ht20_coexist;
- bss->lln_non_gf_coexist = orig->bss_params.lln_non_gf_coexist;
+ bss_v0.short_slot_time_supported;
+ bss->lla_coexist = bss_v0.lla_coexist;
+ bss->llb_coexist = bss_v0.llb_coexist;
+ bss->llg_coexist = bss_v0.llg_coexist;
+ bss->ht20_coexist = bss_v0.ht20_coexist;
+ bss->lln_non_gf_coexist = bss_v0.lln_non_gf_coexist;
bss->lsig_tx_op_protection_full_support =
- orig->bss_params.lsig_tx_op_protection_full_support;
- bss->rifs_mode = orig->bss_params.rifs_mode;
- bss->beacon_interval = orig->bss_params.beacon_interval;
- bss->dtim_period = orig->bss_params.dtim_period;
- bss->tx_channel_width_set = orig->bss_params.tx_channel_width_set;
- bss->oper_channel = orig->bss_params.oper_channel;
- bss->ext_channel = orig->bss_params.ext_channel;
-
- bss->reserved = orig->bss_params.reserved;
-
- memcpy(&bss->ssid, &orig->bss_params.ssid,
- sizeof(orig->bss_params.ssid));
-
- bss->action = orig->bss_params.action;
- bss->rateset = orig->bss_params.rateset;
- bss->ht = orig->bss_params.ht;
- bss->obss_prot_enabled = orig->bss_params.obss_prot_enabled;
- bss->rmf = orig->bss_params.rmf;
- bss->ht_oper_mode = orig->bss_params.ht_oper_mode;
- bss->dual_cts_protection = orig->bss_params.dual_cts_protection;
+ bss_v0.lsig_tx_op_protection_full_support;
+ bss->rifs_mode = bss_v0.rifs_mode;
+ bss->beacon_interval = bss_v0.beacon_interval;
+ bss->dtim_period = bss_v0.dtim_period;
+ bss->tx_channel_width_set = bss_v0.tx_channel_width_set;
+ bss->oper_channel = bss_v0.oper_channel;
+ bss->ext_channel = bss_v0.ext_channel;
+
+ bss->reserved = bss_v0.reserved;
+
+ memcpy(&bss->ssid, &bss_v0.ssid,
+ sizeof(bss_v0.ssid));
+
+ bss->action = bss_v0.action;
+ bss->rateset = bss_v0.rateset;
+ bss->ht = bss_v0.ht;
+ bss->obss_prot_enabled = bss_v0.obss_prot_enabled;
+ bss->rmf = bss_v0.rmf;
+ bss->ht_oper_mode = bss_v0.ht_oper_mode;
+ bss->dual_cts_protection = bss_v0.dual_cts_protection;
bss->max_probe_resp_retry_limit =
- orig->bss_params.max_probe_resp_retry_limit;
- bss->hidden_ssid = orig->bss_params.hidden_ssid;
- bss->proxy_probe_resp = orig->bss_params.proxy_probe_resp;
- bss->edca_params_valid = orig->bss_params.edca_params_valid;
-
- memcpy(&bss->acbe, &orig->bss_params.acbe,
- sizeof(orig->bss_params.acbe));
- memcpy(&bss->acbk, &orig->bss_params.acbk,
- sizeof(orig->bss_params.acbk));
- memcpy(&bss->acvi, &orig->bss_params.acvi,
- sizeof(orig->bss_params.acvi));
- memcpy(&bss->acvo, &orig->bss_params.acvo,
- sizeof(orig->bss_params.acvo));
+ bss_v0.max_probe_resp_retry_limit;
+ bss->hidden_ssid = bss_v0.hidden_ssid;
+ bss->proxy_probe_resp = bss_v0.proxy_probe_resp;
+ bss->edca_params_valid = bss_v0.edca_params_valid;
+
+ memcpy(&bss->acbe, &bss_v0.acbe,
+ sizeof(bss_v0.acbe));
+ memcpy(&bss->acbk, &bss_v0.acbk,
+ sizeof(bss_v0.acbk));
+ memcpy(&bss->acvi, &bss_v0.acvi,
+ sizeof(bss_v0.acvi));
+ memcpy(&bss->acvo, &bss_v0.acvo,
+ sizeof(bss_v0.acvo));
bss->ext_set_sta_key_param_valid =
- orig->bss_params.ext_set_sta_key_param_valid;
+ bss_v0.ext_set_sta_key_param_valid;
memcpy(&bss->ext_set_sta_key_param,
- &orig->bss_params.ext_set_sta_key_param,
- sizeof(orig->bss_params.acvo));
-
- bss->wcn36xx_hal_persona = orig->bss_params.wcn36xx_hal_persona;
- bss->spectrum_mgt_enable = orig->bss_params.spectrum_mgt_enable;
- bss->tx_mgmt_power = orig->bss_params.tx_mgmt_power;
- bss->max_tx_power = orig->bss_params.max_tx_power;
+ &bss_v0.ext_set_sta_key_param,
+ sizeof(bss_v0.acvo));
- wcn36xx_smd_convert_sta_to_v1(wcn, &orig->bss_params.sta, sta);
+ bss->wcn36xx_hal_persona = bss_v0.wcn36xx_hal_persona;
+ bss->spectrum_mgt_enable = bss_v0.spectrum_mgt_enable;
+ bss->tx_mgmt_power = bss_v0.tx_mgmt_power;
+ bss->max_tx_power = bss_v0.max_tx_power;
PREPARE_HAL_BUF(wcn->hal_buf, (*msg_body));
@@ -1658,7 +1664,7 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
sta_params->mac);
if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) {
- ret = wcn36xx_smd_config_bss_v1(wcn, msg);
+ ret = wcn36xx_smd_config_bss_v1(wcn, vif, sta, bssid, update);
} else {
PREPARE_HAL_BUF(wcn->hal_buf, (*msg));
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v4 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0
2020-09-09 15:36 [PATCH v4 0/7] wcn36xx: Tidy up BSS/STA config Bryan O'Donoghue
` (3 preceding siblings ...)
2020-09-09 15:36 ` [PATCH v4 4/7] wcn36xx: Update wcn36xx_smd_config_bss_v1() to operate internally Bryan O'Donoghue
@ 2020-09-09 15:36 ` Bryan O'Donoghue
2020-09-09 20:34 ` kernel test robot
2020-09-10 8:51 ` kernel test robot
2020-09-09 15:36 ` [PATCH v4 6/7] wcn36xx: Convert to using wcn36xx_smd_config_bss_v0() Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 7/7] wcn36xx: Remove dead code in wcn36xx_smd_config_bss() Bryan O'Donoghue
6 siblings, 2 replies; 15+ messages in thread
From: Bryan O'Donoghue @ 2020-09-09 15:36 UTC (permalink / raw)
To: kvalo, wcn36xx, linux-wireless; +Cc: bryan.odonoghue, shawn.guo, loic.poulain
This commit adds wcn36xx_smd_config_bss_v0() as a step along the road of
functionally decomposing wcn36xx_smd_config_bss().
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 41 ++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 7e3302ba97fa..e603e2d3be16 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1584,6 +1584,47 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn,
return ret;
}
+int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta, const u8 *bssid,
+ bool update)
+{
+ struct wcn36xx_hal_config_bss_req_msg *msg;
+ struct wcn36xx_hal_config_bss_params *bss;
+ struct wcn36xx_hal_config_sta_params *sta_params;
+ int ret;
+
+ msg = kzalloc(sizeof(*msg), GFP_KERNEL);
+ if (!msg)
+ return -ENOMEM;
+
+ INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ);
+
+ bss = &msg->bss_params;
+ sta_params = &bss->sta;
+
+ wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss);
+ wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
+
+ PREPARE_HAL_BUF(wcn->hal_buf, (*msg));
+
+ wcn36xx_dbg(WCN36XX_DBG_HAL,
+ "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n",
+ bss->bssid, bss->self_mac_addr, bss->bss_type,
+ bss->oper_mode, bss->nw_type);
+
+ wcn36xx_dbg(WCN36XX_DBG_HAL,
+ "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n",
+ sta_params->bssid, sta_params->action,
+ sta_params->sta_index, sta_params->bssid_index,
+ sta_params->aid, sta_params->type,
+ sta_params->mac);
+
+ ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len);
+ kfree(msg);
+
+ return ret;
+}
+
static int wcn36xx_smd_config_bss_rsp(struct wcn36xx *wcn,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v4 6/7] wcn36xx: Convert to using wcn36xx_smd_config_bss_v0()
2020-09-09 15:36 [PATCH v4 0/7] wcn36xx: Tidy up BSS/STA config Bryan O'Donoghue
` (4 preceding siblings ...)
2020-09-09 15:36 ` [PATCH v4 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0 Bryan O'Donoghue
@ 2020-09-09 15:36 ` Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 7/7] wcn36xx: Remove dead code in wcn36xx_smd_config_bss() Bryan O'Donoghue
6 siblings, 0 replies; 15+ messages in thread
From: Bryan O'Donoghue @ 2020-09-09 15:36 UTC (permalink / raw)
To: kvalo, wcn36xx, linux-wireless; +Cc: bryan.odonoghue, shawn.guo, loic.poulain
A previous patch added wcn36xx_smd_config_bss_v0() this patch converts the
version 0 data-path in wcn36xx_smd_config_bss() to use
wcn36xx_smd_config_bss_v0().
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index e603e2d3be16..fc922dd9ccde 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1707,9 +1707,7 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) {
ret = wcn36xx_smd_config_bss_v1(wcn, vif, sta, bssid, update);
} else {
- PREPARE_HAL_BUF(wcn->hal_buf, (*msg));
-
- ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len);
+ ret = wcn36xx_smd_config_bss_v0(wcn, vif, sta, bssid, update);
}
if (ret) {
wcn36xx_err("Sending hal_config_bss failed\n");
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v4 7/7] wcn36xx: Remove dead code in wcn36xx_smd_config_bss()
2020-09-09 15:36 [PATCH v4 0/7] wcn36xx: Tidy up BSS/STA config Bryan O'Donoghue
` (5 preceding siblings ...)
2020-09-09 15:36 ` [PATCH v4 6/7] wcn36xx: Convert to using wcn36xx_smd_config_bss_v0() Bryan O'Donoghue
@ 2020-09-09 15:36 ` Bryan O'Donoghue
6 siblings, 0 replies; 15+ messages in thread
From: Bryan O'Donoghue @ 2020-09-09 15:36 UTC (permalink / raw)
To: kvalo, wcn36xx, linux-wireless; +Cc: bryan.odonoghue, shawn.guo, loic.poulain
wcn36xx_smd_config_bss_v0() and wcn36xx_smd_config_bss_v1() have been
designed to operate in standalone fashion. As a result we can drop the
dead code now present in wcn36xx_smd_config_bss() and happily remove one
kzalloc from the BSS config path as we do so.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 39 ++++----------------------
1 file changed, 5 insertions(+), 34 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index fc922dd9ccde..ce6536a3185c 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1673,42 +1673,15 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
struct ieee80211_sta *sta, const u8 *bssid,
bool update)
{
- struct wcn36xx_hal_config_bss_req_msg *msg;
- struct wcn36xx_hal_config_bss_params *bss;
- struct wcn36xx_hal_config_sta_params *sta_params;
int ret;
mutex_lock(&wcn->hal_mutex);
- msg = kzalloc(sizeof(*msg), GFP_KERNEL);
- if (!msg) {
- ret = -ENOMEM;
- goto out;
- }
- INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ);
-
- bss = &msg->bss_params;
- sta_params = &bss->sta;
-
- wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss);
- wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
-
- wcn36xx_dbg(WCN36XX_DBG_HAL,
- "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n",
- bss->bssid, bss->self_mac_addr, bss->bss_type,
- bss->oper_mode, bss->nw_type);
- wcn36xx_dbg(WCN36XX_DBG_HAL,
- "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n",
- sta_params->bssid, sta_params->action,
- sta_params->sta_index, sta_params->bssid_index,
- sta_params->aid, sta_params->type,
- sta_params->mac);
-
- if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) {
+ if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24))
ret = wcn36xx_smd_config_bss_v1(wcn, vif, sta, bssid, update);
- } else {
+ else
ret = wcn36xx_smd_config_bss_v0(wcn, vif, sta, bssid, update);
- }
+
if (ret) {
wcn36xx_err("Sending hal_config_bss failed\n");
goto out;
@@ -1718,12 +1691,10 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
sta,
wcn->hal_buf,
wcn->hal_rsp_len);
- if (ret) {
+ if (ret)
wcn36xx_err("hal_config_bss response failed err=%d\n", ret);
- goto out;
- }
+
out:
- kfree(msg);
mutex_unlock(&wcn->hal_mutex);
return ret;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH v4 3/7] wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params()
2020-09-09 15:36 ` [PATCH v4 3/7] wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params() Bryan O'Donoghue
@ 2020-09-09 19:16 ` kernel test robot
2020-09-10 7:11 ` kernel test robot
1 sibling, 0 replies; 15+ messages in thread
From: kernel test robot @ 2020-09-09 19:16 UTC (permalink / raw)
To: Bryan O'Donoghue, kvalo, wcn36xx, linux-wireless
Cc: kbuild-all, bryan.odonoghue, shawn.guo, loic.poulain
[-- Attachment #1: Type: text/plain, Size: 6626 bytes --]
Hi Bryan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 160b351d75cb50a0dd2abf9b63e1891935aa9e4a]
url: https://github.com/0day-ci/linux/commits/Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
base: 160b351d75cb50a0dd2abf9b63e1891935aa9e4a
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/wireless/ath/wcn36xx/smd.c:150:1: warning: no previous prototype for 'wcn36xx_smd_set_bss_vht_params' [-Wmissing-prototypes]
150 | wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:186:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_vht_params' [-Wmissing-prototypes]
186 | void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:208:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_ht_ldpc_params' [-Wmissing-prototypes]
208 | void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:233:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_default_vht_params' [-Wmissing-prototypes]
233 | void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:249:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_default_ht_ldpc_params' [-Wmissing-prototypes]
249 | void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:1253:1: warning: no previous prototype for 'wcn36xx_smd_set_sta_params_v1' [-Wmissing-prototypes]
1253 | wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/wcn36xx/smd.c:1387:6: warning: no previous prototype for 'wcn36xx_smd_set_bss_params' [-Wmissing-prototypes]
1387 | void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c: In function 'wcn36xx_smd_set_bss_params':
>> drivers/net/wireless/ath/wcn36xx/smd.c:1395:40: warning: variable 'sta_params' set but not used [-Wunused-but-set-variable]
1395 | struct wcn36xx_hal_config_sta_params *sta_params;
| ^~~~~~~~~~
# https://github.com/0day-ci/linux/commit/1c12f515815cc2fa84d00b7c6aa77bf5dc5f1d20
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
git checkout 1c12f515815cc2fa84d00b7c6aa77bf5dc5f1d20
vim +/wcn36xx_smd_set_bss_params +1387 drivers/net/wireless/ath/wcn36xx/smd.c
1386
> 1387 void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
1388 struct ieee80211_vif *vif,
1389 struct ieee80211_sta *sta,
1390 const u8 *bssid,
1391 bool update,
1392 struct wcn36xx_hal_config_bss_params *bss)
1393 {
1394 struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
> 1395 struct wcn36xx_hal_config_sta_params *sta_params;
1396
1397 sta_params = &bss->sta;
1398
1399 WARN_ON(is_zero_ether_addr(bssid));
1400
1401 memcpy(&bss->bssid, bssid, ETH_ALEN);
1402
1403 memcpy(bss->self_mac_addr, vif->addr, ETH_ALEN);
1404
1405 if (vif->type == NL80211_IFTYPE_STATION) {
1406 bss->bss_type = WCN36XX_HAL_INFRASTRUCTURE_MODE;
1407
1408 /* STA */
1409 bss->oper_mode = 1;
1410 bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_MODE;
1411 } else if (vif->type == NL80211_IFTYPE_AP ||
1412 vif->type == NL80211_IFTYPE_MESH_POINT) {
1413 bss->bss_type = WCN36XX_HAL_INFRA_AP_MODE;
1414
1415 /* AP */
1416 bss->oper_mode = 0;
1417 bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_SAP_MODE;
1418 } else if (vif->type == NL80211_IFTYPE_ADHOC) {
1419 bss->bss_type = WCN36XX_HAL_IBSS_MODE;
1420
1421 /* STA */
1422 bss->oper_mode = 1;
1423 } else {
1424 wcn36xx_warn("Unknown type for bss config: %d\n", vif->type);
1425 }
1426
1427 if (vif->type == NL80211_IFTYPE_STATION)
1428 wcn36xx_smd_set_bss_nw_type(wcn, sta, bss);
1429 else
1430 bss->nw_type = WCN36XX_HAL_11N_NW_TYPE;
1431
1432 bss->short_slot_time_supported = vif->bss_conf.use_short_slot;
1433 bss->lla_coexist = 0;
1434 bss->llb_coexist = 0;
1435 bss->llg_coexist = 0;
1436 bss->rifs_mode = 0;
1437 bss->beacon_interval = vif->bss_conf.beacon_int;
1438 bss->dtim_period = vif_priv->dtim_period;
1439
1440 wcn36xx_smd_set_bss_ht_params(vif, sta, bss);
1441
1442 bss->oper_channel = WCN36XX_HW_CHANNEL(wcn);
1443
1444 if (conf_is_ht40_minus(&wcn->hw->conf))
1445 bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_BELOW;
1446 else if (conf_is_ht40_plus(&wcn->hw->conf))
1447 bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
1448 else
1449 bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_NONE;
1450
1451 bss->reserved = 0;
1452
1453 /* wcn->ssid is only valid in AP and IBSS mode */
1454 bss->ssid.length = vif_priv->ssid.length;
1455 memcpy(bss->ssid.ssid, vif_priv->ssid.ssid, vif_priv->ssid.length);
1456
1457 bss->obss_prot_enabled = 0;
1458 bss->rmf = 0;
1459 bss->max_probe_resp_retry_limit = 0;
1460 bss->hidden_ssid = vif->bss_conf.hidden_ssid;
1461 bss->proxy_probe_resp = 0;
1462 bss->edca_params_valid = 0;
1463
1464 /* FIXME: set acbe, acbk, acvi and acvo */
1465
1466 bss->ext_set_sta_key_param_valid = 0;
1467
1468 /* FIXME: set ext_set_sta_key_param */
1469
1470 bss->spectrum_mgt_enable = 0;
1471 bss->tx_mgmt_power = 0;
1472 bss->max_tx_power = WCN36XX_MAX_POWER(wcn);
1473 bss->action = update;
1474
1475 vif_priv->bss_type = bss->bss_type;
1476 }
1477
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 61672 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v4 3/7] wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params()
@ 2020-09-09 19:16 ` kernel test robot
0 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2020-09-09 19:16 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6777 bytes --]
Hi Bryan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 160b351d75cb50a0dd2abf9b63e1891935aa9e4a]
url: https://github.com/0day-ci/linux/commits/Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
base: 160b351d75cb50a0dd2abf9b63e1891935aa9e4a
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/wireless/ath/wcn36xx/smd.c:150:1: warning: no previous prototype for 'wcn36xx_smd_set_bss_vht_params' [-Wmissing-prototypes]
150 | wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:186:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_vht_params' [-Wmissing-prototypes]
186 | void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:208:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_ht_ldpc_params' [-Wmissing-prototypes]
208 | void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:233:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_default_vht_params' [-Wmissing-prototypes]
233 | void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:249:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_default_ht_ldpc_params' [-Wmissing-prototypes]
249 | void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:1253:1: warning: no previous prototype for 'wcn36xx_smd_set_sta_params_v1' [-Wmissing-prototypes]
1253 | wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/wcn36xx/smd.c:1387:6: warning: no previous prototype for 'wcn36xx_smd_set_bss_params' [-Wmissing-prototypes]
1387 | void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c: In function 'wcn36xx_smd_set_bss_params':
>> drivers/net/wireless/ath/wcn36xx/smd.c:1395:40: warning: variable 'sta_params' set but not used [-Wunused-but-set-variable]
1395 | struct wcn36xx_hal_config_sta_params *sta_params;
| ^~~~~~~~~~
# https://github.com/0day-ci/linux/commit/1c12f515815cc2fa84d00b7c6aa77bf5dc5f1d20
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
git checkout 1c12f515815cc2fa84d00b7c6aa77bf5dc5f1d20
vim +/wcn36xx_smd_set_bss_params +1387 drivers/net/wireless/ath/wcn36xx/smd.c
1386
> 1387 void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
1388 struct ieee80211_vif *vif,
1389 struct ieee80211_sta *sta,
1390 const u8 *bssid,
1391 bool update,
1392 struct wcn36xx_hal_config_bss_params *bss)
1393 {
1394 struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
> 1395 struct wcn36xx_hal_config_sta_params *sta_params;
1396
1397 sta_params = &bss->sta;
1398
1399 WARN_ON(is_zero_ether_addr(bssid));
1400
1401 memcpy(&bss->bssid, bssid, ETH_ALEN);
1402
1403 memcpy(bss->self_mac_addr, vif->addr, ETH_ALEN);
1404
1405 if (vif->type == NL80211_IFTYPE_STATION) {
1406 bss->bss_type = WCN36XX_HAL_INFRASTRUCTURE_MODE;
1407
1408 /* STA */
1409 bss->oper_mode = 1;
1410 bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_MODE;
1411 } else if (vif->type == NL80211_IFTYPE_AP ||
1412 vif->type == NL80211_IFTYPE_MESH_POINT) {
1413 bss->bss_type = WCN36XX_HAL_INFRA_AP_MODE;
1414
1415 /* AP */
1416 bss->oper_mode = 0;
1417 bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_SAP_MODE;
1418 } else if (vif->type == NL80211_IFTYPE_ADHOC) {
1419 bss->bss_type = WCN36XX_HAL_IBSS_MODE;
1420
1421 /* STA */
1422 bss->oper_mode = 1;
1423 } else {
1424 wcn36xx_warn("Unknown type for bss config: %d\n", vif->type);
1425 }
1426
1427 if (vif->type == NL80211_IFTYPE_STATION)
1428 wcn36xx_smd_set_bss_nw_type(wcn, sta, bss);
1429 else
1430 bss->nw_type = WCN36XX_HAL_11N_NW_TYPE;
1431
1432 bss->short_slot_time_supported = vif->bss_conf.use_short_slot;
1433 bss->lla_coexist = 0;
1434 bss->llb_coexist = 0;
1435 bss->llg_coexist = 0;
1436 bss->rifs_mode = 0;
1437 bss->beacon_interval = vif->bss_conf.beacon_int;
1438 bss->dtim_period = vif_priv->dtim_period;
1439
1440 wcn36xx_smd_set_bss_ht_params(vif, sta, bss);
1441
1442 bss->oper_channel = WCN36XX_HW_CHANNEL(wcn);
1443
1444 if (conf_is_ht40_minus(&wcn->hw->conf))
1445 bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_BELOW;
1446 else if (conf_is_ht40_plus(&wcn->hw->conf))
1447 bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
1448 else
1449 bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_NONE;
1450
1451 bss->reserved = 0;
1452
1453 /* wcn->ssid is only valid in AP and IBSS mode */
1454 bss->ssid.length = vif_priv->ssid.length;
1455 memcpy(bss->ssid.ssid, vif_priv->ssid.ssid, vif_priv->ssid.length);
1456
1457 bss->obss_prot_enabled = 0;
1458 bss->rmf = 0;
1459 bss->max_probe_resp_retry_limit = 0;
1460 bss->hidden_ssid = vif->bss_conf.hidden_ssid;
1461 bss->proxy_probe_resp = 0;
1462 bss->edca_params_valid = 0;
1463
1464 /* FIXME: set acbe, acbk, acvi and acvo */
1465
1466 bss->ext_set_sta_key_param_valid = 0;
1467
1468 /* FIXME: set ext_set_sta_key_param */
1469
1470 bss->spectrum_mgt_enable = 0;
1471 bss->tx_mgmt_power = 0;
1472 bss->max_tx_power = WCN36XX_MAX_POWER(wcn);
1473 bss->action = update;
1474
1475 vif_priv->bss_type = bss->bss_type;
1476 }
1477
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 61672 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v4 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0
2020-09-09 15:36 ` [PATCH v4 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0 Bryan O'Donoghue
@ 2020-09-09 20:34 ` kernel test robot
2020-09-10 8:51 ` kernel test robot
1 sibling, 0 replies; 15+ messages in thread
From: kernel test robot @ 2020-09-09 20:34 UTC (permalink / raw)
To: Bryan O'Donoghue, kvalo, wcn36xx, linux-wireless
Cc: kbuild-all, bryan.odonoghue, shawn.guo, loic.poulain
[-- Attachment #1: Type: text/plain, Size: 5343 bytes --]
Hi Bryan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 160b351d75cb50a0dd2abf9b63e1891935aa9e4a]
url: https://github.com/0day-ci/linux/commits/Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
base: 160b351d75cb50a0dd2abf9b63e1891935aa9e4a
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/wireless/ath/wcn36xx/smd.c:150:1: warning: no previous prototype for 'wcn36xx_smd_set_bss_vht_params' [-Wmissing-prototypes]
150 | wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:186:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_vht_params' [-Wmissing-prototypes]
186 | void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:208:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_ht_ldpc_params' [-Wmissing-prototypes]
208 | void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:233:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_default_vht_params' [-Wmissing-prototypes]
233 | void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:249:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_default_ht_ldpc_params' [-Wmissing-prototypes]
249 | void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:1253:1: warning: no previous prototype for 'wcn36xx_smd_set_sta_params_v1' [-Wmissing-prototypes]
1253 | wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:1387:6: warning: no previous prototype for 'wcn36xx_smd_set_bss_params' [-Wmissing-prototypes]
1387 | void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c: In function 'wcn36xx_smd_set_bss_params':
drivers/net/wireless/ath/wcn36xx/smd.c:1395:40: warning: variable 'sta_params' set but not used [-Wunused-but-set-variable]
1395 | struct wcn36xx_hal_config_sta_params *sta_params;
| ^~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c: At top level:
>> drivers/net/wireless/ath/wcn36xx/smd.c:1587:5: warning: no previous prototype for 'wcn36xx_smd_config_bss_v0' [-Wmissing-prototypes]
1587 | int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
# https://github.com/0day-ci/linux/commit/3c3f8bcaf7d541aab14db1b75513565dad07aa26
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
git checkout 3c3f8bcaf7d541aab14db1b75513565dad07aa26
vim +/wcn36xx_smd_config_bss_v0 +1587 drivers/net/wireless/ath/wcn36xx/smd.c
1586
> 1587 int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
1588 struct ieee80211_sta *sta, const u8 *bssid,
1589 bool update)
1590 {
1591 struct wcn36xx_hal_config_bss_req_msg *msg;
1592 struct wcn36xx_hal_config_bss_params *bss;
1593 struct wcn36xx_hal_config_sta_params *sta_params;
1594 int ret;
1595
1596 msg = kzalloc(sizeof(*msg), GFP_KERNEL);
1597 if (!msg)
1598 return -ENOMEM;
1599
1600 INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ);
1601
1602 bss = &msg->bss_params;
1603 sta_params = &bss->sta;
1604
1605 wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss);
1606 wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
1607
1608 PREPARE_HAL_BUF(wcn->hal_buf, (*msg));
1609
1610 wcn36xx_dbg(WCN36XX_DBG_HAL,
1611 "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n",
1612 bss->bssid, bss->self_mac_addr, bss->bss_type,
1613 bss->oper_mode, bss->nw_type);
1614
1615 wcn36xx_dbg(WCN36XX_DBG_HAL,
1616 "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n",
1617 sta_params->bssid, sta_params->action,
1618 sta_params->sta_index, sta_params->bssid_index,
1619 sta_params->aid, sta_params->type,
1620 sta_params->mac);
1621
1622 ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len);
1623 kfree(msg);
1624
1625 return ret;
1626 }
1627
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 61672 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v4 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0
@ 2020-09-09 20:34 ` kernel test robot
0 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2020-09-09 20:34 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5448 bytes --]
Hi Bryan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 160b351d75cb50a0dd2abf9b63e1891935aa9e4a]
url: https://github.com/0day-ci/linux/commits/Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
base: 160b351d75cb50a0dd2abf9b63e1891935aa9e4a
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/wireless/ath/wcn36xx/smd.c:150:1: warning: no previous prototype for 'wcn36xx_smd_set_bss_vht_params' [-Wmissing-prototypes]
150 | wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:186:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_vht_params' [-Wmissing-prototypes]
186 | void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:208:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_ht_ldpc_params' [-Wmissing-prototypes]
208 | void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:233:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_default_vht_params' [-Wmissing-prototypes]
233 | void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:249:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_default_ht_ldpc_params' [-Wmissing-prototypes]
249 | void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:1253:1: warning: no previous prototype for 'wcn36xx_smd_set_sta_params_v1' [-Wmissing-prototypes]
1253 | wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c:1387:6: warning: no previous prototype for 'wcn36xx_smd_set_bss_params' [-Wmissing-prototypes]
1387 | void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c: In function 'wcn36xx_smd_set_bss_params':
drivers/net/wireless/ath/wcn36xx/smd.c:1395:40: warning: variable 'sta_params' set but not used [-Wunused-but-set-variable]
1395 | struct wcn36xx_hal_config_sta_params *sta_params;
| ^~~~~~~~~~
drivers/net/wireless/ath/wcn36xx/smd.c: At top level:
>> drivers/net/wireless/ath/wcn36xx/smd.c:1587:5: warning: no previous prototype for 'wcn36xx_smd_config_bss_v0' [-Wmissing-prototypes]
1587 | int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
# https://github.com/0day-ci/linux/commit/3c3f8bcaf7d541aab14db1b75513565dad07aa26
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
git checkout 3c3f8bcaf7d541aab14db1b75513565dad07aa26
vim +/wcn36xx_smd_config_bss_v0 +1587 drivers/net/wireless/ath/wcn36xx/smd.c
1586
> 1587 int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
1588 struct ieee80211_sta *sta, const u8 *bssid,
1589 bool update)
1590 {
1591 struct wcn36xx_hal_config_bss_req_msg *msg;
1592 struct wcn36xx_hal_config_bss_params *bss;
1593 struct wcn36xx_hal_config_sta_params *sta_params;
1594 int ret;
1595
1596 msg = kzalloc(sizeof(*msg), GFP_KERNEL);
1597 if (!msg)
1598 return -ENOMEM;
1599
1600 INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ);
1601
1602 bss = &msg->bss_params;
1603 sta_params = &bss->sta;
1604
1605 wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss);
1606 wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
1607
1608 PREPARE_HAL_BUF(wcn->hal_buf, (*msg));
1609
1610 wcn36xx_dbg(WCN36XX_DBG_HAL,
1611 "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n",
1612 bss->bssid, bss->self_mac_addr, bss->bss_type,
1613 bss->oper_mode, bss->nw_type);
1614
1615 wcn36xx_dbg(WCN36XX_DBG_HAL,
1616 "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n",
1617 sta_params->bssid, sta_params->action,
1618 sta_params->sta_index, sta_params->bssid_index,
1619 sta_params->aid, sta_params->type,
1620 sta_params->mac);
1621
1622 ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len);
1623 kfree(msg);
1624
1625 return ret;
1626 }
1627
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 61672 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v4 3/7] wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params()
2020-09-09 15:36 ` [PATCH v4 3/7] wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params() Bryan O'Donoghue
2020-09-09 19:16 ` kernel test robot
@ 2020-09-10 7:11 ` kernel test robot
1 sibling, 0 replies; 15+ messages in thread
From: kernel test robot @ 2020-09-10 7:11 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 12999 bytes --]
Hi Bryan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 160b351d75cb50a0dd2abf9b63e1891935aa9e4a]
url: https://github.com/0day-ci/linux/commits/Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
base: 160b351d75cb50a0dd2abf9b63e1891935aa9e4a
config: powerpc-randconfig-r011-20200909 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 0a5dc7effb191eff740e0e7ae7bd8e1f6bdb3ad9)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/wireless/ath/wcn36xx/smd.c:150:1: warning: no previous prototype for function 'wcn36xx_smd_set_bss_vht_params' [-Wmissing-prototypes]
wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif,
^
drivers/net/wireless/ath/wcn36xx/smd.c:149:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:186:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_vht_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:186:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:208:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_ht_ldpc_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
^
drivers/net/wireless/ath/wcn36xx/smd.c:208:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:233:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_default_vht_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:233:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:249:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_default_ht_ldpc_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:249:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:1253:1: warning: no previous prototype for function 'wcn36xx_smd_set_sta_params_v1' [-Wmissing-prototypes]
wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:1252:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
>> drivers/net/wireless/ath/wcn36xx/smd.c:1387:6: warning: no previous prototype for function 'wcn36xx_smd_set_bss_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:1387:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
^
static
7 warnings generated.
# https://github.com/0day-ci/linux/commit/1c12f515815cc2fa84d00b7c6aa77bf5dc5f1d20
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
git checkout 1c12f515815cc2fa84d00b7c6aa77bf5dc5f1d20
vim +/wcn36xx_smd_set_bss_params +1387 drivers/net/wireless/ath/wcn36xx/smd.c
1251
1252 void
> 1253 wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn,
1254 struct ieee80211_vif *vif,
1255 struct ieee80211_sta *sta,
1256 struct wcn36xx_hal_config_sta_params_v1 *sta_par)
1257 {
1258 struct wcn36xx_sta *sta_priv = NULL;
1259 struct wcn36xx_hal_config_sta_params sta_par_v0;
1260
1261 wcn36xx_smd_set_sta_params(wcn, vif, sta, &sta_par_v0);
1262 wcn36xx_smd_convert_sta_to_v1(wcn, &sta_par_v0, sta_par);
1263
1264 if (sta) {
1265 sta_priv = wcn36xx_sta_to_priv(sta);
1266 wcn36xx_smd_set_sta_vht_params(wcn, sta, sta_par);
1267 wcn36xx_smd_set_sta_ht_ldpc_params(sta, sta_par);
1268 memcpy(&sta_par->supported_rates, &sta_priv->supported_rates,
1269 sizeof(sta_par->supported_rates));
1270 } else {
1271 wcn36xx_set_default_rates_v1(&sta_par->supported_rates);
1272 wcn36xx_smd_set_sta_default_vht_params(wcn, sta_par);
1273 wcn36xx_smd_set_sta_default_ht_ldpc_params(wcn, sta_par);
1274 }
1275 }
1276
1277 static int wcn36xx_smd_config_sta_rsp(struct wcn36xx *wcn,
1278 struct ieee80211_sta *sta,
1279 void *buf,
1280 size_t len)
1281 {
1282 struct wcn36xx_hal_config_sta_rsp_msg *rsp;
1283 struct config_sta_rsp_params *params;
1284 struct wcn36xx_sta *sta_priv = wcn36xx_sta_to_priv(sta);
1285
1286 if (len < sizeof(*rsp))
1287 return -EINVAL;
1288
1289 rsp = (struct wcn36xx_hal_config_sta_rsp_msg *)buf;
1290 params = &rsp->params;
1291
1292 if (params->status != WCN36XX_FW_MSG_RESULT_SUCCESS) {
1293 wcn36xx_warn("hal config sta response failure: %d\n",
1294 params->status);
1295 return -EIO;
1296 }
1297
1298 sta_priv->sta_index = params->sta_index;
1299 sta_priv->dpu_desc_index = params->dpu_index;
1300 sta_priv->ucast_dpu_sign = params->uc_ucast_sig;
1301
1302 wcn36xx_dbg(WCN36XX_DBG_HAL,
1303 "hal config sta rsp status %d sta_index %d bssid_index %d uc_ucast_sig %d p2p %d\n",
1304 params->status, params->sta_index, params->bssid_index,
1305 params->uc_ucast_sig, params->p2p);
1306
1307 return 0;
1308 }
1309
1310 static int wcn36xx_smd_config_sta_v1(struct wcn36xx *wcn,
1311 struct ieee80211_vif *vif,
1312 struct ieee80211_sta *sta)
1313 {
1314 struct wcn36xx_hal_config_sta_req_msg_v1 msg_body;
1315 struct wcn36xx_hal_config_sta_params_v1 *sta_params;
1316
1317 INIT_HAL_MSG(msg_body, WCN36XX_HAL_CONFIG_STA_REQ);
1318 msg_body.header.len -= WCN36XX_DIFF_STA_PARAMS_V1_NOVHT;
1319
1320 sta_params = &msg_body.sta_params;
1321
1322 wcn36xx_smd_set_sta_params_v1(wcn, vif, sta, sta_params);
1323
1324 PREPARE_HAL_BUF(wcn->hal_buf, msg_body);
1325
1326 wcn36xx_dbg(WCN36XX_DBG_HAL,
1327 "hal config sta v1 action %d sta_index %d bssid_index %d bssid %pM type %d mac %pM aid %d\n",
1328 sta_params->action, sta_params->sta_index, sta_params->bssid_index,
1329 sta_params->bssid, sta_params->type, sta_params->mac, sta_params->aid);
1330
1331 return wcn36xx_smd_send_and_wait(wcn, msg_body.header.len);
1332 }
1333
1334 static int wcn36xx_smd_config_sta_v0(struct wcn36xx *wcn,
1335 struct ieee80211_vif *vif,
1336 struct ieee80211_sta *sta)
1337 {
1338 struct wcn36xx_hal_config_sta_req_msg msg;
1339 struct wcn36xx_hal_config_sta_params *sta_params;
1340
1341 INIT_HAL_MSG(msg, WCN36XX_HAL_CONFIG_STA_REQ);
1342
1343 sta_params = &msg.sta_params;
1344
1345 wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
1346
1347 PREPARE_HAL_BUF(wcn->hal_buf, msg);
1348
1349 wcn36xx_dbg(WCN36XX_DBG_HAL,
1350 "hal config sta action %d sta_index %d bssid_index %d bssid %pM type %d mac %pM aid %d\n",
1351 sta_params->action, sta_params->sta_index,
1352 sta_params->bssid_index, sta_params->bssid,
1353 sta_params->type, sta_params->mac, sta_params->aid);
1354
1355 return wcn36xx_smd_send_and_wait(wcn, msg.header.len);
1356 }
1357
1358 int wcn36xx_smd_config_sta(struct wcn36xx *wcn, struct ieee80211_vif *vif,
1359 struct ieee80211_sta *sta)
1360 {
1361 int ret;
1362
1363 mutex_lock(&wcn->hal_mutex);
1364
1365 if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24))
1366 ret = wcn36xx_smd_config_sta_v1(wcn, vif, sta);
1367 else
1368 ret = wcn36xx_smd_config_sta_v0(wcn, vif, sta);
1369
1370 if (ret) {
1371 wcn36xx_err("Sending hal_config_sta failed\n");
1372 goto out;
1373 }
1374 ret = wcn36xx_smd_config_sta_rsp(wcn,
1375 sta,
1376 wcn->hal_buf,
1377 wcn->hal_rsp_len);
1378 if (ret) {
1379 wcn36xx_err("hal_config_sta response failed err=%d\n", ret);
1380 goto out;
1381 }
1382 out:
1383 mutex_unlock(&wcn->hal_mutex);
1384 return ret;
1385 }
1386
> 1387 void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
1388 struct ieee80211_vif *vif,
1389 struct ieee80211_sta *sta,
1390 const u8 *bssid,
1391 bool update,
1392 struct wcn36xx_hal_config_bss_params *bss)
1393 {
1394 struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
1395 struct wcn36xx_hal_config_sta_params *sta_params;
1396
1397 sta_params = &bss->sta;
1398
1399 WARN_ON(is_zero_ether_addr(bssid));
1400
1401 memcpy(&bss->bssid, bssid, ETH_ALEN);
1402
1403 memcpy(bss->self_mac_addr, vif->addr, ETH_ALEN);
1404
1405 if (vif->type == NL80211_IFTYPE_STATION) {
1406 bss->bss_type = WCN36XX_HAL_INFRASTRUCTURE_MODE;
1407
1408 /* STA */
1409 bss->oper_mode = 1;
1410 bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_MODE;
1411 } else if (vif->type == NL80211_IFTYPE_AP ||
1412 vif->type == NL80211_IFTYPE_MESH_POINT) {
1413 bss->bss_type = WCN36XX_HAL_INFRA_AP_MODE;
1414
1415 /* AP */
1416 bss->oper_mode = 0;
1417 bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_SAP_MODE;
1418 } else if (vif->type == NL80211_IFTYPE_ADHOC) {
1419 bss->bss_type = WCN36XX_HAL_IBSS_MODE;
1420
1421 /* STA */
1422 bss->oper_mode = 1;
1423 } else {
1424 wcn36xx_warn("Unknown type for bss config: %d\n", vif->type);
1425 }
1426
1427 if (vif->type == NL80211_IFTYPE_STATION)
1428 wcn36xx_smd_set_bss_nw_type(wcn, sta, bss);
1429 else
1430 bss->nw_type = WCN36XX_HAL_11N_NW_TYPE;
1431
1432 bss->short_slot_time_supported = vif->bss_conf.use_short_slot;
1433 bss->lla_coexist = 0;
1434 bss->llb_coexist = 0;
1435 bss->llg_coexist = 0;
1436 bss->rifs_mode = 0;
1437 bss->beacon_interval = vif->bss_conf.beacon_int;
1438 bss->dtim_period = vif_priv->dtim_period;
1439
1440 wcn36xx_smd_set_bss_ht_params(vif, sta, bss);
1441
1442 bss->oper_channel = WCN36XX_HW_CHANNEL(wcn);
1443
1444 if (conf_is_ht40_minus(&wcn->hw->conf))
1445 bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_BELOW;
1446 else if (conf_is_ht40_plus(&wcn->hw->conf))
1447 bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
1448 else
1449 bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_NONE;
1450
1451 bss->reserved = 0;
1452
1453 /* wcn->ssid is only valid in AP and IBSS mode */
1454 bss->ssid.length = vif_priv->ssid.length;
1455 memcpy(bss->ssid.ssid, vif_priv->ssid.ssid, vif_priv->ssid.length);
1456
1457 bss->obss_prot_enabled = 0;
1458 bss->rmf = 0;
1459 bss->max_probe_resp_retry_limit = 0;
1460 bss->hidden_ssid = vif->bss_conf.hidden_ssid;
1461 bss->proxy_probe_resp = 0;
1462 bss->edca_params_valid = 0;
1463
1464 /* FIXME: set acbe, acbk, acvi and acvo */
1465
1466 bss->ext_set_sta_key_param_valid = 0;
1467
1468 /* FIXME: set ext_set_sta_key_param */
1469
1470 bss->spectrum_mgt_enable = 0;
1471 bss->tx_mgmt_power = 0;
1472 bss->max_tx_power = WCN36XX_MAX_POWER(wcn);
1473 bss->action = update;
1474
1475 vif_priv->bss_type = bss->bss_type;
1476 }
1477
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32293 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v4 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0
2020-09-09 15:36 ` [PATCH v4 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0 Bryan O'Donoghue
@ 2020-09-10 8:51 ` kernel test robot
2020-09-10 8:51 ` kernel test robot
1 sibling, 0 replies; 15+ messages in thread
From: kernel test robot @ 2020-09-10 8:51 UTC (permalink / raw)
To: Bryan O'Donoghue, kvalo, wcn36xx, linux-wireless
Cc: kbuild-all, clang-built-linux, bryan.odonoghue, shawn.guo, loic.poulain
[-- Attachment #1: Type: text/plain, Size: 6616 bytes --]
Hi Bryan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 160b351d75cb50a0dd2abf9b63e1891935aa9e4a]
url: https://github.com/0day-ci/linux/commits/Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
base: 160b351d75cb50a0dd2abf9b63e1891935aa9e4a
config: powerpc-randconfig-r011-20200909 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 0a5dc7effb191eff740e0e7ae7bd8e1f6bdb3ad9)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/wireless/ath/wcn36xx/smd.c:150:1: warning: no previous prototype for function 'wcn36xx_smd_set_bss_vht_params' [-Wmissing-prototypes]
wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif,
^
drivers/net/wireless/ath/wcn36xx/smd.c:149:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:186:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_vht_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:186:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:208:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_ht_ldpc_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
^
drivers/net/wireless/ath/wcn36xx/smd.c:208:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:233:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_default_vht_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:233:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:249:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_default_ht_ldpc_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:249:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:1253:1: warning: no previous prototype for function 'wcn36xx_smd_set_sta_params_v1' [-Wmissing-prototypes]
wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:1252:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:1387:6: warning: no previous prototype for function 'wcn36xx_smd_set_bss_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:1387:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
^
static
>> drivers/net/wireless/ath/wcn36xx/smd.c:1587:5: warning: no previous prototype for function 'wcn36xx_smd_config_bss_v0' [-Wmissing-prototypes]
int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
^
drivers/net/wireless/ath/wcn36xx/smd.c:1587:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
^
static
8 warnings generated.
# https://github.com/0day-ci/linux/commit/3c3f8bcaf7d541aab14db1b75513565dad07aa26
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
git checkout 3c3f8bcaf7d541aab14db1b75513565dad07aa26
vim +/wcn36xx_smd_config_bss_v0 +1587 drivers/net/wireless/ath/wcn36xx/smd.c
1586
> 1587 int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
1588 struct ieee80211_sta *sta, const u8 *bssid,
1589 bool update)
1590 {
1591 struct wcn36xx_hal_config_bss_req_msg *msg;
1592 struct wcn36xx_hal_config_bss_params *bss;
1593 struct wcn36xx_hal_config_sta_params *sta_params;
1594 int ret;
1595
1596 msg = kzalloc(sizeof(*msg), GFP_KERNEL);
1597 if (!msg)
1598 return -ENOMEM;
1599
1600 INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ);
1601
1602 bss = &msg->bss_params;
1603 sta_params = &bss->sta;
1604
1605 wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss);
1606 wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
1607
1608 PREPARE_HAL_BUF(wcn->hal_buf, (*msg));
1609
1610 wcn36xx_dbg(WCN36XX_DBG_HAL,
1611 "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n",
1612 bss->bssid, bss->self_mac_addr, bss->bss_type,
1613 bss->oper_mode, bss->nw_type);
1614
1615 wcn36xx_dbg(WCN36XX_DBG_HAL,
1616 "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n",
1617 sta_params->bssid, sta_params->action,
1618 sta_params->sta_index, sta_params->bssid_index,
1619 sta_params->aid, sta_params->type,
1620 sta_params->mac);
1621
1622 ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len);
1623 kfree(msg);
1624
1625 return ret;
1626 }
1627
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32293 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v4 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0
@ 2020-09-10 8:51 ` kernel test robot
0 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2020-09-10 8:51 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6751 bytes --]
Hi Bryan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 160b351d75cb50a0dd2abf9b63e1891935aa9e4a]
url: https://github.com/0day-ci/linux/commits/Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
base: 160b351d75cb50a0dd2abf9b63e1891935aa9e4a
config: powerpc-randconfig-r011-20200909 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 0a5dc7effb191eff740e0e7ae7bd8e1f6bdb3ad9)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/wireless/ath/wcn36xx/smd.c:150:1: warning: no previous prototype for function 'wcn36xx_smd_set_bss_vht_params' [-Wmissing-prototypes]
wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif,
^
drivers/net/wireless/ath/wcn36xx/smd.c:149:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:186:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_vht_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:186:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:208:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_ht_ldpc_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
^
drivers/net/wireless/ath/wcn36xx/smd.c:208:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:233:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_default_vht_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:233:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:249:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_default_ht_ldpc_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:249:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:1253:1: warning: no previous prototype for function 'wcn36xx_smd_set_sta_params_v1' [-Wmissing-prototypes]
wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:1252:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
drivers/net/wireless/ath/wcn36xx/smd.c:1387:6: warning: no previous prototype for function 'wcn36xx_smd_set_bss_params' [-Wmissing-prototypes]
void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
^
drivers/net/wireless/ath/wcn36xx/smd.c:1387:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
^
static
>> drivers/net/wireless/ath/wcn36xx/smd.c:1587:5: warning: no previous prototype for function 'wcn36xx_smd_config_bss_v0' [-Wmissing-prototypes]
int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
^
drivers/net/wireless/ath/wcn36xx/smd.c:1587:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
^
static
8 warnings generated.
# https://github.com/0day-ci/linux/commit/3c3f8bcaf7d541aab14db1b75513565dad07aa26
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
git checkout 3c3f8bcaf7d541aab14db1b75513565dad07aa26
vim +/wcn36xx_smd_config_bss_v0 +1587 drivers/net/wireless/ath/wcn36xx/smd.c
1586
> 1587 int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
1588 struct ieee80211_sta *sta, const u8 *bssid,
1589 bool update)
1590 {
1591 struct wcn36xx_hal_config_bss_req_msg *msg;
1592 struct wcn36xx_hal_config_bss_params *bss;
1593 struct wcn36xx_hal_config_sta_params *sta_params;
1594 int ret;
1595
1596 msg = kzalloc(sizeof(*msg), GFP_KERNEL);
1597 if (!msg)
1598 return -ENOMEM;
1599
1600 INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ);
1601
1602 bss = &msg->bss_params;
1603 sta_params = &bss->sta;
1604
1605 wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss);
1606 wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
1607
1608 PREPARE_HAL_BUF(wcn->hal_buf, (*msg));
1609
1610 wcn36xx_dbg(WCN36XX_DBG_HAL,
1611 "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n",
1612 bss->bssid, bss->self_mac_addr, bss->bss_type,
1613 bss->oper_mode, bss->nw_type);
1614
1615 wcn36xx_dbg(WCN36XX_DBG_HAL,
1616 "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n",
1617 sta_params->bssid, sta_params->action,
1618 sta_params->sta_index, sta_params->bssid_index,
1619 sta_params->aid, sta_params->type,
1620 sta_params->mac);
1621
1622 ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len);
1623 kfree(msg);
1624
1625 return ret;
1626 }
1627
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32293 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2020-09-10 8:51 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09 15:36 [PATCH v4 0/7] wcn36xx: Tidy up BSS/STA config Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 1/7] wcn36xx: Functionally decompose wcn36xx_smd_config_sta() Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 2/7] wcn36xx: Move wcn36xx_smd_set_sta_params() inside wcn36xx_smd_config_bss() Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 3/7] wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params() Bryan O'Donoghue
2020-09-09 19:16 ` kernel test robot
2020-09-09 19:16 ` kernel test robot
2020-09-10 7:11 ` kernel test robot
2020-09-09 15:36 ` [PATCH v4 4/7] wcn36xx: Update wcn36xx_smd_config_bss_v1() to operate internally Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0 Bryan O'Donoghue
2020-09-09 20:34 ` kernel test robot
2020-09-09 20:34 ` kernel test robot
2020-09-10 8:51 ` kernel test robot
2020-09-10 8:51 ` kernel test robot
2020-09-09 15:36 ` [PATCH v4 6/7] wcn36xx: Convert to using wcn36xx_smd_config_bss_v0() Bryan O'Donoghue
2020-09-09 15:36 ` [PATCH v4 7/7] wcn36xx: Remove dead code in wcn36xx_smd_config_bss() Bryan O'Donoghue
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.