X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=inline;f=target_firmware%2Fwlan%2Fif_ath.c;h=93e00c522990abb9e17861e4f3d682a85e25ad4f;hb=16998c7f8ef070f1382e3ddf19f54d609f0458fe;hp=789725baa21d98239856f0aacbe6bbf16886288d;hpb=8804cc94e3b66550797279f540b960d18a78421f;p=open-ath9k-htc-firmware.git diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c index 789725b..93e00c5 100755 --- a/target_firmware/wlan/if_ath.c +++ b/target_firmware/wlan/if_ath.c @@ -1,3 +1,38 @@ +/* + * Copyright (c) 2013 Qualcomm Atheros, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted (subject to the limitations in the + * disclaimer below) provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Qualcomm Atheros nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE + * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT + * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #include #include #include @@ -345,7 +380,7 @@ static void ath_uapsd_processtriggers(struct ath_softc_tgt *sc) break; } - if (ds->ds_link == NULL) { + if (ds->ds_link == 0) { break; } @@ -450,7 +485,6 @@ static void ath_tgt_rx_tasklet(TQUEUE_ARG data) struct ath_rx_buf *bf = NULL; struct ath_hal *ah = sc->sc_ah; struct rx_frame_header *rxhdr; - struct ieee80211_frame *wh; struct ath_rx_status *rxstats; adf_nbuf_t skb = ADF_NBUF_NULL; @@ -484,7 +518,6 @@ static void ath_tgt_rx_tasklet(TQUEUE_ARG data) HTC_SendMsg(sc->tgt_htc_handle, RX_ENDPOINT_ID, skb); sc->sc_rx_stats.ast_rx_send++; - next_buf: bf->bf_status &= ~ATH_BUFSTATUS_DONE; asf_tailq_insert_tail(&sc->sc_rxbuf, bf, bf_list); @@ -509,7 +542,7 @@ static void ath_beacon_setup(struct ath_softc_tgt *sc, adf_nbuf_t skb = bf->bf_skb; struct ath_hal *ah = sc->sc_ah; struct ath_desc *ds; - a_int32_t flags, antenna; + a_int32_t flags; const HAL_RATE_TABLE *rt; a_uint8_t rix, rate; HAL_11N_RATE_SERIES series[4] = {{ 0 }}; @@ -985,7 +1018,6 @@ adf_os_irq_resp_t ath_intr(adf_drv_handle_t hdl) { struct ath_softc_tgt *sc = (struct ath_softc_tgt *)hdl; struct ath_hal *ah = sc->sc_ah; - struct ieee80211com_target *ic = &sc->sc_ic; HAL_INT status; if (sc->sc_invalid) @@ -1607,7 +1639,6 @@ static void ath_setcurmode_tgt(void *Context, A_UINT16 Command, { struct ath_softc_tgt *sc = (struct ath_softc_tgt *)Context; a_uint16_t mode; - struct ath_hal *ah = sc->sc_ah; mode= *((a_uint16_t *)data); mode = adf_os_ntohs(mode); @@ -1617,7 +1648,7 @@ static void ath_setcurmode_tgt(void *Context, A_UINT16 Command, wmi_cmd_rsp(sc->tgt_wmi_handle, Command, SeqNo, NULL, 0); } -static a_uint32_t ath_detach_tgt(void *Context, A_UINT16 Command, A_UINT16 SeqNo, +static void ath_detach_tgt(void *Context, A_UINT16 Command, A_UINT16 SeqNo, A_UINT8 *data, a_int32_t datalen) { struct ath_softc_tgt *sc = (struct ath_softc_tgt *)Context;