* [PATCH 1/1] mt76: add mt7916 to set wlan_idx_hi [not found] <cover.1640175865.git.Bo.Jiao@mediatek.com> @ 2021-12-22 12:29 ` Bo Jiao 2021-12-23 21:55 ` Lorenzo Bianconi 0 siblings, 1 reply; 4+ messages in thread From: Bo Jiao @ 2021-12-22 12:29 UTC (permalink / raw) To: Felix Fietkau Cc: linux-wireless, Ryder Lee, Xing Song, Sujuan Chen, Shayne Chen, Evelyn Tsai, linux-mediatek, Bo Jiao From: Bo Jiao <Bo.Jiao@mediatek.com> since mt7916 support up to 544 wcid entries, add it to set wlan_idx_hi. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> --- drivers/net/wireless/mediatek/mt76/mt76_connac.h | 5 +++++ drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac.h b/drivers/net/wireless/mediatek/mt76/mt76_connac.h index e999d71..8701f04 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac.h +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac.h @@ -110,6 +110,11 @@ static inline bool is_mt7915(struct mt76_dev *dev) return mt76_chip(dev) == 0x7915; } +static inline bool is_mt7916(struct mt76_dev *dev) +{ + return mt76_chip(dev) == 0x7906; +} + static inline u8 mt76_connac_chan_bw(struct cfg80211_chan_def *chandef) { static const u8 width_to_bw[] = { diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h index edad583..fc9a084 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h @@ -1464,7 +1464,7 @@ mt76_connac_mcu_get_wlan_idx(struct mt76_dev *dev, struct mt76_wcid *wcid, { *wlan_idx_hi = 0; - if (is_mt7921(dev) || is_mt7915(dev)) { + if (is_mt7921(dev) || is_mt7915(dev) || is_mt7916(dev)) { *wlan_idx_lo = wcid ? to_wcid_lo(wcid->idx) : 0; *wlan_idx_hi = wcid ? to_wcid_hi(wcid->idx) : 0; } else { -- 2.18.0 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] mt76: add mt7916 to set wlan_idx_hi 2021-12-22 12:29 ` [PATCH 1/1] mt76: add mt7916 to set wlan_idx_hi Bo Jiao @ 2021-12-23 21:55 ` Lorenzo Bianconi 2021-12-23 23:50 ` Ryder Lee 0 siblings, 1 reply; 4+ messages in thread From: Lorenzo Bianconi @ 2021-12-23 21:55 UTC (permalink / raw) To: Bo Jiao Cc: Felix Fietkau, linux-wireless, Ryder Lee, Xing Song, Sujuan Chen, Shayne Chen, Evelyn Tsai, linux-mediatek [-- Attachment #1.1: Type: text/plain, Size: 1917 bytes --] > From: Bo Jiao <Bo.Jiao@mediatek.com> > > since mt7916 support up to 544 wcid entries, > add it to set wlan_idx_hi. > > Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> > Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> > --- > drivers/net/wireless/mediatek/mt76/mt76_connac.h | 5 +++++ > drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 2 +- > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac.h b/drivers/net/wireless/mediatek/mt76/mt76_connac.h > index e999d71..8701f04 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt76_connac.h > +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac.h > @@ -110,6 +110,11 @@ static inline bool is_mt7915(struct mt76_dev *dev) > return mt76_chip(dev) == 0x7915; > } > > +static inline bool is_mt7916(struct mt76_dev *dev) > +{ > + return mt76_chip(dev) == 0x7906; > +} > + > static inline u8 mt76_connac_chan_bw(struct cfg80211_chan_def *chandef) > { > static const u8 width_to_bw[] = { > diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > index edad583..fc9a084 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > @@ -1464,7 +1464,7 @@ mt76_connac_mcu_get_wlan_idx(struct mt76_dev *dev, struct mt76_wcid *wcid, > { > *wlan_idx_hi = 0; > > - if (is_mt7921(dev) || is_mt7915(dev)) { > + if (is_mt7921(dev) || is_mt7915(dev) || is_mt7916(dev)) { > *wlan_idx_lo = wcid ? to_wcid_lo(wcid->idx) : 0; > *wlan_idx_hi = wcid ? to_wcid_hi(wcid->idx) : 0; I guess I have already included the fix here: https://patchwork.kernel.org/project/linux-wireless/patch/df4d462f1ef4cfc1ae4f6482051a28a10c78262b.1640260901.git.lorenzo@kernel.org/ Regards, Lorenzo > } else { > -- > 2.18.0 > [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] [-- Attachment #2: Type: text/plain, Size: 170 bytes --] _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] mt76: add mt7916 to set wlan_idx_hi 2021-12-23 21:55 ` Lorenzo Bianconi @ 2021-12-23 23:50 ` Ryder Lee 2021-12-24 9:30 ` Lorenzo Bianconi 0 siblings, 1 reply; 4+ messages in thread From: Ryder Lee @ 2021-12-23 23:50 UTC (permalink / raw) To: Lorenzo Bianconi, Bo Jiao Cc: Felix Fietkau, linux-wireless, Xing Song, Sujuan Chen, Shayne Chen, Evelyn Tsai, linux-mediatek On Thu, 2021-12-23 at 22:55 +0100, Lorenzo Bianconi wrote: > > From: Bo Jiao <Bo.Jiao@mediatek.com> > > > > since mt7916 support up to 544 wcid entries, > > add it to set wlan_idx_hi. > > > > Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> > > Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> > > --- > > drivers/net/wireless/mediatek/mt76/mt76_connac.h | 5 +++++ > > drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 2 +- > > 2 files changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac.h > > b/drivers/net/wireless/mediatek/mt76/mt76_connac.h > > index e999d71..8701f04 100644 > > --- a/drivers/net/wireless/mediatek/mt76/mt76_connac.h > > +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac.h > > @@ -110,6 +110,11 @@ static inline bool is_mt7915(struct mt76_dev > > *dev) > > return mt76_chip(dev) == 0x7915; > > } > > > > +static inline bool is_mt7916(struct mt76_dev *dev) > > +{ > > + return mt76_chip(dev) == 0x7906; > > +} > > + > > static inline u8 mt76_connac_chan_bw(struct cfg80211_chan_def > > *chandef) > > { > > static const u8 width_to_bw[] = { > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > > b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > > index edad583..fc9a084 100644 > > --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > > +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > > @@ -1464,7 +1464,7 @@ mt76_connac_mcu_get_wlan_idx(struct mt76_dev > > *dev, struct mt76_wcid *wcid, > > { > > *wlan_idx_hi = 0; > > > > - if (is_mt7921(dev) || is_mt7915(dev)) { > > + if (is_mt7921(dev) || is_mt7915(dev) || is_mt7916(dev)) { > > *wlan_idx_lo = wcid ? to_wcid_lo(wcid->idx) : 0; > > *wlan_idx_hi = wcid ? to_wcid_hi(wcid->idx) : 0; > > I guess I have already included the fix here: > https://patchwork.kernel.org/project/linux-wireless/patch/df4d462f1ef4cfc1ae4f6482051a28a10c78262b.1640260901.git.lorenzo@kernel.org/ > > Regards, > Lorenzo > I think we can fold these patches together and use !is_connac_v1 instead so that we can avoid endless is_mtxxxx || ... || ... Ryder _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] mt76: add mt7916 to set wlan_idx_hi 2021-12-23 23:50 ` Ryder Lee @ 2021-12-24 9:30 ` Lorenzo Bianconi 0 siblings, 0 replies; 4+ messages in thread From: Lorenzo Bianconi @ 2021-12-24 9:30 UTC (permalink / raw) To: Ryder Lee Cc: Bo Jiao, Felix Fietkau, linux-wireless, Xing Song, Sujuan Chen, Shayne Chen, Evelyn Tsai, linux-mediatek [-- Attachment #1.1: Type: text/plain, Size: 2466 bytes --] > On Thu, 2021-12-23 at 22:55 +0100, Lorenzo Bianconi wrote: > > > From: Bo Jiao <Bo.Jiao@mediatek.com> > > > > > > since mt7916 support up to 544 wcid entries, > > > add it to set wlan_idx_hi. > > > > > > Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> > > > Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> > > > --- > > > drivers/net/wireless/mediatek/mt76/mt76_connac.h | 5 +++++ > > > drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 2 +- > > > 2 files changed, 6 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac.h > > > b/drivers/net/wireless/mediatek/mt76/mt76_connac.h > > > index e999d71..8701f04 100644 > > > --- a/drivers/net/wireless/mediatek/mt76/mt76_connac.h > > > +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac.h > > > @@ -110,6 +110,11 @@ static inline bool is_mt7915(struct mt76_dev > > > *dev) > > > return mt76_chip(dev) == 0x7915; > > > } > > > > > > +static inline bool is_mt7916(struct mt76_dev *dev) > > > +{ > > > + return mt76_chip(dev) == 0x7906; > > > +} > > > + > > > static inline u8 mt76_connac_chan_bw(struct cfg80211_chan_def > > > *chandef) > > > { > > > static const u8 width_to_bw[] = { > > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > > > b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > > > index edad583..fc9a084 100644 > > > --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > > > +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > > > @@ -1464,7 +1464,7 @@ mt76_connac_mcu_get_wlan_idx(struct mt76_dev > > > *dev, struct mt76_wcid *wcid, > > > { > > > *wlan_idx_hi = 0; > > > > > > - if (is_mt7921(dev) || is_mt7915(dev)) { > > > + if (is_mt7921(dev) || is_mt7915(dev) || is_mt7916(dev)) { > > > *wlan_idx_lo = wcid ? to_wcid_lo(wcid->idx) : 0; > > > *wlan_idx_hi = wcid ? to_wcid_hi(wcid->idx) : 0; > > > > I guess I have already included the fix here: > > > https://patchwork.kernel.org/project/linux-wireless/patch/df4d462f1ef4cfc1ae4f6482051a28a10c78262b.1640260901.git.lorenzo@kernel.org/ > > > > Regards, > > Lorenzo > > > > I think we can fold these patches together and use !is_connac_v1 > instead so that we can avoid endless is_mtxxxx || ... || ... yes, it is already in my tree and I will post it in the next series. @Felix: can you please ignore this patch? Regards, Lorenzo > > Ryder > > [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] [-- Attachment #2: Type: text/plain, Size: 170 bytes --] _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-24 9:30 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <cover.1640175865.git.Bo.Jiao@mediatek.com> 2021-12-22 12:29 ` [PATCH 1/1] mt76: add mt7916 to set wlan_idx_hi Bo Jiao 2021-12-23 21:55 ` Lorenzo Bianconi 2021-12-23 23:50 ` Ryder Lee 2021-12-24 9:30 ` Lorenzo Bianconi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).