mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
ANDROID: always add the struct wireless_dev * to struct net_device
When Android moved the wifi drivers to be a vendor driver, it disabled
CFG80211 from the build configuration, yet that needs to be enabled in
the vendor module build. As the struct net_device is defined in the
core kernel image, both builds needs to have the same structure size, so
always enable it in the structure and protect any potential vendor
changes from showing up in the CRC checker by maing it a void * as far
as it is concerned.
Also update the kernel abi definition to resolve this:
function symbol 'int ___pskb_trim(struct sk_buff*, unsigned int)' changed
CRC changed from 0x3d8e01bc to 0x6c6bbe0a
function symbol 'struct sk_buff* __alloc_skb(unsigned int, gfp_t, int, int)' changed
CRC changed from 0x35a57bd5 to 0xd9823116
function symbol 'int __dev_change_net_namespace(struct net_device*, struct net*, const char*, int)' changed
CRC changed from 0x8bc2389e to 0x1c3133b9
... 823 omitted; 826 symbols have only CRC changes
type 'struct net_device' changed
member 'struct wireless_dev* ieee80211_ptr' was added
17 members ('struct wpan_dev* ieee802154_ptr' .. 'struct hlist_node index_hlist') changed
offset changed by 64
Fixes: c304eddcec ("net: wrap the wireless pointers in struct net_device in an ifdef")
Change-Id: I7c2a10da63b6022abbac78a3a0d48c2fd405f42c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
committed by
William McVicker
parent
eea2369f36
commit
006d1fc450
File diff suppressed because it is too large
Load Diff
@@ -2085,7 +2085,11 @@ struct net_device {
|
||||
atomic_t carrier_up_count;
|
||||
atomic_t carrier_down_count;
|
||||
|
||||
#ifdef CONFIG_WIRELESS_EXT
|
||||
/* Android KMI hack to allow vendors to have their own wifi changes in modules */
|
||||
#ifdef __GENKSYMS__
|
||||
void *wireless_handlers;
|
||||
void *wireless_data;
|
||||
#else
|
||||
const struct iw_handler_def *wireless_handlers;
|
||||
struct iw_public_data *wireless_data;
|
||||
#endif
|
||||
@@ -2165,9 +2169,13 @@ struct net_device {
|
||||
#if IS_ENABLED(CONFIG_AX25)
|
||||
void *ax25_ptr;
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_CFG80211)
|
||||
/* Android KMI hack to allow vendors to have their own wifi changes in modules */
|
||||
#ifdef __GENKSYMS__
|
||||
void *ieee80211_ptr;
|
||||
#else
|
||||
struct wireless_dev *ieee80211_ptr;
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_IEEE802154) || IS_ENABLED(CONFIG_6LOWPAN)
|
||||
struct wpan_dev *ieee802154_ptr;
|
||||
#endif
|
||||
|
||||
@@ -8465,9 +8465,7 @@ int cfg80211_register_netdevice(struct net_device *dev);
|
||||
*/
|
||||
static inline void cfg80211_unregister_netdevice(struct net_device *dev)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_CFG80211)
|
||||
cfg80211_unregister_wdev(dev->ieee80211_ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -308,11 +308,9 @@ static bool batadv_is_cfg80211_netdev(struct net_device *net_device)
|
||||
if (!net_device)
|
||||
return false;
|
||||
|
||||
#if IS_ENABLED(CONFIG_CFG80211)
|
||||
/* cfg80211 drivers have to set ieee80211_ptr */
|
||||
if (net_device->ieee80211_ptr)
|
||||
return true;
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -758,14 +758,10 @@ static const struct attribute_group wireless_group = {
|
||||
|
||||
static bool wireless_group_needed(struct net_device *ndev)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_CFG80211)
|
||||
if (ndev->ieee80211_ptr)
|
||||
return true;
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_WIRELESS_EXT)
|
||||
if (ndev->wireless_handlers)
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user