From c3caeafbdcace481c54f07e13c64b1d7641cd307 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Wed, 1 Jan 2014 21:33:49 +0100 Subject: [PATCH] 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 --- .../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 000000000000..b3e0ced894c6 --- /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 000000000000..d3712db03236 --- /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 + + /* + * 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); -- 2.30.2