|
@@ -99,7 +99,7 @@ static int iwl_mvm_find_free_sta_id(struct iwl_mvm *mvm,
|
|
|
int iwl_mvm_sta_send_to_fw(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|
|
bool update)
|
|
|
{
|
|
|
- struct iwl_mvm_sta *mvm_sta = (void *)sta->drv_priv;
|
|
|
+ struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
|
|
|
struct iwl_mvm_add_sta_cmd add_sta_cmd = {
|
|
|
.sta_id = mvm_sta->sta_id,
|
|
|
.mac_id_n_color = cpu_to_le32(mvm_sta->mac_id_n_color),
|
|
@@ -259,7 +259,7 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm,
|
|
|
struct ieee80211_sta *sta)
|
|
|
{
|
|
|
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
|
|
- struct iwl_mvm_sta *mvm_sta = (void *)sta->drv_priv;
|
|
|
+ struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
|
|
|
int i, ret, sta_id;
|
|
|
|
|
|
lockdep_assert_held(&mvm->mutex);
|
|
@@ -481,7 +481,7 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm,
|
|
|
struct ieee80211_sta *sta)
|
|
|
{
|
|
|
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
|
|
- struct iwl_mvm_sta *mvm_sta = (void *)sta->drv_priv;
|
|
|
+ struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
|
|
|
int ret;
|
|
|
|
|
|
lockdep_assert_held(&mvm->mutex);
|
|
@@ -774,7 +774,7 @@ int iwl_mvm_rm_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
|
|
int iwl_mvm_sta_rx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|
|
int tid, u16 ssn, bool start)
|
|
|
{
|
|
|
- struct iwl_mvm_sta *mvm_sta = (void *)sta->drv_priv;
|
|
|
+ struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
|
|
|
struct iwl_mvm_add_sta_cmd cmd = {};
|
|
|
int ret;
|
|
|
u32 status;
|
|
@@ -834,7 +834,7 @@ int iwl_mvm_sta_rx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|
|
static int iwl_mvm_sta_tx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|
|
int tid, u8 queue, bool start)
|
|
|
{
|
|
|
- struct iwl_mvm_sta *mvm_sta = (void *)sta->drv_priv;
|
|
|
+ struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
|
|
|
struct iwl_mvm_add_sta_cmd cmd = {};
|
|
|
int ret;
|
|
|
u32 status;
|
|
@@ -1147,7 +1147,7 @@ static u8 iwl_mvm_get_key_sta_id(struct ieee80211_vif *vif,
|
|
|
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
|
|
|
|
|
if (sta) {
|
|
|
- struct iwl_mvm_sta *mvm_sta = (void *)sta->drv_priv;
|
|
|
+ struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
|
|
|
|
|
|
return mvm_sta->sta_id;
|
|
|
}
|