From: Vasanthakumar Thiagarajan Date: Tue, 28 Feb 2012 14:50:22 +0000 (+0530) Subject: ath6kl: Skip vif index validation in ath6kl_rx() for wmi events X-Git-Tag: mmc-merge-for-3.4-rc1~67^2~48^2~55^2~32 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=81db48dc295e16aced8ece912098fda078b1ba8c;p=uclinux-h8%2Flinux.git ath6kl: Skip vif index validation in ath6kl_rx() for wmi events When the wmi event is vif specific, the validation of vif index is taken care in ath6kl_wmi_proc_events_iface(). This also avoids the need for a netdev to be registered while receiving initial events like "target_ready" and "regulatory domain". Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index 802291346d30..6754441105ef 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -1298,7 +1298,15 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) skb_put(skb, packet->act_len + HTC_HDR_LENGTH); skb_pull(skb, HTC_HDR_LENGTH); + ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, "rx ", + skb->data, skb->len); + if (ept == ar->ctrl_ep) { + if (test_bit(WMI_ENABLED, &ar->flag)) { + ath6kl_check_wow_status(ar); + ath6kl_wmi_control_rx(ar->wmi, skb); + return; + } if_idx = wmi_cmd_hdr_get_if_idx((struct wmi_cmd_hdr *) skb->data); } else { @@ -1323,10 +1331,6 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) spin_unlock_bh(&vif->if_lock); - - ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, "rx ", - skb->data, skb->len); - skb->dev = vif->ndev; if (!test_bit(WMI_ENABLED, &ar->flag)) { @@ -1338,11 +1342,6 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) ath6kl_check_wow_status(ar); - if (ept == ar->ctrl_ep) { - ath6kl_wmi_control_rx(ar->wmi, skb); - return; - } - min_hdr_len = sizeof(struct ethhdr) + sizeof(struct wmi_data_hdr) + sizeof(struct ath6kl_llc_snap_hdr);