Skip to content

Commit

Permalink
ath6kl: rename vif init and cleanup functions
Browse files Browse the repository at this point in the history
ath6kl_cfg80211_vif_init/cleanup() follow more closely the style used
elsewhere in ath6kl.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Kalle Valo committed Jan 18, 2012
1 parent cd23c1c commit c25889e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
9 changes: 4 additions & 5 deletions drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ static int ath6kl_cfg80211_del_iface(struct wiphy *wiphy,

ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag));

ath6kl_deinit_if_data(vif);
ath6kl_cfg80211_vif_cleanup(vif);

return 0;
}
Expand Down Expand Up @@ -2806,7 +2806,7 @@ int ath6kl_register_ieee80211_hw(struct ath6kl *ar)
return 0;
}

static int ath6kl_init_if_data(struct ath6kl_vif *vif)
static int ath6kl_cfg80211_vif_init(struct ath6kl_vif *vif)
{
vif->aggr_cntxt = aggr_init(vif->ndev);
if (!vif->aggr_cntxt) {
Expand All @@ -2827,7 +2827,7 @@ static int ath6kl_init_if_data(struct ath6kl_vif *vif)
return 0;
}

void ath6kl_deinit_if_data(struct ath6kl_vif *vif)
void ath6kl_cfg80211_vif_cleanup(struct ath6kl_vif *vif)
{
struct ath6kl *ar = vif->ar;
struct ath6kl_mc_filter *mc_filter, *tmp;
Expand Down Expand Up @@ -2880,8 +2880,7 @@ struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name,

ath6kl_init_control_info(vif);

/* TODO: Pass interface specific pointer instead of ar */
if (ath6kl_init_if_data(vif))
if (ath6kl_cfg80211_vif_init(vif))
goto err;

if (register_netdevice(ndev))
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wireless/ath/ath6kl/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ int ath6kl_cfg80211_suspend(struct ath6kl *ar,

int ath6kl_cfg80211_resume(struct ath6kl *ar);

void ath6kl_cfg80211_vif_cleanup(struct ath6kl_vif *vif);

void ath6kl_cfg80211_stop(struct ath6kl_vif *vif);
void ath6kl_cfg80211_stop_all(struct ath6kl *ar);

Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/ath/ath6kl/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,6 @@ void ath6kl_wakeup_event(void *dev);
void ath6kl_reset_device(struct ath6kl *ar, u32 target_type,
bool wait_fot_compltn, bool cold_reset);
void ath6kl_init_control_info(struct ath6kl_vif *vif);
void ath6kl_deinit_if_data(struct ath6kl_vif *vif);
void ath6kl_core_free(struct ath6kl *ar);
struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar);
void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready);
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/wireless/ath/ath6kl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,7 @@ int ath6kl_core_init(struct ath6kl *ar)
ath6kl_htc_flush_rx_buf(ar->htc_target);
ath6kl_cleanup_amsdu_rxbufs(ar);
rtnl_lock();
ath6kl_deinit_if_data(netdev_priv(ndev));
ath6kl_cfg80211_vif_cleanup(netdev_priv(ndev));
rtnl_unlock();
wiphy_unregister(ar->wiphy);
err_debug_init:
Expand All @@ -1832,6 +1832,7 @@ int ath6kl_core_init(struct ath6kl *ar)
return ret;
}

/* FIXME: move this to cfg80211.c and rename to ath6kl_cfg80211_vif_stop() */
void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready)
{
static u8 bcast_mac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
Expand Down Expand Up @@ -1877,7 +1878,7 @@ void ath6kl_stop_txrx(struct ath6kl *ar)
spin_unlock_bh(&ar->list_lock);
ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag));
rtnl_lock();
ath6kl_deinit_if_data(vif);
ath6kl_cfg80211_vif_cleanup(vif);
rtnl_unlock();
spin_lock_bh(&ar->list_lock);
}
Expand Down

0 comments on commit c25889e

Please sign in to comment.