From b2904e7236ac38477d9de64a30f13baf48760210 Mon Sep 17 00:00:00 2001 From: adrian Date: Mon, 6 Feb 2017 05:09:42 +0000 Subject: [PATCH] [iwm] Change 2nd arg of iwm_phy_db_set_section() to struct iwm_rx_packet. * This matches the function declaration in Linux's iwlwifi. Obtained from: DragonflyBSD commit de7995a5e0ebf2d0016a87a0142a98c75db58fb4 --- sys/dev/iwm/if_iwm.c | 10 +++------- sys/dev/iwm/if_iwm_phy_db.c | 4 +++- sys/dev/iwm/if_iwm_phy_db.h | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index e0566434869f..c03b85ed1bb8 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -5383,13 +5383,9 @@ iwm_notif_intr(struct iwm_softc *sc) wakeup(&sc->sc_uc); break; } - case IWM_CALIB_RES_NOTIF_PHY_DB: { - struct iwm_calib_res_notif_phy_db *phy_db_notif; - phy_db_notif = (void *)pkt->data; - - iwm_phy_db_set_section(sc->sc_phy_db, phy_db_notif); - - break; } + case IWM_CALIB_RES_NOTIF_PHY_DB: + iwm_phy_db_set_section(sc->sc_phy_db, pkt); + break; case IWM_STATISTICS_NOTIFICATION: { struct iwm_notif_statistics *stats; diff --git a/sys/dev/iwm/if_iwm_phy_db.c b/sys/dev/iwm/if_iwm_phy_db.c index 421082050a6a..6cd2465c59c8 100644 --- a/sys/dev/iwm/if_iwm_phy_db.c +++ b/sys/dev/iwm/if_iwm_phy_db.c @@ -310,8 +310,10 @@ iwm_phy_db_free(struct iwm_phy_db *phy_db) int iwm_phy_db_set_section(struct iwm_phy_db *phy_db, - struct iwm_calib_res_notif_phy_db *phy_db_notif) + struct iwm_rx_packet *pkt) { + struct iwm_calib_res_notif_phy_db *phy_db_notif = + (struct iwm_calib_res_notif_phy_db *)pkt->data; enum iwm_phy_db_section_type type = le16toh(phy_db_notif->type); uint16_t size = le16toh(phy_db_notif->length); struct iwm_phy_db_entry *entry; diff --git a/sys/dev/iwm/if_iwm_phy_db.h b/sys/dev/iwm/if_iwm_phy_db.h index 1bc6efee9d38..7cab8a3d1dca 100644 --- a/sys/dev/iwm/if_iwm_phy_db.h +++ b/sys/dev/iwm/if_iwm_phy_db.h @@ -111,7 +111,7 @@ struct iwm_calib_res_notif_phy_db; extern struct iwm_phy_db *iwm_phy_db_init(struct iwm_softc *sc); extern void iwm_phy_db_free(struct iwm_phy_db *phy_db); extern int iwm_phy_db_set_section(struct iwm_phy_db *phy_db, - struct iwm_calib_res_notif_phy_db *phy_db_notif); + struct iwm_rx_packet *pkt); extern int iwm_send_phy_db_data(struct iwm_phy_db *phy_db); #endif /* __IF_IWM_PHY_DB_H__ */