mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
wcn36xx: Disable 5GHz for wcn3620
wcn3620 can only operate on 2.4GHz band due to RF limitation. If wcn36xx digital block is associated with an external IRIS RF module, retrieve the id and disable 5GHz band in case of wcn3620 id. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
ba24d63dd3
commit
fd52bdae9a
@ -1136,7 +1136,8 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
|
|||||||
BIT(NL80211_IFTYPE_MESH_POINT);
|
BIT(NL80211_IFTYPE_MESH_POINT);
|
||||||
|
|
||||||
wcn->hw->wiphy->bands[NL80211_BAND_2GHZ] = &wcn_band_2ghz;
|
wcn->hw->wiphy->bands[NL80211_BAND_2GHZ] = &wcn_band_2ghz;
|
||||||
wcn->hw->wiphy->bands[NL80211_BAND_5GHZ] = &wcn_band_5ghz;
|
if (wcn->rf_id != RF_IRIS_WCN3620)
|
||||||
|
wcn->hw->wiphy->bands[NL80211_BAND_5GHZ] = &wcn_band_5ghz;
|
||||||
|
|
||||||
wcn->hw->wiphy->max_scan_ssids = WCN36XX_MAX_SCAN_SSIDS;
|
wcn->hw->wiphy->max_scan_ssids = WCN36XX_MAX_SCAN_SSIDS;
|
||||||
wcn->hw->wiphy->max_scan_ie_len = WCN36XX_MAX_SCAN_IE_LEN;
|
wcn->hw->wiphy->max_scan_ie_len = WCN36XX_MAX_SCAN_IE_LEN;
|
||||||
@ -1169,6 +1170,7 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
|
|||||||
struct platform_device *pdev)
|
struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device_node *mmio_node;
|
struct device_node *mmio_node;
|
||||||
|
struct device_node *iris_node;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
int index;
|
int index;
|
||||||
int ret;
|
int ret;
|
||||||
@ -1231,6 +1233,14 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
|
|||||||
goto unmap_ccu;
|
goto unmap_ccu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* External RF module */
|
||||||
|
iris_node = of_find_node_by_name(mmio_node, "iris");
|
||||||
|
if (iris_node) {
|
||||||
|
if (of_device_is_compatible(iris_node, "qcom,wcn3620"))
|
||||||
|
wcn->rf_id = RF_IRIS_WCN3620;
|
||||||
|
of_node_put(iris_node);
|
||||||
|
}
|
||||||
|
|
||||||
of_node_put(mmio_node);
|
of_node_put(mmio_node);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -94,6 +94,9 @@ enum wcn36xx_ampdu_state {
|
|||||||
#define WCN36XX_FLAGS(__wcn) (__wcn->hw->flags)
|
#define WCN36XX_FLAGS(__wcn) (__wcn->hw->flags)
|
||||||
#define WCN36XX_MAX_POWER(__wcn) (__wcn->hw->conf.chandef.chan->max_power)
|
#define WCN36XX_MAX_POWER(__wcn) (__wcn->hw->conf.chandef.chan->max_power)
|
||||||
|
|
||||||
|
#define RF_UNKNOWN 0x0000
|
||||||
|
#define RF_IRIS_WCN3620 0x3620
|
||||||
|
|
||||||
static inline void buff_to_be(u32 *buf, size_t len)
|
static inline void buff_to_be(u32 *buf, size_t len)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -241,6 +244,9 @@ struct wcn36xx {
|
|||||||
|
|
||||||
struct sk_buff *tx_ack_skb;
|
struct sk_buff *tx_ack_skb;
|
||||||
|
|
||||||
|
/* RF module */
|
||||||
|
unsigned rf_id;
|
||||||
|
|
||||||
#ifdef CONFIG_WCN36XX_DEBUGFS
|
#ifdef CONFIG_WCN36XX_DEBUGFS
|
||||||
/* Debug file system entry */
|
/* Debug file system entry */
|
||||||
struct wcn36xx_dfs_entry dfs;
|
struct wcn36xx_dfs_entry dfs;
|
||||||
|
Loading…
Reference in New Issue
Block a user