* [PATCH] Resolve RF Type mismatch
@ 2018-02-06 13:39 Kangmin Park
2018-02-06 14:37 ` Greg Kroah-Hartman
0 siblings, 1 reply; 7+ messages in thread
From: Kangmin Park @ 2018-02-06 13:39 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel
Match rf_type of staging/rtlwifi/wifi.h and staging/rtl8723bs/include/rtw_rf.h,
and update some additional code that resulted.
Signed-off-by: Kangmin Park <l4stpr0gr4m@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
diff --git a/drivers/staging/rtl8723bs/hal/odm.h
b/drivers/staging/rtl8723bs/hal/odm.h
index 87a76ba..dbb78fe 100644
--- a/drivers/staging/rtl8723bs/hal/odm.h
+++ b/drivers/staging/rtl8723bs/hal/odm.h
@@ -511,14 +511,15 @@ typedef enum tag_ODM_RF_Path_Bit_Definition {
typedef enum tag_ODM_RF_Type_Definition {
- ODM_1T1R = 0,
- ODM_1T2R = 1,
- ODM_2T2R = 2,
- ODM_2T3R = 3,
- ODM_2T4R = 4,
- ODM_3T3R = 5,
- ODM_3T4R = 6,
- ODM_4T4R = 7,
+ ODM_1T1R = 0,
+ ODM_1T2R = 1,
+ ODM_2T2R = 2,
+ ODM_2T2R_GREEN = 3,
+ ODM_2T3R = 4,
+ ODM_2T4R = 5,
+ ODM_3T3R = 6,
+ ODM_3T4R = 7,
+ ODM_4T4R = 8,
} ODM_RF_TYPE_E;
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
index b162559..20dcdcd 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
@@ -64,10 +64,22 @@ static void Init_ODM_ComInfo_8723b(struct adapter *Adapter)
if (pHalData->rf_type == RF_1T1R) {
ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_1T1R);
- } else if (pHalData->rf_type == RF_2T2R) {
- ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_2T2R);
} else if (pHalData->rf_type == RF_1T2R) {
ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_1T2R);
+ } else if (pHalData->rf_type == RF_2T2R) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_2T2R);
+ } else if (pHalData->rf_type == RF_2T2R_GREEN) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_2T2R_GREEN);
+ } else if (pHalData->rf_type == RF_2T3R) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_2T3R);
+ } else if (pHalData->rf_type == RF_2T4R) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_2T4R);
+ } else if (pHalData->rf_type == RF_3T3R) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_3T3R);
+ } else if (pHalData->rf_type == RF_3T4R) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_3T4R);
+ } else if (pHalData->rf_type == RF_4T4R) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_4T4R);
}
pdmpriv->InitODMFlag = ODM_RF_CALIBRATION|ODM_RF_TX_PWR_TRACK;
diff --git a/drivers/staging/rtl8723bs/include/rtw_rf.h
b/drivers/staging/rtl8723bs/include/rtw_rf.h
index f9becab..7ef113d1 100644
--- a/drivers/staging/rtl8723bs/include/rtw_rf.h
+++ b/drivers/staging/rtl8723bs/include/rtw_rf.h
@@ -146,12 +146,17 @@ enum PROTECTION_MODE {
/* 2007/11/15 MH Define different RF type. */
enum RT_RF_TYPE_DEFINITION {
- RF_1T2R = 0,
- RF_2T4R = 1,
+ RF_1T1R = 0,
+ RF_1T2R = 1,
RF_2T2R = 2,
- RF_1T1R = 3,
- RF_2T2R_GREEN = 4,
- RF_MAX_TYPE = 5,
+ RF_2T2R_GREEN = 3,
+ RF_2T3R = 4,
+ RF_2T4R = 5,
+ RF_3T3R = 6,
+ RF_3T4R = 7,
+ RF_4T4R = 8,
+
+ RF_MAX_TYPE = 0xF
};
u32 rtw_ch2freq(u32 ch);
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 51d48de..520d2f6 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -3299,7 +3299,7 @@ static int cfg80211_rtw_sched_scan_stop(struct
wiphy *wiphy,
static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap
*ht_cap, enum nl80211_band band, u8 rf_type)
{
-
+#define MAX_BIT_RATE_40MHZ_MCS23 450 /* Mbps */
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
#define MAX_BIT_RATE_40MHZ_MCS7 150 /* Mbps */
@@ -3338,7 +3338,7 @@ static void rtw_cfg80211_init_ht_capab(struct
ieee80211_sta_ht_cap *ht_cap, enum
ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS7);
}
- else if ((rf_type == RF_1T2R) || (rf_type ==RF_2T2R))
+ else if ((rf_type == RF_1T2R) || (rf_type == RF_2T2R) || (rf_type ==
RF_2T2R_GREEN))
{
ht_cap->mcs.rx_mask[0] = 0xFF;
ht_cap->mcs.rx_mask[1] = 0xFF;
@@ -3346,6 +3346,14 @@ static void rtw_cfg80211_init_ht_capab(struct
ieee80211_sta_ht_cap *ht_cap, enum
ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15);
}
+ else if ((rf_type == RF_2T3R) || (rf_type == RF_3T3R))
+ {
+ ht_cap->mcs.rx_mask[0] = 0xFF;
+ ht_cap->mcs.rx_mask[1] = 0xFF;
+ ht_cap->mcs.rx_mask[2] = 0xFF;
+
+ ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS23);
+ }
else
{
DBG_8192C("%s, error rf_type =%d\n", __func__, rf_type);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Resolve RF Type mismatch
2018-02-06 13:39 [PATCH] Resolve RF Type mismatch Kangmin Park
@ 2018-02-06 14:37 ` Greg Kroah-Hartman
0 siblings, 0 replies; 7+ messages in thread
From: Greg Kroah-Hartman @ 2018-02-06 14:37 UTC (permalink / raw)
To: Kangmin Park; +Cc: linux-kernel
On Tue, Feb 06, 2018 at 10:39:45PM +0900, Kangmin Park wrote:
> Match rf_type of staging/rtlwifi/wifi.h and staging/rtl8723bs/include/rtw_rf.h,
> and update some additional code that resulted.
>
> Signed-off-by: Kangmin Park <l4stpr0gr4m@gmail.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>
>
> diff --git a/drivers/staging/rtl8723bs/hal/odm.h
> b/drivers/staging/rtl8723bs/hal/odm.h
> index 87a76ba..dbb78fe 100644
> --- a/drivers/staging/rtl8723bs/hal/odm.h
> +++ b/drivers/staging/rtl8723bs/hal/odm.h
> @@ -511,14 +511,15 @@ typedef enum tag_ODM_RF_Path_Bit_Definition {
>
>
> typedef enum tag_ODM_RF_Type_Definition {
> - ODM_1T1R = 0,
> - ODM_1T2R = 1,
> - ODM_2T2R = 2,
> - ODM_2T3R = 3,
> - ODM_2T4R = 4,
> - ODM_3T3R = 5,
> - ODM_3T4R = 6,
> - ODM_4T4R = 7,
> + ODM_1T1R = 0,
> + ODM_1T2R = 1,
> + ODM_2T2R = 2,
> + ODM_2T2R_GREEN = 3,
> + ODM_2T3R = 4,
> + ODM_2T4R = 5,
> + ODM_3T3R = 6,
> + ODM_3T4R = 7,
> + ODM_4T4R = 8,
> } ODM_RF_TYPE_E;
>
>
Whitespace seems to be totally broken in your patch, making it
impossible to apply :(
Please try fixing up your email client and trying again.
Also, use the scripts/get_maintainer.pl tool on your patch to know what
mailing lists and people to cc: for a patch.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] Resolve RF Type mismatch
@ 2018-02-06 15:57 Kangmin Park
2018-02-06 16:08 ` Bastien Nocera
2018-02-07 10:51 ` Dan Carpenter
0 siblings, 2 replies; 7+ messages in thread
From: Kangmin Park @ 2018-02-06 15:57 UTC (permalink / raw)
To: gregkh
Cc: devel, arnd, linux-kernel, justin, davem, hdegoede, hadess,
pr0gr4m, joe, Larry.Finger
From: pr0gr4m <l4stpr0gr4m@gmail.com>
---
drivers/staging/rtl8723bs/hal/odm.h | 17 +++++++++--------
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 16 ++++++++++++++--
drivers/staging/rtl8723bs/include/rtw_rf.h | 15 ++++++++++-----
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 12 ++++++++++--
4 files changed, 43 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/odm.h b/drivers/staging/rtl8723bs/hal/odm.h
index 87a76ba..dbb78fe 100644
--- a/drivers/staging/rtl8723bs/hal/odm.h
+++ b/drivers/staging/rtl8723bs/hal/odm.h
@@ -511,14 +511,15 @@ typedef enum tag_ODM_RF_Path_Bit_Definition {
typedef enum tag_ODM_RF_Type_Definition {
- ODM_1T1R = 0,
- ODM_1T2R = 1,
- ODM_2T2R = 2,
- ODM_2T3R = 3,
- ODM_2T4R = 4,
- ODM_3T3R = 5,
- ODM_3T4R = 6,
- ODM_4T4R = 7,
+ ODM_1T1R = 0,
+ ODM_1T2R = 1,
+ ODM_2T2R = 2,
+ ODM_2T2R_GREEN = 3,
+ ODM_2T3R = 4,
+ ODM_2T4R = 5,
+ ODM_3T3R = 6,
+ ODM_3T4R = 7,
+ ODM_4T4R = 8,
} ODM_RF_TYPE_E;
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
index b162559..20dcdcd 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
@@ -64,10 +64,22 @@ static void Init_ODM_ComInfo_8723b(struct adapter *Adapter)
if (pHalData->rf_type == RF_1T1R) {
ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_1T1R);
- } else if (pHalData->rf_type == RF_2T2R) {
- ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_2T2R);
} else if (pHalData->rf_type == RF_1T2R) {
ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_1T2R);
+ } else if (pHalData->rf_type == RF_2T2R) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_2T2R);
+ } else if (pHalData->rf_type == RF_2T2R_GREEN) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_2T2R_GREEN);
+ } else if (pHalData->rf_type == RF_2T3R) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_2T3R);
+ } else if (pHalData->rf_type == RF_2T4R) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_2T4R);
+ } else if (pHalData->rf_type == RF_3T3R) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_3T3R);
+ } else if (pHalData->rf_type == RF_3T4R) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_3T4R);
+ } else if (pHalData->rf_type == RF_4T4R) {
+ ODM_CmnInfoUpdate(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_4T4R);
}
pdmpriv->InitODMFlag = ODM_RF_CALIBRATION|ODM_RF_TX_PWR_TRACK;
diff --git a/drivers/staging/rtl8723bs/include/rtw_rf.h b/drivers/staging/rtl8723bs/include/rtw_rf.h
index f9becab..7ef113d1 100644
--- a/drivers/staging/rtl8723bs/include/rtw_rf.h
+++ b/drivers/staging/rtl8723bs/include/rtw_rf.h
@@ -146,12 +146,17 @@ enum PROTECTION_MODE {
/* 2007/11/15 MH Define different RF type. */
enum RT_RF_TYPE_DEFINITION {
- RF_1T2R = 0,
- RF_2T4R = 1,
+ RF_1T1R = 0,
+ RF_1T2R = 1,
RF_2T2R = 2,
- RF_1T1R = 3,
- RF_2T2R_GREEN = 4,
- RF_MAX_TYPE = 5,
+ RF_2T2R_GREEN = 3,
+ RF_2T3R = 4,
+ RF_2T4R = 5,
+ RF_3T3R = 6,
+ RF_3T4R = 7,
+ RF_4T4R = 8,
+
+ RF_MAX_TYPE = 0xF
};
u32 rtw_ch2freq(u32 ch);
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 51d48de..520d2f6 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -3299,7 +3299,7 @@ static int cfg80211_rtw_sched_scan_stop(struct wiphy *wiphy,
static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum nl80211_band band, u8 rf_type)
{
-
+#define MAX_BIT_RATE_40MHZ_MCS23 450 /* Mbps */
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
#define MAX_BIT_RATE_40MHZ_MCS7 150 /* Mbps */
@@ -3338,7 +3338,7 @@ static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum
ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS7);
}
- else if ((rf_type == RF_1T2R) || (rf_type ==RF_2T2R))
+ else if ((rf_type == RF_1T2R) || (rf_type == RF_2T2R) || (rf_type == RF_2T2R_GREEN))
{
ht_cap->mcs.rx_mask[0] = 0xFF;
ht_cap->mcs.rx_mask[1] = 0xFF;
@@ -3346,6 +3346,14 @@ static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum
ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15);
}
+ else if ((rf_type == RF_2T3R) || (rf_type == RF_3T3R))
+ {
+ ht_cap->mcs.rx_mask[0] = 0xFF;
+ ht_cap->mcs.rx_mask[1] = 0xFF;
+ ht_cap->mcs.rx_mask[2] = 0xFF;
+
+ ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS23);
+ }
else
{
DBG_8192C("%s, error rf_type =%d\n", __func__, rf_type);
--
2.7.4
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Resolve RF Type mismatch
2018-02-06 15:57 Kangmin Park
@ 2018-02-06 16:08 ` Bastien Nocera
2018-02-06 16:31 ` Kangmin Park
2018-02-07 10:51 ` Dan Carpenter
1 sibling, 1 reply; 7+ messages in thread
From: Bastien Nocera @ 2018-02-06 16:08 UTC (permalink / raw)
To: Kangmin Park, gregkh
Cc: hdegoede, justin, Larry.Finger, davem, aishpant, joe, arnd,
ianwmorrison, devel, linux-kernel
On Wed, 2018-02-07 at 00:57 +0900, Kangmin Park wrote:
> From: pr0gr4m <l4stpr0gr4m@gmail.com>
This needs a commit message. I don't understand what the code is trying
to do.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Resolve RF Type mismatch
2018-02-06 16:08 ` Bastien Nocera
@ 2018-02-06 16:31 ` Kangmin Park
2018-02-07 10:58 ` Dan Carpenter
0 siblings, 1 reply; 7+ messages in thread
From: Kangmin Park @ 2018-02-06 16:31 UTC (permalink / raw)
To: Bastien Nocera
Cc: devel, Arnd Bergmann, Greg Kroah-Hartman, justin, davem, hdegoede,
joe, linux-kernel, Larry.Finger
Oops, Sorry for being stupid cuz of first time to use git email.
RF_TYPE and ODM_RF_TYPE on staging/rtl8723bs is different from
staging/rtlwifi 's - updated from v 4.14 -
So, I try to update code on staging/rtl8723bs in comparison with
staging/rtlwifi.
commit message is "Update rf_type and odm_rf_type in comparison with
drivers/staging/rtlwifi"
2018-02-07 1:08 GMT+09:00 Bastien Nocera <hadess@hadess.net>:
> On Wed, 2018-02-07 at 00:57 +0900, Kangmin Park wrote:
>> From: pr0gr4m <l4stpr0gr4m@gmail.com>
>
> This needs a commit message. I don't understand what the code is trying
> to do.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Resolve RF Type mismatch
2018-02-06 15:57 Kangmin Park
2018-02-06 16:08 ` Bastien Nocera
@ 2018-02-07 10:51 ` Dan Carpenter
1 sibling, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2018-02-07 10:51 UTC (permalink / raw)
To: Kangmin Park
Cc: devel, arnd, gregkh, linux-kernel, justin, hdegoede, hadess, joe,
davem, Larry.Finger
On Wed, Feb 07, 2018 at 12:57:13AM +0900, Kangmin Park wrote:
> From: pr0gr4m <l4stpr0gr4m@gmail.com>
No changelog, no sign-off. Changelogs are required but especially in
this case, it's not immediately obvious what this patch is about.
This patch has unrelated white space changes as well. Here is how the
rules work:
> - ODM_1T1R = 0,
> + ODM_1T1R = 0,
This are unrelated.
This white space change is on the same line so that's fine (it's
related).
> - else if ((rf_type == RF_1T2R) || (rf_type ==RF_2T2R))
> + else if ((rf_type == RF_1T2R) || (rf_type == RF_2T2R) || (rf_type == RF_2T2R_GREEN))
regards,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Resolve RF Type mismatch
2018-02-06 16:31 ` Kangmin Park
@ 2018-02-07 10:58 ` Dan Carpenter
0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2018-02-07 10:58 UTC (permalink / raw)
To: Kangmin Park
Cc: devel, Arnd Bergmann, Greg Kroah-Hartman, justin, linux-kernel,
hdegoede, Bastien Nocera, joe, davem, Larry.Finger
Also the patch prefix is wrong in the email subject. It should say,
[PATCH] staging: rtl8723bs: Resolve RF Type mismatch
On Wed, Feb 07, 2018 at 01:31:48AM +0900, Kangmin Park wrote:
> Oops, Sorry for being stupid cuz of first time to use git email.
No problem. We were all newbies once. Send the email to yourself first
and try applying it with `git am`, then review the patch with
`git log -p`.
> RF_TYPE and ODM_RF_TYPE on staging/rtl8723bs is different from
> staging/rtlwifi 's - updated from v 4.14 -
> So, I try to update code on staging/rtl8723bs in comparison with
> staging/rtlwifi.
> commit message is "Update rf_type and odm_rf_type in comparison with
> drivers/staging/rtlwifi"
It needs a longer commit message than this. Also it probably needs to
be tested. I tried for about 10 seconds to find which patch you were
referring that updated staging/rtlwifi but I gave up. What is the git
hash and subject?
regards,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-02-07 10:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-06 13:39 [PATCH] Resolve RF Type mismatch Kangmin Park
2018-02-06 14:37 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2018-02-06 15:57 Kangmin Park
2018-02-06 16:08 ` Bastien Nocera
2018-02-06 16:31 ` Kangmin Park
2018-02-07 10:58 ` Dan Carpenter
2018-02-07 10:51 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.