#20369: Xiaomi mini Wireless signal is very weak
----------------------+--------------------------------
  Reporter:  rexchou  |      Owner:  developers
      Type:  defect   |     Status:  reopened
  Priority:  high     |  Milestone:  Chaos Calmer 15.05
 Component:  kernel   |    Version:  Trunk
Resolution:           |   Keywords:
----------------------+--------------------------------

Comment (by anonymous):

 can somebody please try this patch and check 5GHz radio?


 {{{
 --- /home/ubuntu/Desktop/mt76.h 2015-10-08 20:38:26.000000000 +0200
 +++ mt76.h      2015-11-13 11:00:13.494813000 +0100
 @@ -44,6 +44,8 @@

  #define MT_CALIBRATE_INTERVAL  HZ

 +#define MT7612_GPIO_MODE_PA    13
 +
  #include "regs.h"
  #include "util.h"
  #include "mac.h"
 }}}


 {{{
 --- /home/ubuntu/Desktop/main.c 2015-10-08 20:38:26.000000000 +0200
 +++ main.c      2015-11-13 11:00:12.198807000 +0100
 @@ -12,6 +12,16 @@
   */

  #include "mt76.h"
 +#include <asm/mach-ralink/pinmux.h>
 +
 +static struct rt2880_pmx_func pa_grp[] = { FUNC("pa", 0, 13, 2) };
 +
 +static struct rt2880_pmx_group mt7612e_pinmux_data[] = {
 +       GRP("pa", pa_grp, 1, MT7612_GPIO_MODE_PA),
 +       { 0 }
 +};
 +
 +rt2880_pinmux_data = mt7612e_pinmux_data;

  static int
  mt76_start(struct ieee80211_hw *hw)
 @@ -104,7 +114,7 @@ mt76_config(struct ieee80211_hw *hw, u32
         mutex_lock(&dev->mutex);

         if (changed & IEEE80211_CONF_CHANGE_POWER) {
 -               dev->txpower_conf = hw->conf.power_level * 2;
 +               dev->txpower_conf = hw->conf.power_level;

                 if (test_bit(MT76_STATE_RUNNING, &dev->state))
                         mt76_phy_set_txpower(dev);
 @@ -389,7 +399,7 @@ mt76_get_txpower(struct ieee80211_hw *hw
  {
         struct mt76_dev *dev = hw->priv;

 -       *dbm = dev->txpower_cur / 2;
 +       *dbm = dev->txpower_cur;
         return 0;
  }

 }}}

--
Ticket URL: <https://dev.openwrt.org/ticket/20369#comment:33>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to