Message ID | 20150118051043.31866.53087.stgit@114-36-241-182.dynamic.hinet.net |
---|---|
State | New |
Headers | show |
On 18 January 2015 at 22:17, Kalle Valo <kvalo@codeaurora.org> wrote: > Andy Green <andy.green@linaro.org> writes: > >> Convert the list of chip types to an enum, add the default >> UNKNOWN type and a type for WCN3620 chip >> >> Signed-off-by: Andy Green <andy.green@linaro.org> > > Please just use "wcn36xx: ", you should drop "net: wireless: " entirely. OK. Can you help me understand what you'd like to see happen with the chip variant detection stuff? There's a comment sent to one list only saying it might be preferable to keep the old detection code as the default. But there are no in-tree users of wcn36xx (mainly due to PIL not being in mainline, I guess). The old test's equivalence that AC == 3680 seems kind of weak to me and establishing the type must be passed in from platform code reflects the situation that there's no public way to detect the chip type from Qualcomm. In the second not-for-upstream series I use that to pass it in from DT, which is how it'd be normally used. -Andy > -- > Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index f0fb81d..a5366b6 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -93,6 +93,13 @@ struct nv_data { u8 table; }; +enum wcn36xx_chip_type { + WCN36XX_CHIP_UNKNOWN, + WCN36XX_CHIP_3660, + WCN36XX_CHIP_3680, + WCN36XX_CHIP_3620, +}; + /* Interface for platform control path * * @open: hook must be called when wcn36xx wants to open control channel. @@ -179,7 +186,7 @@ struct wcn36xx { u8 fw_minor; u8 fw_major; u32 fw_feat_caps[WCN36XX_HAL_CAPS_SIZE]; - u32 chip_version; + enum wcn36xx_chip_type chip_version; /* extra byte for the NULL termination */ u8 crm_version[WCN36XX_HAL_VERSION_LENGTH + 1]; @@ -227,9 +234,6 @@ struct wcn36xx { }; -#define WCN36XX_CHIP_3660 0 -#define WCN36XX_CHIP_3680 1 - static inline bool wcn36xx_is_fw_version(struct wcn36xx *wcn, u8 major, u8 minor,
Convert the list of chip types to an enum, add the default UNKNOWN type and a type for WCN3620 chip Signed-off-by: Andy Green <andy.green@linaro.org> --- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html