/* Write the Parameter Storage Area to the WaveLAN card's memory.  */
static void psa_write(unsigned long ioaddr, u16 hacr, int o, u8 *b, int n)
/* Write the Parameter Storage Area to the WaveLAN card's memory.  */
static void psa_write(unsigned long ioaddr, u16 hacr, int o, u8 *b, int n)
{
	int count = 0;
	wv_16_off(ioaddr, hacr);
	while (n-- > 0) {
		outw(o, PIOR2(ioaddr));
		o++;
		outb(*b, PIOP2(ioaddr));
		b++;
		count = 0;
		while ((count++ < 100) &&
		       (hasr_read(ioaddr) & HASR_PSA_BUSY)) mdelay(1);
	}
	wv_16_on(ioaddr, hacr);
}