From 716ca530e1c4515d8683c9d5be3d56b301758b66 Mon Sep 17 00:00:00 2001 From: James <> Date: Wed, 4 Nov 2015 11:49:21 +0000 Subject: trunk-47381 --- .../patches/615-rt2x00-fix_20mhz_clk.patch | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/kernel/mac80211/patches/615-rt2x00-fix_20mhz_clk.patch (limited to 'package/kernel/mac80211/patches/615-rt2x00-fix_20mhz_clk.patch') diff --git a/package/kernel/mac80211/patches/615-rt2x00-fix_20mhz_clk.patch b/package/kernel/mac80211/patches/615-rt2x00-fix_20mhz_clk.patch new file mode 100644 index 0000000..9f11862 --- /dev/null +++ b/package/kernel/mac80211/patches/615-rt2x00-fix_20mhz_clk.patch @@ -0,0 +1,29 @@ +--- a/drivers/net/wireless/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/rt2x00/rt2800lib.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include "rt2x00.h" + #include "rt2800lib.h" +@@ -8481,13 +8482,14 @@ static int rt2800_probe_rt(struct rt2x00 + + int rt2800_probe_clk(struct rt2x00_dev *rt2x00dev) + { +- struct rt2x00_platform_data *pdata = rt2x00dev->dev->platform_data; + struct hw_mode_spec *spec = &rt2x00dev->spec; ++ struct clk *clk = clk_get(rt2x00dev->dev, NULL); + +- if (!pdata) +- return -EINVAL; ++ if (IS_ERR(clk)) ++ return PTR_ERR(clk); + +- spec->clk_is_20mhz = pdata->clk_is_20mhz; ++ if (clk_get_rate(clk) == 20000000) ++ spec->clk_is_20mhz = 1; + + return 0; + } -- cgit v1.2.3