summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-01-01 21:33:49 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2014-01-18 13:42:36 +0100
commitc3caeafbdcace481c54f07e13c64b1d7641cd307 (patch)
tree2f5cdbc9541e237998cb54fd5968ac0a2361f5fd /patches/collateral-evolutions
parentfeca33a9907fd990dbe413f3e919075592916873 (diff)
backports: remove usage of members of struct property for kernel < 2.6.39
struct property is missing in the general header files in older kernel versions. There are different versions of this header depending on the architecture code in use. This removed the access to any members of struct property for older kernel version when CONFIG_OF is not set. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'patches/collateral-evolutions')
-rw-r--r--patches/collateral-evolutions/network/82-struct_property_missing/INFO4
-rw-r--r--patches/collateral-evolutions/network/82-struct_property_missing/mwifiex.patch28
2 files changed, 32 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/82-struct_property_missing/INFO b/patches/collateral-evolutions/network/82-struct_property_missing/INFO
new file mode 100644
index 00000000..b3e0ced8
--- /dev/null
+++ b/patches/collateral-evolutions/network/82-struct_property_missing/INFO
@@ -0,0 +1,4 @@
+struct property is missing in the general header files in older kernel
+versions. There are different versions of this header depending on the
+architecture code in use. This removed the access to any members of
+struct property
diff --git a/patches/collateral-evolutions/network/82-struct_property_missing/mwifiex.patch b/patches/collateral-evolutions/network/82-struct_property_missing/mwifiex.patch
new file mode 100644
index 00000000..d3712db0
--- /dev/null
+++ b/patches/collateral-evolutions/network/82-struct_property_missing/mwifiex.patch
@@ -0,0 +1,28 @@
+--- a/drivers/net/wireless/mwifiex/sta_cmd.c
++++ b/drivers/net/wireless/mwifiex/sta_cmd.c
+@@ -25,6 +25,7 @@
+ #include "wmm.h"
+ #include "11n.h"
+ #include "11ac.h"
++#include <linux/of.h>
+
+ /*
+ * This function prepares command to set/get RSSI information.
+@@ -1194,6 +1195,7 @@ static int mwifiex_cmd_cfg_data(struct m
+ int ret;
+
+ if (prop) {
++#if defined(CONFIG_OF) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+ len = prop->length;
+ ret = of_property_read_u8_array(adapter->dt_node, prop->name,
+ data, len);
+@@ -1201,6 +1203,9 @@ static int mwifiex_cmd_cfg_data(struct m
+ return ret;
+ dev_dbg(adapter->dev,
+ "download cfg_data from device tree: %s\n", prop->name);
++#else
++ return -1;
++#endif
+ } else if (adapter->cal_data->data && adapter->cal_data->size > 0) {
+ len = mwifiex_parse_cal_cfg((u8 *)adapter->cal_data->data,
+ adapter->cal_data->size, data);