Ticket #1049: madwifi-0.9.3-reg.3.diff
| File madwifi-0.9.3-reg.3.diff, 1.5 kB (added by mtaylor, 5 years ago) |
|---|
-
madwifi/ath_hal/ah_os.c
old new 314 314 } 315 315 } 316 316 EXPORT_SYMBOL(OS_MARK); 317 #elif defined(AH_DEBUG) || defined(AH_REGOPS_FUNC) 317 #elif defined(AH_DEBUG) || defined(AH_REGOPS_FUNC) || (AH_BYTE_ORDER == AH_BIG_ENDIAN) 318 318 /* 319 319 * Memory-mapped device register read/write. These are here 320 320 * as routines when debugging support is enabled and/or when … … 328 328 void __ahdecl 329 329 ath_hal_reg_write(struct ath_hal *ah, u_int reg, u_int32_t val) 330 330 { 331 unsigned long flags; 332 preempt_disable(); 333 local_irq_save(flags); 331 334 #ifdef AH_DEBUG 332 335 if (ath_hal_debug > 1) 333 336 ath_hal_printf(ah, "WRITE 0x%x <= 0x%x\n", reg, val); 334 337 #endif 335 338 _OS_REG_WRITE(ah, reg, val); 339 local_irq_restore(flags); 340 preempt_enable_no_resched(); 336 341 } 337 342 EXPORT_SYMBOL(ath_hal_reg_write); 338 343 … … 340 345 ath_hal_reg_read(struct ath_hal *ah, u_int reg) 341 346 { 342 347 u_int32_t val; 343 348 unsigned long flags; 349 preempt_disable(); 350 local_irq_save(flags); 344 351 val = _OS_REG_READ(ah, reg); 352 local_irq_restore(flags); 353 preempt_enable_no_resched(); 345 354 #ifdef AH_DEBUG 346 355 if (ath_hal_debug > 1) 347 356 ath_hal_printf(ah, "READ 0x%x => 0x%x\n", reg, val);
