qtnfmac: cleanup slave_radar access function

Currently this parameter is global, it is not specific to mac.
So this function does not need any input parameters.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Sergey Matyukevich 2020-01-09 16:17:51 +03:00 committed by Kalle Valo
parent 627b0d0942
commit e92b07a20b
3 changed files with 7 additions and 7 deletions

View File

@ -1056,7 +1056,7 @@ static void qtnf_cfg80211_reg_notifier(struct wiphy *wiphy,
pr_debug("MAC%u: initiator=%d alpha=%c%c\n", mac->macid, req->initiator, pr_debug("MAC%u: initiator=%d alpha=%c%c\n", mac->macid, req->initiator,
req->alpha2[0], req->alpha2[1]); req->alpha2[0], req->alpha2[1]);
ret = qtnf_cmd_reg_notify(mac, req, qtnf_mac_slave_radar_get(wiphy)); ret = qtnf_cmd_reg_notify(mac, req, qtnf_slave_radar_get());
if (ret) { if (ret) {
pr_err("MAC%u: failed to update region to %c%c: %d\n", pr_err("MAC%u: failed to update region to %c%c: %d\n",
mac->macid, req->alpha2[0], req->alpha2[1], ret); mac->macid, req->alpha2[0], req->alpha2[1], ret);

View File

@ -23,6 +23,11 @@ MODULE_PARM_DESC(slave_radar, "set 0 to disable radar detection in slave mode");
static struct dentry *qtnf_debugfs_dir; static struct dentry *qtnf_debugfs_dir;
bool qtnf_slave_radar_get(void)
{
return slave_radar;
}
struct qtnf_wmac *qtnf_core_get_mac(const struct qtnf_bus *bus, u8 macid) struct qtnf_wmac *qtnf_core_get_mac(const struct qtnf_bus *bus, u8 macid)
{ {
struct qtnf_wmac *mac = NULL; struct qtnf_wmac *mac = NULL;
@ -456,11 +461,6 @@ static struct qtnf_wmac *qtnf_core_mac_alloc(struct qtnf_bus *bus,
return mac; return mac;
} }
bool qtnf_mac_slave_radar_get(struct wiphy *wiphy)
{
return slave_radar;
}
static const struct ethtool_ops qtnf_ethtool_ops = { static const struct ethtool_ops qtnf_ethtool_ops = {
.get_drvinfo = cfg80211_get_drvinfo, .get_drvinfo = cfg80211_get_drvinfo,
}; };

View File

@ -133,7 +133,7 @@ struct qtnf_vif *qtnf_mac_get_free_vif(struct qtnf_wmac *mac);
struct qtnf_vif *qtnf_mac_get_base_vif(struct qtnf_wmac *mac); struct qtnf_vif *qtnf_mac_get_base_vif(struct qtnf_wmac *mac);
void qtnf_mac_iface_comb_free(struct qtnf_wmac *mac); void qtnf_mac_iface_comb_free(struct qtnf_wmac *mac);
void qtnf_mac_ext_caps_free(struct qtnf_wmac *mac); void qtnf_mac_ext_caps_free(struct qtnf_wmac *mac);
bool qtnf_mac_slave_radar_get(struct wiphy *wiphy); bool qtnf_slave_radar_get(void);
struct wiphy *qtnf_wiphy_allocate(struct qtnf_bus *bus); struct wiphy *qtnf_wiphy_allocate(struct qtnf_bus *bus);
int qtnf_core_net_attach(struct qtnf_wmac *mac, struct qtnf_vif *priv, int qtnf_core_net_attach(struct qtnf_wmac *mac, struct qtnf_vif *priv,
const char *name, unsigned char name_assign_type); const char *name, unsigned char name_assign_type);