Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183355
b: refs/heads/master
c: 7dc6a7a
h: refs/heads/master
i:
  183353: 5c509db
  183351: b159183
v: v3
  • Loading branch information
Lennert Buytenhek authored and John W. Linville committed Dec 28, 2009
1 parent 660abbc commit 3fd8826
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97474782959af87f5dc8049fca3bd3b25eb68308
refs/heads/master: 7dc6a7a7635365b140af969e972900866d0bf34b
38 changes: 16 additions & 22 deletions trunk/drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,11 @@ struct mwl8k_priv {

/* Per interface specific private data */
struct mwl8k_vif {
/* BSS config of AP or IBSS from mac80211*/
struct ieee80211_bss_conf bss_info;
/* Local MAC address. */
u8 mac_addr[ETH_ALEN];

/* BSSID of AP or IBSS */
u8 bssid[ETH_ALEN];
u8 mac_addr[ETH_ALEN];
/* BSSID of AP. */
u8 bssid[ETH_ALEN];

/* Index into station database. Returned by UPDATE_STADB. */
u8 peer_id;
Expand Down Expand Up @@ -2123,7 +2122,6 @@ static int
mwl8k_cmd_set_aid(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{
struct mwl8k_vif *mv_vif = MWL8K_VIF(vif);
struct ieee80211_bss_conf *info = &mv_vif->bss_info;
struct mwl8k_cmd_update_set_aid *cmd;
u16 prot_mode;
int rc;
Expand All @@ -2134,14 +2132,14 @@ mwl8k_cmd_set_aid(struct ieee80211_hw *hw, struct ieee80211_vif *vif)

cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_AID);
cmd->header.length = cpu_to_le16(sizeof(*cmd));
cmd->aid = cpu_to_le16(info->aid);
cmd->aid = cpu_to_le16(vif->bss_conf.aid);

memcpy(cmd->bssid, mv_vif->bssid, ETH_ALEN);

if (info->use_cts_prot) {
if (vif->bss_conf.use_cts_prot) {
prot_mode = MWL8K_FRAME_PROT_11G;
} else {
switch (info->ht_operation_mode &
switch (vif->bss_conf.ht_operation_mode &
IEEE80211_HT_OP_MODE_PROTECTION) {
case IEEE80211_HT_OP_MODE_PROTECTION_20MHZ:
prot_mode = MWL8K_FRAME_PROT_11N_HT_40MHZ_ONLY;
Expand Down Expand Up @@ -2651,7 +2649,6 @@ static int mwl8k_cmd_update_stadb(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, __u32 action)
{
struct mwl8k_vif *mv_vif = MWL8K_VIF(vif);
struct ieee80211_bss_conf *info = &mv_vif->bss_info;
struct mwl8k_cmd_update_stadb *cmd;
struct peer_capability_info *peer_info;
int rc;
Expand All @@ -2672,7 +2669,8 @@ static int mwl8k_cmd_update_stadb(struct ieee80211_hw *hw,
case MWL8K_STA_DB_MODIFY_ENTRY:
/* Build peer_info block */
peer_info->peer_type = MWL8K_PEER_TYPE_ACCESSPOINT;
peer_info->basic_caps = cpu_to_le16(info->assoc_capability);
peer_info->basic_caps =
cpu_to_le16(vif->bss_conf.assoc_capability);
memcpy(peer_info->legacy_rates, mwl8k_rateids,
sizeof(mwl8k_rateids));
peer_info->interop = 1;
Expand Down Expand Up @@ -2960,11 +2958,8 @@ static void mwl8k_bss_info_changed(struct ieee80211_hw *hw,
if (rc)
return;

if (info->assoc) {
memcpy(&mwl8k_vif->bss_info, info,
sizeof(struct ieee80211_bss_conf));

memcpy(mwl8k_vif->bssid, info->bssid, ETH_ALEN);
if (vif->bss_conf.assoc) {
memcpy(mwl8k_vif->bssid, vif->bss_conf.bssid, ETH_ALEN);

/* Install rates */
rc = mwl8k_cmd_set_rate(hw, vif);
Expand All @@ -2978,12 +2973,13 @@ static void mwl8k_bss_info_changed(struct ieee80211_hw *hw,
goto out;

/* Set radio preamble */
rc = mwl8k_set_radio_preamble(hw, info->use_short_preamble);
rc = mwl8k_set_radio_preamble(hw,
vif->bss_conf.use_short_preamble);
if (rc)
goto out;

/* Set slot time */
rc = mwl8k_cmd_set_slot(hw, info->use_short_slot);
rc = mwl8k_cmd_set_slot(hw, vif->bss_conf.use_short_slot);
if (rc)
goto out;

Expand All @@ -3006,8 +3002,6 @@ static void mwl8k_bss_info_changed(struct ieee80211_hw *hw,
priv->capture_beacon = true;
} else {
rc = mwl8k_cmd_update_stadb(hw, vif, MWL8K_STA_DB_DEL_ENTRY);
memset(&mwl8k_vif->bss_info, 0,
sizeof(struct ieee80211_bss_conf));
memset(mwl8k_vif->bssid, 0, ETH_ALEN);
}

Expand Down Expand Up @@ -3239,9 +3233,9 @@ static void mwl8k_finalize_join_worker(struct work_struct *work)
struct mwl8k_priv *priv =
container_of(work, struct mwl8k_priv, finalize_join_worker);
struct sk_buff *skb = priv->beacon_skb;
u8 dtim = MWL8K_VIF(priv->vif)->bss_info.dtim_period;

mwl8k_cmd_finalize_join(priv->hw, skb->data, skb->len, dtim);
mwl8k_cmd_finalize_join(priv->hw, skb->data, skb->len,
priv->vif->bss_conf.dtim_period);
dev_kfree_skb(skb);

priv->beacon_skb = NULL;
Expand Down

0 comments on commit 3fd8826

Please sign in to comment.