mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-30 19:06:14 +00:00
mac80211: remove local pointer from rate_ctrl_ref
This pointer really isn't needed, so remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
2fb51c3581
commit
a858958b68
2 changed files with 5 additions and 6 deletions
|
@ -208,7 +208,6 @@ static struct rate_control_ref *rate_control_alloc(const char *name,
|
||||||
ref = kmalloc(sizeof(struct rate_control_ref), GFP_KERNEL);
|
ref = kmalloc(sizeof(struct rate_control_ref), GFP_KERNEL);
|
||||||
if (!ref)
|
if (!ref)
|
||||||
return NULL;
|
return NULL;
|
||||||
ref->local = local;
|
|
||||||
ref->ops = ieee80211_rate_control_ops_get(name);
|
ref->ops = ieee80211_rate_control_ops_get(name);
|
||||||
if (!ref->ops)
|
if (!ref->ops)
|
||||||
goto free;
|
goto free;
|
||||||
|
@ -229,13 +228,14 @@ free:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rate_control_free(struct rate_control_ref *ctrl_ref)
|
static void rate_control_free(struct ieee80211_local *local,
|
||||||
|
struct rate_control_ref *ctrl_ref)
|
||||||
{
|
{
|
||||||
ctrl_ref->ops->free(ctrl_ref->priv);
|
ctrl_ref->ops->free(ctrl_ref->priv);
|
||||||
|
|
||||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||||
debugfs_remove_recursive(ctrl_ref->local->debugfs.rcdir);
|
debugfs_remove_recursive(local->debugfs.rcdir);
|
||||||
ctrl_ref->local->debugfs.rcdir = NULL;
|
local->debugfs.rcdir = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
kfree(ctrl_ref);
|
kfree(ctrl_ref);
|
||||||
|
@ -936,6 +936,6 @@ void rate_control_deinitialize(struct ieee80211_local *local)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
local->rate_ctrl = NULL;
|
local->rate_ctrl = NULL;
|
||||||
rate_control_free(ref);
|
rate_control_free(local, ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#include "driver-ops.h"
|
#include "driver-ops.h"
|
||||||
|
|
||||||
struct rate_control_ref {
|
struct rate_control_ref {
|
||||||
struct ieee80211_local *local;
|
|
||||||
const struct rate_control_ops *ops;
|
const struct rate_control_ops *ops;
|
||||||
void *priv;
|
void *priv;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue