@@ -657,8 +657,7 @@ static void mwifiex_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
- struct mwifiex_private *priv = mwifiex_get_priv(adapter,
- MWIFIEX_BSS_ROLE_ANY);
+
mwifiex_dbg(adapter, INFO,
"info: cfg80211 regulatory domain callback for %c%c\n",
request->alpha2[0], request->alpha2[1]);
@@ -684,7 +683,7 @@ static void mwifiex_reg_notifier(struct wiphy *wiphy,
memcpy(adapter->country_code, request->alpha2,
sizeof(request->alpha2));
mwifiex_send_domain_info_cmd_fw(wiphy);
- mwifiex_dnld_txpwr_table(priv);
+ mwifiex_dnld_txpwr_table(adapter);
}
}
@@ -1554,9 +1554,9 @@ int mwifiex_11h_activate(struct mwifiex_private *priv, bool flag);
void mwifiex_11h_process_join(struct mwifiex_private *priv, u8 **buffer,
struct mwifiex_bssdescriptor *bss_desc);
int mwifiex_11h_handle_event_chanswann(struct mwifiex_private *priv);
-int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv,
+int mwifiex_dnld_dt_cfgdata(struct mwifiex_adapter *adapter,
struct device_node *node, const char *prefix);
-void mwifiex_dnld_txpwr_table(struct mwifiex_private *priv);
+void mwifiex_dnld_txpwr_table(struct mwifiex_adapter *adapter);
extern const struct ethtool_ops mwifiex_ethtool_ops;
@@ -1455,7 +1455,7 @@ static u32 mwifiex_parse_cal_cfg(u8 *src, size_t len, u8 *dst)
return d - dst;
}
-int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv,
+int mwifiex_dnld_dt_cfgdata(struct mwifiex_adapter *adapter,
struct device_node *node, const char *prefix)
{
#ifdef CONFIG_OF
@@ -1472,9 +1472,9 @@ int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv,
/* property header is 6 bytes, data must fit in cmd buffer */
if (prop->value && prop->length > 6 &&
prop->length <= MWIFIEX_SIZE_OF_CMD_BUFFER - S_DS_GEN) {
- ret = mwifiex_send_cmd(priv, HostCmd_CMD_CFG_DATA,
- HostCmd_ACT_GEN_SET, 0,
- prop, true);
+ ret = mwifiex_adapter_send_cmd(adapter, HostCmd_CMD_CFG_DATA,
+ HostCmd_ACT_GEN_SET, 0,
+ prop, true);
if (ret)
return ret;
}
@@ -2274,7 +2274,7 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta, bool init)
adapter->hs_cfg.gpio = data;
}
- mwifiex_dnld_dt_cfgdata(priv, adapter->dt_node,
+ mwifiex_dnld_dt_cfgdata(adapter, adapter->dt_node,
"marvell,caldata");
}
@@ -180,13 +180,13 @@ int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv,
return mwifiex_update_bss_desc_with_ie(priv->adapter, bss_desc);
}
-void mwifiex_dnld_txpwr_table(struct mwifiex_private *priv)
+void mwifiex_dnld_txpwr_table(struct mwifiex_adapter *adapter)
{
- if (priv->adapter->dt_node) {
+ if (adapter->dt_node) {
char txpwr[] = {"marvell,00_txpwrlimit"};
- memcpy(&txpwr[8], priv->adapter->country_code, 2);
- mwifiex_dnld_dt_cfgdata(priv, priv->adapter->dt_node, txpwr);
+ memcpy(&txpwr[8], adapter->country_code, 2);
+ mwifiex_dnld_dt_cfgdata(adapter, adapter->dt_node, txpwr);
}
}
@@ -249,7 +249,7 @@ static int mwifiex_process_country_ie(struct mwifiex_private *priv,
return -1;
}
- mwifiex_dnld_txpwr_table(priv);
+ mwifiex_dnld_txpwr_table(priv->adapter);
return 0;
}
@@ -1029,7 +1029,7 @@ void mwifiex_uap_set_channel(struct mwifiex_private *priv,
if (old_bands != config_bands) {
mwifiex_send_domain_info_cmd_fw(priv->adapter->wiphy);
- mwifiex_dnld_txpwr_table(priv);
+ mwifiex_dnld_txpwr_table(priv->adapter);
}
}
The txpwr settings are for the whole adapter, not for a single priv, so pass the adapter to the relevant functions and use mwifiex_adapter_send_cmd() instead of mwifiex_send_cmd(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 5 ++--- drivers/net/wireless/marvell/mwifiex/main.h | 4 ++-- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 10 +++++----- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 10 +++++----- drivers/net/wireless/marvell/mwifiex/uap_cmd.c | 2 +- 5 files changed, 15 insertions(+), 16 deletions(-)