[PATCH 07/17] backports: remove usage of members of struct property for kernel < 2.6.39

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 .../network/82-struct_property_missing/INFO        |    4 +++
 .../82-struct_property_missing/mwifiex.patch       |   28 ++++++++++++++++++++
 2 files changed, 32 insertions(+)
 create mode 100644 patches/collateral-evolutions/network/82-struct_property_missing/INFO
 create mode 100644 patches/collateral-evolutions/network/82-struct_property_missing/mwifiex.patch

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 0000000..b3e0ced
--- /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 0000000..d3712db
--- /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);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux