neurobin / MT7630E

Modified easy installation package

Home Page:https://neurobin.org/projects/softwares/unix/MT7630E/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2 patches for 4.12.0 and above

CaptainBloodz opened this issue · comments

diff -u MT7630E-release/rt2x00/rt2x00dev.c MT7630E-release-patched/rt2x00/rt2x00dev.c
--- MT7630E-release/rt2x00/rt2x00dev.c 2017-04-07 09:43:06.000000000 +0300
+++ MT7630E-release-patched/rt2x00/rt2x00dev.c 2017-07-03 15:06:48.799948720 +0300
@@ -787,9 +787,15 @@
* Translate the signal to the correct bitrate index.
*/
rate_idx = rt2x00lib_rxdone_read_signal(rt2x00dev, &rxdesc);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)

  • if (rxdesc.rate_mode == RATE_MODE_HT_MIX ||
  •   rxdesc.rate_mode == RATE_MODE_HT_GREENFIELD)
    
  •   rxdesc.flags |= RX_FLAG_AMPDU_DETAILS;
    

+#else
if (rxdesc.rate_mode == RATE_MODE_HT_MIX ||
rxdesc.rate_mode == RATE_MODE_HT_GREENFIELD)
rxdesc.flags |= RX_FLAG_HT;
+#endif

diff -u MT7630E-release/rt2x00/rt2800lib.c MT7630E-release-patched/rt2x00/rt2800lib.c
--- MT7630E-release/rt2x00/rt2800lib.c 2017-04-07 09:43:06.000000000 +0300
+++ MT7630E-release-patched/rt2x00/rt2800lib.c 2017-07-03 16:31:21.920024864 +0300
@@ -1926,10 +1926,18 @@
//rt2x00_desc_read(rxwi, 1, &word);

	if (pRxWI->RxWISGI)
  •   	rxdesc->flags |= RX_FLAG_SHORT_GI;
    

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)

  •   	rxdesc->flags |= RX_FLAG_DUP_VALIDATED;
    

+#else

  •                    rxdesc->flags |= RX_FLAG_SHORT_GI;
    

+#endif

	if (pRxWI->RxWIBW)
  •   	rxdesc->flags |= RX_FLAG_40MHZ;
    

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)

  •   	rxdesc->flags |= RX_FLAG_PN_VALIDATED;
    

+#else

  •                    rxdesc->flags |= RX_FLAG_40MHZ;
    

+#endif

	/*
	 * Detect RX rate, always use MCS as signal type.

@@ -2004,10 +2012,18 @@
rt2x00_desc_read(rxwi, 1, &word);

	if (rt2x00_get_field32(word, RXWI_W1_SHORT_GI))

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)

  •   	rxdesc->flags |= RX_FLAG_DUP_VALIDATED;
    

+#else
rxdesc->flags |= RX_FLAG_SHORT_GI;
+#endif

	if (rt2x00_get_field32(word, RXWI_W1_BW))

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)

  •   	rxdesc->flags |= RX_FLAG_PN_VALIDATED;
    

+#else
rxdesc->flags |= RX_FLAG_40MHZ;
+#endif

	/*
	 * Detect RX rate, always use MCS as signal type.

Why don't you submit your fix as a pull req? I'd love it