Deleted Added
full compact
38c38
< __FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 122866 2003-11-17 19:15:09Z sam $");
---
> __FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 123044 2003-11-29 01:23:59Z sam $");
908c908,909
< copyout(&sc->sc_stats, ifr->ifr_data, sizeof (sc->sc_stats));
---
> error = copyout(&sc->sc_stats,
> ifr->ifr_data, sizeof (sc->sc_stats));
909a911,925
> case SIOCGATHDIAG: {
> struct ath_diag *ad = (struct ath_diag *)data;
> struct ath_hal *ah = sc->sc_ah;
> void *data;
> u_int size;
>
> if (ath_hal_getdiagstate(ah, ad->ad_id, &data, &size)) {
> if (size < ad->ad_size)
> ad->ad_size = size;
> if (data)
> error = copyout(data, ad->ad_data, ad->ad_size);
> } else
> error = EINVAL;
> break;
> }
1601a1618,1620
> #define PA2DESC(_sc, _pa) \
> ((struct ath_desc *)((caddr_t)(_sc)->sc_desc + \
> ((_pa) - (_sc)->sc_desc_paddr)))
1634c1653,1666
< status = ath_hal_rxprocdesc(ah, ds);
---
> /* XXX sync descriptor memory */
> /*
> * Must provide the virtual address of the current
> * descriptor, the physical address, and the virtual
> * address of the next descriptor in the h/w chain.
> * This allows the HAL to look ahead to see if the
> * hardware is done with a descriptor by checking the
> * done bit in the following descriptor and the address
> * of the current descriptor the DMA engine is working
> * on. All this is necessary because of our use of
> * a self-linked list to avoid rx overruns.
> */
> status = ath_hal_rxprocdesc(ah, ds,
> bf->bf_daddr, PA2DESC(sc, ds->ds_link));
1768a1801
> #undef PA2DESC
2239a2273,2275
> #define PA2DESC(_sc, _pa) \
> ((struct ath_desc *)((caddr_t)(_sc)->sc_desc + \
> ((_pa) - (_sc)->sc_desc_paddr)))
2253c2289,2291
< if (ath_hal_rxprocdesc(ah, bf->bf_desc) == HAL_OK)
---
> struct ath_desc *ds = bf->bf_desc;
> if (ath_hal_rxprocdesc(ah, ds, bf->bf_daddr,
> PA2DESC(sc, ds->ds_link)) == HAL_OK)
2258a2297
> #undef PA2DESC
2425c2464
< u_int8_t *bssid;
---
> const u_int8_t *bssid;
2783,2788d2821
< else if (strcmp(dmode, "eeprom") == 0)
< ath_hal_dumpeeprom(sc->sc_ah);
< else if (strcmp(dmode, "rfgain") == 0)
< ath_hal_dumprfgain(sc->sc_ah);
< else if (strcmp(dmode, "ani") == 0)
< ath_hal_dumpani(sc->sc_ah);