Print this page
7154 arn(7D) walks out of bounds when byteswapping the 4K eeprom
7152 weird condition in arn(7D) needs clarification
7153 delete unused code in arn(7D)
7155 arn(7D) should include the mac fields in the eeprom enumeration

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/arn/arn_xmit.c
          +++ new/usr/src/uts/common/io/arn/arn_xmit.c
↓ open down ↓ 281 lines elided ↑ open up ↑
 282  282  /*
 283  283   * TODO: For frame(s) that are in the retry state, we will reuse the
 284  284   * sequence number(s) without setting the retry bit. The
 285  285   * alternative is to give up on these and BAR the receiver's window
 286  286   * forward.
 287  287   */
 288  288  static void
 289  289  arn_tid_drain(struct arn_softc *sc,
 290  290      struct ath_txq *txq,
 291  291      struct ath_atx_tid *tid)
 292      -
 293  292  {
 294  293          struct ath_buf *bf;
 295  294  
 296  295          list_t list;
 297  296          list_create(&list, sizeof (struct ath_buf),
 298  297              offsetof(struct ath_buf, bf_node));
 299  298  
 300  299          for (;;) {
 301  300                  if (list_empty(&tid->buf_q))
 302  301                          break;
↓ open down ↓ 837 lines elided ↑ open up ↑
1140 1139                  *txq->axq_link = bf->bf_daddr;
1141 1140                  ARN_DBG((ARN_DBG_XMIT, "link[%u] (%p)=%llx (%p)\n",
1142 1141                      txq->axq_qnum, txq->axq_link,
1143 1142                      ito64(bf->bf_daddr), bf->bf_desc));
1144 1143          }
1145 1144          txq->axq_link = &(bf->bf_lastbf->bf_desc->ds_link);
1146 1145          ath9k_hw_txstart(sc->sc_ah, txq->axq_qnum);
1147 1146  }
1148 1147  #endif /* ARN_TX_AGGREGATION */
1149 1148  
1150      -/*
1151      - * ath_pkt_dur - compute packet duration (NB: not NAV)
1152      - * rix - rate index
1153      - * pktlen - total bytes (delims + data + fcs + pads + pad delims)
1154      - * width  - 0 for 20 MHz, 1 for 40 MHz
1155      - * half_gi - to use 4us v/s 3.6 us for symbol time
1156      - */
1157      -
1158      -static uint32_t
1159      -/* LINTED E_STATIC_UNUSED */
1160      -arn_pkt_duration(struct arn_softc *sc, uint8_t rix, struct ath_buf *bf,
1161      -    int width, int half_gi, boolean_t shortPreamble)
1162      -{
1163      -        struct ath_rate_table *rate_table = sc->sc_currates;
1164      -        uint32_t nbits, nsymbits, duration, nsymbols;
1165      -        uint8_t rc;
1166      -        int streams, pktlen;
1167      -
1168      -        pktlen = bf_isaggr(bf) ? bf->bf_al : bf->bf_frmlen;
1169      -        rc = rate_table->info[rix].ratecode;
1170      -
1171      -        /* for legacy rates, use old function to compute packet duration */
1172      -        if (!IS_HT_RATE(rc))
1173      -                return (ath9k_hw_computetxtime(sc->sc_ah, rate_table, pktlen,
1174      -                    rix, shortPreamble));
1175      -
1176      -        /* find number of symbols: PLCP + data */
1177      -        nbits = (pktlen << 3) + OFDM_PLCP_BITS;
1178      -        nsymbits = bits_per_symbol[HT_RC_2_MCS(rc)][width];
1179      -        nsymbols = (nbits + nsymbits - 1) / nsymbits;
1180      -
1181      -        if (!half_gi)
1182      -                duration = SYMBOL_TIME(nsymbols);
1183      -        else
1184      -                duration = SYMBOL_TIME_HALFGI(nsymbols);
1185      -
1186      -        /* addup duration for legacy/ht training and signal fields */
1187      -        streams = HT_RC_2_STREAMS(rc);
1188      -        duration += L_STF + L_LTF + L_SIG + HT_SIG + HT_STF + HT_LTF(streams);
1189      -
1190      -        return (duration);
1191      -}
1192      -
1193 1149  static struct ath_buf *
1194 1150  arn_tx_get_buffer(struct arn_softc *sc)
1195 1151  {
1196 1152          struct ath_buf *bf = NULL;
1197 1153  
1198 1154          mutex_enter(&sc->sc_txbuflock);
1199 1155          bf = list_head(&sc->sc_txbuf_list);
1200 1156          /* Check if a tx buffer is available */
1201 1157          if (bf != NULL)
1202 1158                  list_remove(&sc->sc_txbuf_list, bf);
↓ open down ↓ 122 lines elided ↑ open up ↑
1325 1281          /* addup duration for legacy/ht training and signal fields */
1326 1282          streams = HT_RC_2_STREAMS(rc);
1327 1283          duration += L_STF + L_LTF + L_SIG + HT_SIG + HT_STF + HT_LTF(streams);
1328 1284  
1329 1285          return (duration);
1330 1286  }
1331 1287  
1332 1288  /* Rate module function to set rate related fields in tx descriptor */
1333 1289  static void
1334 1290  ath_buf_set_rate(struct arn_softc *sc,
1335      -struct ath_buf *bf,
1336      -struct ieee80211_frame *wh)
     1291 +    struct ath_buf *bf,
     1292 +    struct ieee80211_frame *wh)
1337 1293  {
1338 1294          struct ath_hal *ah = sc->sc_ah;
1339 1295          struct ath_rate_table *rt;
1340 1296          struct ath_desc *ds = bf->bf_desc;
1341 1297          struct ath_desc *lastds = bf->bf_desc; /* temp workground */
1342 1298          struct ath9k_11n_rate_series series[4];
1343 1299          struct ath9k_tx_rate *rates;
1344 1300          int i, flags, rtsctsena = 0;
1345 1301          uint32_t ctsduration = 0;
1346 1302          uint8_t rix = 0, cix, ctsrate = 0;
↓ open down ↓ 1130 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX