Fix brokenness in tx path. Eliminate the 'offchannel_work()' mess.
This commit is contained in:
parent
a0ef4c6652
commit
3d4c06a921
|
@ -253,7 +253,6 @@ struct cw1200_common {
|
|||
bool join_pending;
|
||||
struct delayed_work join_timeout;
|
||||
struct work_struct unjoin_work;
|
||||
struct work_struct offchannel_work;
|
||||
struct work_struct join_complete_work;
|
||||
int join_complete_status;
|
||||
int join_dtim_period;
|
||||
|
|
|
@ -353,7 +353,6 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr,
|
|||
|
||||
INIT_DELAYED_WORK(&priv->join_timeout, cw1200_join_timeout);
|
||||
INIT_WORK(&priv->unjoin_work, cw1200_unjoin_work);
|
||||
INIT_WORK(&priv->offchannel_work, cw1200_offchannel_work);
|
||||
INIT_WORK(&priv->join_complete_work, cw1200_join_complete_work);
|
||||
INIT_WORK(&priv->wep_key_work, cw1200_wep_key_work);
|
||||
INIT_WORK(&priv->tx_policy_upload_work, tx_policy_upload_work);
|
||||
|
|
|
@ -1099,27 +1099,6 @@ int cw1200_setup_mac(struct cw1200_common *priv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void cw1200_offchannel_work(struct work_struct *work)
|
||||
{
|
||||
struct cw1200_common *priv =
|
||||
container_of(work, struct cw1200_common, offchannel_work);
|
||||
u8 queue_id = cw1200_queue_get_queue_id(priv->pending_frame_id);
|
||||
struct cw1200_queue *queue = &priv->tx_queue[queue_id];
|
||||
|
||||
mutex_lock(&priv->conf_mutex);
|
||||
if (!priv->join_status) {
|
||||
wsm_flush_tx(priv);
|
||||
cw1200_update_listening(priv, true);
|
||||
cw1200_update_filtering(priv);
|
||||
}
|
||||
if (!priv->join_status)
|
||||
cw1200_queue_remove(queue, priv->pending_frame_id);
|
||||
else
|
||||
cw1200_queue_requeue(queue, priv->pending_frame_id);
|
||||
mutex_unlock(&priv->conf_mutex);
|
||||
wsm_unlock_tx(priv);
|
||||
}
|
||||
|
||||
static void cw1200_join_complete(struct cw1200_common *priv)
|
||||
{
|
||||
pr_debug("[STA] Join complete (%d)\n", priv->join_complete_status);
|
||||
|
|
|
@ -73,7 +73,6 @@ void cw1200_tx_failure_work(struct work_struct *work);
|
|||
int cw1200_setup_mac(struct cw1200_common *priv);
|
||||
void cw1200_join_timeout(struct work_struct *work);
|
||||
void cw1200_unjoin_work(struct work_struct *work);
|
||||
void cw1200_offchannel_work(struct work_struct *work);
|
||||
void cw1200_join_complete_work(struct work_struct *work);
|
||||
void cw1200_wep_key_work(struct work_struct *work);
|
||||
void cw1200_update_listening(struct cw1200_common *priv, bool enabled);
|
||||
|
|
|
@ -1520,7 +1520,6 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv,
|
|||
enum {
|
||||
do_probe,
|
||||
do_drop,
|
||||
do_offchannel,
|
||||
do_wep,
|
||||
do_tx,
|
||||
} action = do_tx;
|
||||
|
@ -1531,8 +1530,6 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv,
|
|||
action = do_tx;
|
||||
else if (priv->join_status < CW1200_JOIN_STATUS_PRE_STA)
|
||||
action = do_drop;
|
||||
else if (memcmp(frame->addr3, priv->vif->bss_conf.bssid, ETH_ALEN))
|
||||
action = do_offchannel; /* TODO: What is this for? */
|
||||
break;
|
||||
case NL80211_IFTYPE_AP:
|
||||
if (!priv->join_status) {
|
||||
|
@ -1578,14 +1575,11 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv,
|
|||
if (queue_work(priv->workqueue,
|
||||
&priv->unjoin_work) <= 0)
|
||||
wsm_unlock_tx(priv);
|
||||
} else if ((fctl & __cpu_to_le16(IEEE80211_FCTL_PROTECTED)) &&
|
||||
} else if (ieee80211_has_protected(fctl) &&
|
||||
tx_info->control.hw_key &&
|
||||
tx_info->control.hw_key->keyidx !=
|
||||
priv->wep_default_key_id &&
|
||||
(tx_info->control.hw_key->cipher ==
|
||||
WLAN_CIPHER_SUITE_WEP40 ||
|
||||
tx_info->control.hw_key->cipher ==
|
||||
WLAN_CIPHER_SUITE_WEP104)) {
|
||||
tx_info->control.hw_key->keyidx != priv->wep_default_key_id &&
|
||||
(tx_info->control.hw_key->cipher == WLAN_CIPHER_SUITE_WEP40 ||
|
||||
tx_info->control.hw_key->cipher == WLAN_CIPHER_SUITE_WEP104)) {
|
||||
action = do_wep;
|
||||
}
|
||||
}
|
||||
|
@ -1610,14 +1604,6 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv,
|
|||
__le32_to_cpu(wsm->packet_id)));
|
||||
handled = true;
|
||||
break;
|
||||
case do_offchannel:
|
||||
pr_debug("[WSM] Offchannel TX request.\n");
|
||||
wsm_lock_tx_async(priv);
|
||||
priv->pending_frame_id = __le32_to_cpu(wsm->packet_id);
|
||||
if (queue_work(priv->workqueue, &priv->offchannel_work) <= 0)
|
||||
wsm_unlock_tx(priv);
|
||||
handled = true;
|
||||
break;
|
||||
case do_wep:
|
||||
pr_debug("[WSM] Issue set_default_wep_key.\n");
|
||||
wsm_lock_tx_async(priv);
|
||||
|
|
Loading…
Reference in New Issue