libertas: fix misuse of netdev_priv() and dev->ml_priv
The mesh and radiotap interfaces need to use the same private data as the main wifi interface. If the main wifi interface uses netdev_priv(), but the other interfaces ->ml_priv, there's no way to figure out where the private data actually is in the WEXT handlers and netdevice callbacks. So make everything use ->ml_priv. Fixes botched netdev_priv() conversion introduced by "netdevice libertas: Fix directly reference of netdev->priv", though admittedly libertas' use of ->priv was somewhat "special". Signed-off-by: Kiran Divekar <dkiran@marvell.com> Acked-by: Dan Williams <dcbw@redhat.com> Tested-by: Chris Ball <cjb@laptop.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
0c9a3aaaf3
commit
ab65f649d3
@@ -23,7 +23,7 @@ static const char * mesh_stat_strings[]= {
|
||||
static void lbs_ethtool_get_drvinfo(struct net_device *dev,
|
||||
struct ethtool_drvinfo *info)
|
||||
{
|
||||
struct lbs_private *priv = netdev_priv(dev);
|
||||
struct lbs_private *priv = dev->ml_priv;
|
||||
|
||||
snprintf(info->fw_version, 32, "%u.%u.%u.p%u",
|
||||
priv->fwrelease >> 24 & 0xff,
|
||||
@@ -47,7 +47,7 @@ static int lbs_ethtool_get_eeprom_len(struct net_device *dev)
|
||||
static int lbs_ethtool_get_eeprom(struct net_device *dev,
|
||||
struct ethtool_eeprom *eeprom, u8 * bytes)
|
||||
{
|
||||
struct lbs_private *priv = netdev_priv(dev);
|
||||
struct lbs_private *priv = dev->ml_priv;
|
||||
struct cmd_ds_802_11_eeprom_access cmd;
|
||||
int ret;
|
||||
|
||||
@@ -76,7 +76,7 @@ out:
|
||||
static void lbs_ethtool_get_stats(struct net_device *dev,
|
||||
struct ethtool_stats *stats, uint64_t *data)
|
||||
{
|
||||
struct lbs_private *priv = netdev_priv(dev);
|
||||
struct lbs_private *priv = dev->ml_priv;
|
||||
struct cmd_ds_mesh_access mesh_access;
|
||||
int ret;
|
||||
|
||||
@@ -113,7 +113,7 @@ static void lbs_ethtool_get_stats(struct net_device *dev,
|
||||
|
||||
static int lbs_ethtool_get_sset_count(struct net_device *dev, int sset)
|
||||
{
|
||||
struct lbs_private *priv = netdev_priv(dev);
|
||||
struct lbs_private *priv = dev->ml_priv;
|
||||
|
||||
if (sset == ETH_SS_STATS && dev == priv->mesh_dev)
|
||||
return MESH_STATS_NUM;
|
||||
@@ -143,7 +143,7 @@ static void lbs_ethtool_get_strings(struct net_device *dev,
|
||||
static void lbs_ethtool_get_wol(struct net_device *dev,
|
||||
struct ethtool_wolinfo *wol)
|
||||
{
|
||||
struct lbs_private *priv = netdev_priv(dev);
|
||||
struct lbs_private *priv = dev->ml_priv;
|
||||
|
||||
if (priv->wol_criteria == 0xffffffff) {
|
||||
/* Interface driver didn't configure wake */
|
||||
@@ -166,7 +166,7 @@ static void lbs_ethtool_get_wol(struct net_device *dev,
|
||||
static int lbs_ethtool_set_wol(struct net_device *dev,
|
||||
struct ethtool_wolinfo *wol)
|
||||
{
|
||||
struct lbs_private *priv = netdev_priv(dev);
|
||||
struct lbs_private *priv = dev->ml_priv;
|
||||
uint32_t criteria = 0;
|
||||
|
||||
if (priv->wol_criteria == 0xffffffff && wol->wolopts)
|
||||
|
Reference in New Issue
Block a user