Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6dfff895 authored by David Woodhouse's avatar David Woodhouse Committed by David Woodhouse
Browse files

libertas: treat firmware data as const

parent 6329d302
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ static inline void if_cs_write16(struct if_cs_card *card, uint reg, u16 val)
static inline void if_cs_write16_rep(
	struct if_cs_card *card,
	uint reg,
	void *buf,
	const void *buf,
	unsigned long count)
{
	if (debug_output)
+2 −2
Original line number Diff line number Diff line
@@ -392,7 +392,7 @@ static int if_sdio_prog_helper(struct if_sdio_card *card)
	unsigned long timeout;
	u8 *chunk_buffer;
	u32 chunk_size;
	u8 *firmware;
	const u8 *firmware;
	size_t size;

	lbs_deb_enter(LBS_DEB_SDIO);
@@ -508,7 +508,7 @@ static int if_sdio_prog_real(struct if_sdio_card *card)
	unsigned long timeout;
	u8 *chunk_buffer;
	u32 chunk_size;
	u8 *firmware;
	const u8 *firmware;
	size_t size, req_size;

	lbs_deb_enter(LBS_DEB_SDIO);
+2 −2
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ static void if_usb_disconnect(struct usb_interface *intf)
static int if_usb_send_fw_pkt(struct if_usb_card *cardp)
{
	struct fwdata *fwdata = cardp->ep_out_buf;
	uint8_t *firmware = cardp->fw->data;
	const uint8_t *firmware = cardp->fw->data;

	/* If we got a CRC failure on the last block, back
	   up and retry it */
@@ -746,7 +746,7 @@ static int if_usb_issue_boot_command(struct if_usb_card *cardp, int ivalue)
 *         len               image length
 *  @return     0 or -1
 */
static int check_fwfile_format(uint8_t *data, uint32_t totlen)
static int check_fwfile_format(const uint8_t *data, uint32_t totlen)
{
	uint32_t bincmd, exit;
	uint32_t blksize, offset, len;