Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 9/9] rsi: code cleanup in file rsi_91x_usb_ops.c
From: Prameela Rani Garnepudi @ 2016-09-12  9:38 UTC (permalink / raw)
  To: linux-wireless, kvalo, johannes.berg, hofrat
  Cc: prameela.j04cs, prameela.garnepudi
In-Reply-To: <cover.1473669618.git.prameela.j04cs@gmail.com>

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_usb_ops.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_usb_ops.c b/drivers/net/wireless/rsi/rsi_91x_usb_ops.c
index de49008..5ab2ce3 100644
--- a/drivers/net/wireless/rsi/rsi_91x_usb_ops.c
+++ b/drivers/net/wireless/rsi/rsi_91x_usb_ops.c
@@ -96,26 +96,25 @@ void rsi_usb_rx_thread(struct rsi_common *common)
 		rsi_wait_event(&dev->rx_thread.event, EVENT_WAIT_FOREVER);
 
 		if (atomic_read(&dev->rx_thread.thread_done))
-			goto out;
+			break;
 
 		mutex_lock(&common->tx_rxlock);
 		status = rsi_read_pkt(common, 0);
 		if (status) {
 			rsi_dbg(ERR_ZONE, "%s: Failed To read data", __func__);
 			mutex_unlock(&common->tx_rxlock);
-			return;
+			break;
 		}
 		mutex_unlock(&common->tx_rxlock);
 		rsi_reset_event(&dev->rx_thread.event);
 		if (adapter->rx_urb_submit(adapter)) {
 			rsi_dbg(ERR_ZONE,
 				"%s: Failed in urb submission", __func__);
-			return;
+			break;
 		}
 	} while (1);
 
-out:
-	rsi_dbg(INFO_ZONE, "%s: Terminated thread\n", __func__);
+	rsi_dbg(INFO_ZONE, "%s: Terminated USB RX thread\n", __func__);
 	complete_and_exit(&dev->rx_thread.completion, 0);
 }
 
-- 
2.4.11

^ permalink raw reply related

* [PATCH 8/9] rsi: code clean up and replaced ctrl message timeouts with macros in file rsi_91x_usb.c
From: Prameela Rani Garnepudi @ 2016-09-12  9:38 UTC (permalink / raw)
  To: linux-wireless, kvalo, johannes.berg, hofrat
  Cc: prameela.j04cs, prameela.garnepudi
In-Reply-To: <cover.1473669618.git.prameela.j04cs@gmail.com>

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_usb.c | 42 +++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 19 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c
index ef5d394..21957dd 100644
--- a/drivers/net/wireless/rsi/rsi_91x_usb.c
+++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
@@ -1,6 +1,9 @@
 /**
  * Copyright (c) 2014 Redpine Signals Inc.
  *
+ * Developers:
+ *	Prameela Rani Garnepudi	2016 <prameela.garnepudi@redpinesignals.com>
+ *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * copyright notice and this permission notice appear in all copies.
@@ -19,7 +22,7 @@
 #include "rsi_usb.h"
 
 /**
- * rsi_usb_card_write() - This function writes to the USB Card.
+ * rsi_usb_card_write() - This function writes data to the USB Card.
  * @adapter: Pointer to the adapter structure.
  * @buf: Pointer to the buffer from where the data has to be taken.
  * @len: Length to be written.
@@ -34,7 +37,7 @@ static int rsi_usb_card_write(struct rsi_hw *adapter,
 {
 	struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev;
 	int status;
-	s32 transfer;
+	int transfer;
 
 	status = usb_bulk_msg(dev->usbdev,
 			      usb_sndbulkpipe(dev->usbdev,
@@ -46,7 +49,7 @@ static int rsi_usb_card_write(struct rsi_hw *adapter,
 
 	if (status < 0) {
 		rsi_dbg(ERR_ZONE,
-			"Card write failed with error code :%10d\n", status);
+			"Card write failed with error code :%d\n", status);
 		dev->write_fail = 1;
 	}
 	return status;
@@ -155,11 +158,11 @@ static int rsi_usb_reg_read(struct usb_device *usbdev,
 			    u16 len)
 {
 	u8 *buf;
-	int status = -ENOMEM;
+	int status = 0;
 
 	buf  = kmalloc(0x04, GFP_KERNEL);
 	if (!buf)
-		return status;
+		return -ENOMEM;
 
 	status = usb_control_msg(usbdev,
 				 usb_rcvctrlpipe(usbdev, 0),
@@ -168,7 +171,7 @@ static int rsi_usb_reg_read(struct usb_device *usbdev,
 				 ((reg & 0xffff0000) >> 16), (reg & 0xffff),
 				 (void *)buf,
 				 len,
-				 HZ * 5);
+				 USB_CTRL_GET_TIMEOUT);
 
 	*value = (buf[0] | (buf[1] << 8));
 	if (status < 0) {
@@ -197,11 +200,11 @@ static int rsi_usb_reg_write(struct usb_device *usbdev,
 			     u16 len)
 {
 	u8 *usb_reg_buf;
-	int status = -ENOMEM;
+	int status = 0;
 
 	usb_reg_buf  = kmalloc(0x04, GFP_KERNEL);
 	if (!usb_reg_buf)
-		return status;
+		return -ENOMEM;
 
 	usb_reg_buf[0] = (value & 0x00ff);
 	usb_reg_buf[1] = (value & 0xff00) >> 8;
@@ -216,7 +219,7 @@ static int rsi_usb_reg_write(struct usb_device *usbdev,
 				 (reg & 0xffff),
 				 (void *)usb_reg_buf,
 				 len,
-				 HZ * 5);
+				 USB_CTRL_SET_TIMEOUT);
 	if (status < 0) {
 		rsi_dbg(ERR_ZONE,
 			"%s: Reg write failed with error code :%d\n",
@@ -275,11 +278,11 @@ static int rsi_rx_urb_submit(struct rsi_hw *adapter)
 
 /**
  * rsi_usb_write_register_multiple() - This function writes multiple bytes of
- *				       information to multiple registers.
- * @adapter: Pointer to the adapter structure.
- * @addr: Address of the register.
- * @data: Pointer to the data that has to be written.
- * @count: Number of multiple bytes to be written on to the registers.
+ *				       information to the given address.
+ * @adapter:	Pointer to the adapter structure.
+ * @addr:	Address of the register.
+ * @data:	Pointer to the data that has to be written.
+ * @count:	Number of multiple bytes to be written on to the registers.
  *
  * Return: status: 0 on success, a negative error code on failure.
  */
@@ -308,16 +311,17 @@ int rsi_usb_write_register_multiple(struct rsi_hw *adapter,
 					 (addr & 0xffff),
 					 (void *)buf,
 					 transfer,
-					 HZ * 5);
+					 USB_CTRL_SET_TIMEOUT);
 		if (status < 0) {
 			rsi_dbg(ERR_ZONE,
 				"Reg write failed with error code :%d\n",
 				status);
-		} else {
-			count -= transfer;
-			data += transfer;
-			addr += transfer;
+			kfree(buf);
+			return status;
 		}
+		count -= transfer;
+		data += transfer;
+		addr += transfer;
 	}
 
 	kfree(buf);
-- 
2.4.11

^ permalink raw reply related

* [PATCH 7/9] rsi: zone changed for debug message and cleanup in file rsi_91x_sdio_ops.c
From: Prameela Rani Garnepudi @ 2016-09-12  9:38 UTC (permalink / raw)
  To: linux-wireless, kvalo, johannes.berg, hofrat
  Cc: prameela.j04cs, prameela.garnepudi
In-Reply-To: <cover.1473669618.git.prameela.j04cs@gmail.com>

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c b/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
index 40d7231..4287360 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
@@ -36,7 +36,7 @@ static int rsi_sdio_master_access_msword(struct rsi_hw *adapter,
 
 	byte = (u8)(ms_word & 0x00FF);
 
-	rsi_dbg(INIT_ZONE,
+	rsi_dbg(INFO_ZONE,
 		"%s: MASTER_ACCESS_MSBYTE:0x%x\n", __func__, byte);
 
 	status = rsi_sdio_write_register(adapter,
@@ -52,7 +52,7 @@ static int rsi_sdio_master_access_msword(struct rsi_hw *adapter,
 
 	byte = (u8)(ms_word >> 8);
 
-	rsi_dbg(INIT_ZONE, "%s:MASTER_ACCESS_LSBYTE:0x%x\n", __func__, byte);
+	rsi_dbg(INFO_ZONE, "%s:MASTER_ACCESS_LSBYTE:0x%x\n", __func__, byte);
 	status = rsi_sdio_write_register(adapter,
 					 function,
 					 SDIO_MASTER_ACCESS_LSBYTE,
@@ -435,7 +435,7 @@ void rsi_interrupt_handler(struct rsi_hw *adapter)
 				} else {
 					rsi_dbg(ERR_ZONE,
 						"%s: Firmware Status is 0x%x\n",
-						__func__ , fw_status);
+						__func__, fw_status);
 					rsi_sdio_ack_intr(common->priv,
 							  (1 << FW_ASSERT_IND));
 				}
-- 
2.4.11

^ permalink raw reply related

* [PATCH 6/9] rsi: code cleanup (spelling mistakes and new line after declaration) in file rsi_91x_sdio.c      Added developer name
From: Prameela Rani Garnepudi @ 2016-09-12  9:38 UTC (permalink / raw)
  To: linux-wireless, kvalo, johannes.berg, hofrat
  Cc: prameela.j04cs, prameela.garnepudi
In-Reply-To: <cover.1473669618.git.prameela.j04cs@gmail.com>

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_sdio.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index 8428858..d958f90 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -1,6 +1,8 @@
 /**
  * Copyright (c) 2014 Redpine Signals Inc.
  *
+ * Developers:
+ *		Fariya Fathima	2014 <fariya.f@redpinesignals.com>
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * copyright notice and this permission notice appear in all copies.
@@ -128,7 +130,7 @@ static int rsi_issue_sdiocommand(struct sdio_func *func,
 }
 
 /**
- * rsi_handle_interrupt() - This function is called upon the occurence
+ * rsi_handle_interrupt() - This function is called upon the occurrence
  *			    of an interrupt.
  * @function: Pointer to the sdio_func structure.
  *
@@ -183,8 +185,7 @@ static void rsi_reset_card(struct sdio_func *pfunction)
 	host->ios.timing = MMC_TIMING_LEGACY;
 	host->ops->set_ios(host, &host->ios);
 
-	/*
-	 * This delay should be sufficient to allow the power supply
+	/* This delay should be sufficient to allow the power supply
 	 * to reach the minimum voltage.
 	 */
 	msleep(20);
@@ -193,8 +194,7 @@ static void rsi_reset_card(struct sdio_func *pfunction)
 	host->ios.power_mode = MMC_POWER_ON;
 	host->ops->set_ios(host, &host->ios);
 
-	/*
-	 * This delay must be at least 74 clock sizes, or 1 ms, or the
+	/* This delay must be at least 74 clock sizes, or 1 ms, or the
 	 * time required to reach a stable voltage.
 	 */
 	msleep(20);
@@ -361,6 +361,7 @@ static int rsi_setblocklength(struct rsi_hw *adapter, u32 length)
 	struct rsi_91x_sdiodev *dev =
 		(struct rsi_91x_sdiodev *)adapter->rsi_dev;
 	int status;
+
 	rsi_dbg(INIT_ZONE, "%s: Setting the block length\n", __func__);
 
 	status = sdio_set_block_size(dev->pfunction, length);
@@ -464,6 +465,7 @@ int rsi_sdio_write_register(struct rsi_hw *adapter,
 void rsi_sdio_ack_intr(struct rsi_hw *adapter, u8 int_bit)
 {
 	int status;
+
 	status = rsi_sdio_write_register(adapter,
 					 1,
 					 (SDIO_FUN1_INTR_CLR_REG |
@@ -473,8 +475,6 @@ void rsi_sdio_ack_intr(struct rsi_hw *adapter, u8 int_bit)
 		rsi_dbg(ERR_ZONE, "%s: unable to send ack\n", __func__);
 }
 
-
-
 /**
  * rsi_sdio_read_register_multiple() - This function read multiple bytes of
  *				       information from the SD card.
@@ -667,7 +667,7 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
 		goto fail;
 	}
 
-	rsi_dbg(INIT_ZONE, "%s: Setup card succesfully\n", __func__);
+	rsi_dbg(INIT_ZONE, "%s: Setup card successfully\n", __func__);
 
 	status = rsi_init_sdio_slave_regs(adapter);
 	if (status) {
-- 
2.4.11

^ permalink raw reply related

* [PATCH 5/9] rsi: code cleanup in file rsi_91x_mgmt.c
From: Prameela Rani Garnepudi @ 2016-09-12  9:38 UTC (permalink / raw)
  To: linux-wireless, kvalo, johannes.berg, hofrat
  Cc: prameela.j04cs, prameela.garnepudi
In-Reply-To: <cover.1473669618.git.prameela.j04cs@gmail.com>

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_mgmt.c | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
index 35c14cc..e505600 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
@@ -255,7 +255,7 @@ static int rsi_send_internal_mgmt_frame(struct rsi_common *common,
 {
 	struct skb_info *tx_params;
 
-	if (skb == NULL) {
+	if (!skb) {
 		rsi_dbg(ERR_ZONE, "%s: Unable to allocate skb\n", __func__);
 		return -ENOMEM;
 	}
@@ -290,7 +290,6 @@ static int rsi_load_radio_caps(struct rsi_common *common)
 	rsi_dbg(INFO_ZONE, "%s: Sending rate symbol req frame\n", __func__);
 
 	skb = dev_alloc_skb(sizeof(struct rsi_radio_caps));
-
 	if (!skb) {
 		rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
 			__func__);
@@ -310,6 +309,7 @@ static int rsi_load_radio_caps(struct rsi_common *common)
 		if (common->fsm_state == FSM_MAC_INIT_DONE) {
 			struct ieee80211_hw *hw = adapter->hw;
 			struct ieee80211_conf *conf = &hw->conf;
+
 			if (conf_is_ht40_plus(conf)) {
 				radio_caps->desc_word[5] =
 					cpu_to_le16(LOWER_20_ENABLE);
@@ -375,8 +375,8 @@ static int rsi_load_radio_caps(struct rsi_common *common)
  * rsi_mgmt_pkt_to_core() - This function is the entry point for Mgmt module.
  * @common: Pointer to the driver private structure.
  * @msg: Pointer to received packet.
- * @msg_len: Length of the recieved packet.
- * @type: Type of recieved packet.
+ * @msg_len: Length of the received packet.
+ * @type: Type of received packet.
  *
  * Return: 0 on success, -1 on failure.
  */
@@ -425,9 +425,8 @@ static int rsi_mgmt_pkt_to_core(struct rsi_common *common,
 		rx_params->rssi = rsi_get_rssi(msg);
 		rx_params->channel = rsi_get_channel(msg);
 		rsi_indicate_pkt_to_os(common, skb);
-	} else {
+	} else
 		rsi_dbg(MGMT_TX_ZONE, "%s: Internal Packet\n", __func__);
-	}
 
 	return 0;
 }
@@ -545,7 +544,9 @@ int rsi_send_aggregation_params_frame(struct rsi_common *common,
 		mgmt_frame->desc_word[4] = cpu_to_le16(ssn);
 		mgmt_frame->desc_word[5] = cpu_to_le16(buf_size);
 		mgmt_frame->desc_word[7] =
-		cpu_to_le16((tid | (START_AMPDU_AGGR << 4) | (peer_id << 8)));
+			cpu_to_le16((tid |
+				    (START_AMPDU_AGGR << 4) |
+				    (peer_id << 8)));
 	} else if (event == STA_RX_ADDBA_DONE) {
 		mgmt_frame->desc_word[4] = cpu_to_le16(ssn);
 		mgmt_frame->desc_word[7] = cpu_to_le16(tid |
@@ -980,6 +981,7 @@ static int rsi_compare(const void *a, const void *b)
 static bool rsi_map_rates(u16 rate, int *offset)
 {
 	int kk;
+
 	for (kk = 0; kk < ARRAY_SIZE(rsi_mcsrates); kk++) {
 		if (rate == mcs[kk]) {
 			*offset = kk;
@@ -1013,7 +1015,6 @@ static int rsi_send_auto_rate_request(struct rsi_common *common)
 	u8 num_supported_rates = 0;
 	u8 rate_table_offset, rate_offset = 0;
 	u32 rate_bitmap = common->bitrate_mask[band];
-
 	u16 *selected_rates, min_rate;
 
 	skb = dev_alloc_skb(sizeof(struct rsi_auto_rate));
@@ -1261,9 +1262,8 @@ static int rsi_handle_ta_confirm_type(struct rsi_common *common,
 			if (rsi_eeprom_read(common)) {
 				common->fsm_state = FSM_CARD_NOT_READY;
 				goto out;
-			} else {
+			} else
 				common->fsm_state = FSM_EEPROM_READ_MAC_ADDR;
-			}
 		} else {
 			rsi_dbg(INFO_ZONE,
 				"%s: Received bootup params cfm in %d state\n",
@@ -1275,8 +1275,10 @@ static int rsi_handle_ta_confirm_type(struct rsi_common *common,
 	case EEPROM_READ_TYPE:
 		if (common->fsm_state == FSM_EEPROM_READ_MAC_ADDR) {
 			if (msg[16] == MAGIC_WORD) {
-				u8 offset = (FRAME_DESC_SZ + WLAN_HOST_MODE_LEN
-					     + WLAN_MAC_MAGIC_WORD_LEN);
+				u8 offset = (FRAME_DESC_SZ +
+					     WLAN_HOST_MODE_LEN +
+					     WLAN_MAC_MAGIC_WORD_LEN);
+
 				memcpy(common->mac_addr,
 				       &msg[offset],
 				       ETH_ALEN);
@@ -1347,7 +1349,7 @@ static int rsi_handle_ta_confirm_type(struct rsi_common *common,
 			}
 		} else {
 			rsi_dbg(INFO_ZONE,
-				"%s: Received bbb_rf cfm in %d state\n",
+				"%s: Received bb_rf cfm in %d state\n",
 				 __func__, common->fsm_state);
 			return 0;
 		}
@@ -1367,7 +1369,7 @@ out:
 
 /**
  * rsi_mgmt_pkt_recv() - This function processes the management packets
- *			 recieved from the hardware.
+ *			 received from the hardware.
  * @common: Pointer to the driver private structure.
  * @msg: Pointer to the received packet.
  *
-- 
2.4.11

^ permalink raw reply related

* [PATCH 4/9] rsi: code clean up in file rsi_91x_main.c
From: Prameela Rani Garnepudi @ 2016-09-12  9:38 UTC (permalink / raw)
  To: linux-wireless, kvalo, johannes.berg, hofrat
  Cc: prameela.j04cs, prameela.garnepudi
In-Reply-To: <cover.1473669618.git.prameela.j04cs@gmail.com>

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_main.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_main.c b/drivers/net/wireless/rsi/rsi_91x_main.c
index 8810862..f82e457 100644
--- a/drivers/net/wireless/rsi/rsi_91x_main.c
+++ b/drivers/net/wireless/rsi/rsi_91x_main.c
@@ -86,7 +86,7 @@ static struct sk_buff *rsi_prepare_skb(struct rsi_common *common,
 
 	pkt_len -= extended_desc;
 	skb = dev_alloc_skb(pkt_len + FRAME_DESC_SZ);
-	if (skb == NULL)
+	if (!skb)
 		return NULL;
 
 	payload_offset = (extended_desc + FRAME_DESC_SZ);
@@ -111,11 +111,10 @@ static struct sk_buff *rsi_prepare_skb(struct rsi_common *common,
 int rsi_read_pkt(struct rsi_common *common, s32 rcv_pkt_len)
 {
 	u8 *frame_desc = NULL, extended_desc = 0;
-	u32 index, length = 0, queueno = 0;
+	u32 index = 0, length = 0, queueno = 0;
 	u16 actual_length = 0, offset;
 	struct sk_buff *skb = NULL;
 
-	index = 0;
 	do {
 		frame_desc = &common->rx_data_pkt[index];
 		actual_length = *(u16 *)&frame_desc[0];
@@ -131,7 +130,7 @@ int rsi_read_pkt(struct rsi_common *common, s32 rcv_pkt_len)
 					      (frame_desc + offset),
 					      length,
 					      extended_desc);
-			if (skb == NULL)
+			if (!skb)
 				goto fail;
 
 			rsi_indicate_pkt_to_os(common, skb);
@@ -198,15 +197,14 @@ struct rsi_hw *rsi_91x_init(void)
 		return NULL;
 
 	adapter->priv = kzalloc(sizeof(*common), GFP_KERNEL);
-	if (adapter->priv == NULL) {
-		rsi_dbg(ERR_ZONE, "%s: Failed in allocation of memory\n",
+	if (!adapter->priv) {
+		rsi_dbg(ERR_ZONE, "%s: Failed in allocation of common cb\n",
 			__func__);
 		kfree(adapter);
 		return NULL;
-	} else {
-		common = adapter->priv;
-		common->priv = adapter;
 	}
+	common = adapter->priv;
+	common->priv = adapter;
 
 	for (ii = 0; ii < NUM_SOFT_QUEUES; ii++)
 		skb_queue_head_init(&common->tx_queue[ii]);
-- 
2.4.11

^ permalink raw reply related

* [PATCH 3/9] rsi: Added freeing of allocated buffers (sbands and dfsentry)      Cleanup (spelling mistakes, code format corrections,          empty lines after declaration)
From: Prameela Rani Garnepudi @ 2016-09-12  9:38 UTC (permalink / raw)
  To: linux-wireless, kvalo, johannes.berg, hofrat
  Cc: prameela.j04cs, prameela.garnepudi
In-Reply-To: <cover.1473669618.git.prameela.j04cs@gmail.com>

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_mac80211.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index dbb2389..29abedc 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -194,6 +194,7 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band)
 void rsi_mac80211_detach(struct rsi_hw *adapter)
 {
 	struct ieee80211_hw *hw = adapter->hw;
+	int i;
 
 	if (hw) {
 		ieee80211_stop_queues(hw);
@@ -201,7 +202,17 @@ void rsi_mac80211_detach(struct rsi_hw *adapter)
 		ieee80211_free_hw(hw);
 	}
 
+	for(i = 0; i < 2; i++) {
+		struct ieee80211_supported_band *sbands = &adapter->sbands[i];
+
+		if (sbands->channels)
+			kfree(sbands->channels);
+	}
+
+#ifdef CONFIG_RSI_DEBUGFS
 	rsi_remove_dbgfs(adapter);
+	kfree(adapter->dfsentry);
+#endif
 }
 EXPORT_SYMBOL_GPL(rsi_mac80211_detach);
 
@@ -304,7 +315,8 @@ static int rsi_mac80211_add_interface(struct ieee80211_hw *hw,
 		if (!adapter->sc_nvifs) {
 			++adapter->sc_nvifs;
 			adapter->vifs[0] = vif;
-			ret = rsi_set_vap_capabilities(common, STA_OPMODE);
+			ret = rsi_set_vap_capabilities(common,
+						       STA_OPMODE);
 		}
 		break;
 	default:
@@ -429,9 +441,11 @@ static int rsi_mac80211_config(struct ieee80211_hw *hw,
 u16 rsi_get_connected_channel(struct rsi_hw *adapter)
 {
 	struct ieee80211_vif *vif = adapter->vifs[0];
+
 	if (vif) {
 		struct ieee80211_bss_conf *bss = &vif->bss_conf;
 		struct ieee80211_channel *channel = bss->chandef.chan;
+
 		return channel->hw_value;
 	}
 
@@ -819,8 +833,6 @@ static void rsi_perform_cqm(struct rsi_common *common,
 	common->cqm_info.last_cqm_event_rssi = rssi;
 	rsi_dbg(INFO_ZONE, "CQM: Notifying event: %d\n", event);
 	ieee80211_cqm_rssi_notify(adapter->vifs[0], event, GFP_KERNEL);
-
-	return;
 }
 
 /**
@@ -875,16 +887,14 @@ static void rsi_fill_rx_status(struct ieee80211_hw *hw,
 	}
 
 	/* CQM only for connected AP beacons, the RSSI is a weighted avg */
-	if (bss->assoc && !(memcmp(bss->bssid, hdr->addr2, ETH_ALEN))) {
+	if (bss->assoc && ether_addr_equal(bss->bssid, hdr->addr2)) {
 		if (ieee80211_is_beacon(hdr->frame_control))
 			rsi_perform_cqm(common, hdr->addr2, rxs->signal);
 	}
-
-	return;
 }
 
 /**
- * rsi_indicate_pkt_to_os() - This function sends recieved packet to mac80211.
+ * rsi_indicate_pkt_to_os() - This function sends received packet to mac80211.
  * @common: Pointer to the driver private structure.
  * @skb: Pointer to the socket buffer structure.
  *
-- 
2.4.11

^ permalink raw reply related

* [PATCH 2/9] rsi: Spelling and code format corrections in rsi_91x_debugfs.c
From: Prameela Rani Garnepudi @ 2016-09-12  9:38 UTC (permalink / raw)
  To: linux-wireless, kvalo, johannes.berg, hofrat
  Cc: prameela.j04cs, prameela.garnepudi
In-Reply-To: <cover.1473669618.git.prameela.j04cs@gmail.com>

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_debugfs.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_debugfs.c b/drivers/net/wireless/rsi/rsi_91x_debugfs.c
index 828a042..5ec7bce 100644
--- a/drivers/net/wireless/rsi/rsi_91x_debugfs.c
+++ b/drivers/net/wireless/rsi/rsi_91x_debugfs.c
@@ -59,7 +59,7 @@ static int rsi_sdio_stats_read(struct seq_file *seq, void *data)
 }
 
 /**
- * rsi_sdio_stats_open() - This funtion calls single open function of seq_file
+ * rsi_sdio_stats_open() - This function calls single open function of seq_file
  *			   to open file and read contents from it.
  * @inode: Pointer to the inode structure.
  * @file: Pointer to the file structure.
@@ -100,7 +100,7 @@ static int rsi_version_read(struct seq_file *seq, void *data)
 }
 
 /**
- * rsi_version_open() - This funtion calls single open function of seq_file to
+ * rsi_version_open() - This function calls single open function of seq_file to
  *			open file and read contents from it.
  * @inode: Pointer to the inode structure.
  * @file: Pointer to the file structure.
@@ -108,7 +108,7 @@ static int rsi_version_read(struct seq_file *seq, void *data)
  * Return: Pointer to the opened file status: 0 on success, ENOMEM on failure.
  */
 static int rsi_version_open(struct inode *inode,
-				 struct file *file)
+			    struct file *file)
 {
 	return single_open(file, rsi_version_read, inode->i_private);
 }
@@ -180,7 +180,7 @@ static int rsi_stats_read(struct seq_file *seq, void *data)
 }
 
 /**
- * rsi_stats_open() - This funtion calls single open function of seq_file to
+ * rsi_stats_open() - This function calls single open function of seq_file to
  *		      open file and read contents from it.
  * @inode: Pointer to the inode structure.
  * @file: Pointer to the file structure.
@@ -194,7 +194,8 @@ static int rsi_stats_open(struct inode *inode,
 }
 
 /**
- * rsi_debug_zone_read() - This function display the currently enabled debug zones.
+ * rsi_debug_zone_read() - This function display the currently
+ *			enabled debug zones.
  * @seq: Pointer to the sequence file structure.
  * @data: Pointer to the data.
  *
@@ -209,7 +210,7 @@ static int rsi_debug_zone_read(struct seq_file *seq, void *data)
 }
 
 /**
- * rsi_debug_read() - This funtion calls single open function of seq_file to
+ * rsi_debug_read() - This function calls single open function of seq_file to
  *		      open file and read contents from it.
  * @inode: Pointer to the inode structure.
  * @file: Pointer to the file structure.
-- 
2.4.11

^ permalink raw reply related

* [PATCH 1/9] rsi: cleanup and added debug prints in file rsi_91x_core.c
From: Prameela Rani Garnepudi @ 2016-09-12  9:38 UTC (permalink / raw)
  To: linux-wireless, kvalo, johannes.berg, hofrat
  Cc: prameela.j04cs, prameela.garnepudi
In-Reply-To: <cover.1473669618.git.prameela.j04cs@gmail.com>

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_core.c | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_core.c b/drivers/net/wireless/rsi/rsi_91x_core.c
index f3d3995..b989ec5 100644
--- a/drivers/net/wireless/rsi/rsi_91x_core.c
+++ b/drivers/net/wireless/rsi/rsi_91x_core.c
@@ -142,8 +142,10 @@ static u8 rsi_core_determine_hal_queue(struct rsi_common *common)
 		return q_num;
 	}
 
-	if (common->hw_data_qs_blocked)
+	if (common->hw_data_qs_blocked) {
+		rsi_dbg(INFO_ZONE, "%s: data queue blocked\n", __func__);
 		return q_num;
+	}
 
 	if (common->pkt_cnt != 0) {
 		--common->pkt_cnt;
@@ -210,6 +212,7 @@ static void rsi_core_queue_pkt(struct rsi_common *common,
 			       struct sk_buff *skb)
 {
 	u8 q_num = skb->priority;
+
 	if (q_num >= NUM_SOFT_QUEUES) {
 		rsi_dbg(ERR_ZONE, "%s: Invalid Queue Number: q_num = %d\n",
 			__func__, q_num);
@@ -285,7 +288,7 @@ void rsi_core_qos_processor(struct rsi_common *common)
 		}
 
 		skb = rsi_core_dequeue_pkt(common, q_num);
-		if (skb == NULL) {
+		if (!skb) {
 			rsi_dbg(ERR_ZONE, "skb null\n");
 			mutex_unlock(&common->tx_rxlock);
 			break;
@@ -331,21 +334,32 @@ void rsi_core_xmit(struct rsi_common *common, struct sk_buff *skb)
 			__func__);
 		goto xmit_fail;
 	}
-	info = IEEE80211_SKB_CB(skb);
-	tx_params = (struct skb_info *)info->driver_data;
-	tmp_hdr = (struct ieee80211_hdr *)&skb->data[0];
 
 	if (common->fsm_state != FSM_MAC_INIT_DONE) {
 		rsi_dbg(ERR_ZONE, "%s: FSM state not open\n", __func__);
 		goto xmit_fail;
 	}
 
+	info = IEEE80211_SKB_CB(skb);
+	tx_params = (struct skb_info *)info->driver_data;
+	tmp_hdr = (struct ieee80211_hdr *)&skb->data[0];
+
 	if ((ieee80211_is_mgmt(tmp_hdr->frame_control)) ||
 	    (ieee80211_is_ctl(tmp_hdr->frame_control)) ||
 	    (ieee80211_is_qos_nullfunc(tmp_hdr->frame_control))) {
 		q_num = MGMT_SOFT_Q;
 		skb->priority = q_num;
+		if (ieee80211_is_probe_req(tmp_hdr->frame_control))
+			rsi_dbg(MGMT_TX_ZONE, "%s: Probe Request\n", __func__);
+		else if (ieee80211_is_auth(tmp_hdr->frame_control))
+			rsi_dbg(MGMT_TX_ZONE, "%s: Auth Request\n", __func__);
+		else if (ieee80211_is_assoc_req(tmp_hdr->frame_control))
+			rsi_dbg(MGMT_TX_ZONE, "%s: Assoc Request\n", __func__);
+		else
+			rsi_dbg(MGMT_TX_ZONE, "%s: pkt_type=%04x\n",
+				__func__, tmp_hdr->frame_control);
 	} else {
+		rsi_dbg(DATA_TX_ZONE, "%s: Data Packet\n", __func__);
 		if (ieee80211_is_data_qos(tmp_hdr->frame_control)) {
 			tid = (skb->data[24] & IEEE80211_QOS_TID);
 			skb->priority = TID_TO_WME_AC(tid);
-- 
2.4.11

^ permalink raw reply related

* [PATCH 0/9] rsi: code clean-up
From: Prameela Rani Garnepudi @ 2016-09-12  9:38 UTC (permalink / raw)
  To: linux-wireless, kvalo, johannes.berg, hofrat
  Cc: prameela.j04cs, prameela.garnepudi

*** BLURB HERE ***

Prameela Rani Garnepudi (9):
  rsi: cleanup and added debug prints in file rsi_91x_core.c
  rsi: Spelling and code format corrections in rsi_91x_debugfs.c
  rsi: Added freeing of allocated buffers (sbands and dfsentry)         
    Cleanup (spelling mistakes, code format corrections,     	     
    empty lines after declaration)
  rsi: code clean up in file rsi_91x_main.c
  rsi: code cleanup in file rsi_91x_mgmt.c
  rsi: code cleanup (spelling mistakes and new line after declaration)
    in file rsi_91x_sdio.c          Added developer name
  rsi: zone changed for debug message and cleanup in file
    rsi_91x_sdio_ops.c
  rsi: code clean up and replaced ctrl message timeouts with macros in
    file rsi_91x_usb.c
  rsi: code cleanup in file rsi_91x_usb_ops.c

 drivers/net/wireless/rsi/rsi_91x_core.c     | 24 +++++++++++++----
 drivers/net/wireless/rsi/rsi_91x_debugfs.c  | 13 ++++-----
 drivers/net/wireless/rsi/rsi_91x_mac80211.c | 24 ++++++++++++-----
 drivers/net/wireless/rsi/rsi_91x_main.c     | 16 +++++------
 drivers/net/wireless/rsi/rsi_91x_mgmt.c     | 30 +++++++++++----------
 drivers/net/wireless/rsi/rsi_91x_sdio.c     | 16 +++++------
 drivers/net/wireless/rsi/rsi_91x_sdio_ops.c |  6 ++---
 drivers/net/wireless/rsi/rsi_91x_usb.c      | 42 ++++++++++++++++-------------
 drivers/net/wireless/rsi/rsi_91x_usb_ops.c  |  9 +++----
 9 files changed, 104 insertions(+), 76 deletions(-)

-- 
2.4.11

^ permalink raw reply

* Re: [PATCH 1/3 v3] mac80211: RX BA support for sta max_rx_aggregation_subframes
From: Johannes Berg @ 2016-09-12  9:38 UTC (permalink / raw)
  To: Maxim Altshul, linux-wireless; +Cc: kvalo
In-Reply-To: <1473673046.27358.0.camel@sipsolutions.net>

On Mon, 2016-09-12 at 11:37 +0200, Johannes Berg wrote:
> 
> I fixed the indentation of the commit message, please note for the
> future.
> 

Err, what? No, the *debug* message of course.

johannes

^ permalink raw reply

* Re: [PATCH 1/3 v3] mac80211: RX BA support for sta max_rx_aggregation_subframes
From: Johannes Berg @ 2016-09-12  9:37 UTC (permalink / raw)
  To: Maxim Altshul, linux-wireless; +Cc: kvalo
In-Reply-To: <20160822141404.12814-1-maxim.altshul@ti.com>

On Mon, 2016-08-22 at 17:14 +0300, Maxim Altshul wrote:
> The ability to change the max_rx_aggregation frames is useful
> in cases of IOP.
> 
> There exist some devices (latest mobile phones and some AP's)
> that tend to not respect a BA sessions maximum size (in Kbps).
> These devices won't respect the AMPDU size that was negotiated during
> associasion (even though they do respect the maximal number of
> packets).
> 
> This violation is characterized by a valid number of packets in
> a single AMPDU. Even so, the total size will exceed the size
> negotiated
> during association.
> 
> Eventually, this will cause some undefined behavior, which in turn
> causes the hw to drop packets, causing the throughput to plummet.
> 
> This patch will make the subframe limitation to be held by each
> station,
> instead of being held only by hw.
> 
> Signed-off-by: Maxim Altshul <maxim.altshul@ti.com>
> 
Applied.

I fixed the indentation of the commit message, please note for the
future.

johannes

^ permalink raw reply

* Support of rtl8723bs
From: Hanno Zulla @ 2016-09-12  9:20 UTC (permalink / raw)
  To: linux-wireless, Jes.Sorensen; +Cc: Larry.Finger, Bastien Nocera, anthony.wong

Hi Jes,
hello linux-wireless,

I'd like to know more about the current progress of rtl8723bs support
for Linux.

Googling and reading the mailing list archives found an older vendor driver
https://github.com/hadess/rtl8723bs

plus patches at
https://github.com/lwfinger/rtl8723bs

which both aren't ready for Linux according to
https://github.com/hadess/rtl8723bs/issues/96

According to
https://github.com/hadess/rtl8723bs/issues/98

there is a newer vendor driver from Realtek at
https://github.com/anthonywong/rtl8723bs
which Anthony wants to get ready for inclusion to the Ubuntu kernel.

But after reading
https://marc.info/?l=linux-wireless&m=146902477024130&w=2
it appears that even that newer vendor driver isn't ready for Jes's work.

Anyway, as an owner of such a device, I'd like to help somehow, and be
it as a guinea pig to test on my hardware. The newer vendor driver
crashed on Ubuntu' 4.4 sources and doesn't compile yet on Ubuntu 4.8-rc
sources.
https://github.com/anthonywong/rtl8723bs/issues/1

Kind regards,

Hanno

^ permalink raw reply

* Re: [PATCH v2] mac80211: Re-structure aqm debugfs output and include CoDel drops
From: Johannes Berg @ 2016-09-12  9:27 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen, make-wifi-fast, linux-wireless
In-Reply-To: <20160811151156.6485-1-toke@toke.dk>


> --- a/net/mac80211/debugfs_sta.c
> +++ b/net/mac80211/debugfs_sta.c
> @@ -109,6 +109,48 @@ static ssize_t sta_last_seq_ctrl_read(struct
> file *file, char __user *userbuf,
>  }
>  STA_OPS(last_seq_ctrl);
>  
> +#define AQM_TXQ_ENTRY_LEN 130
> +
> +static ssize_t sta_aqm_read(struct file *file, char __user *userbuf,
> +			size_t count, loff_t *ppos)
> +{
> +	struct sta_info *sta = file->private_data;
> +	struct ieee80211_local *local = sta->local;
> +	char buf[AQM_TXQ_ENTRY_LEN*(IEEE80211_NUM_TIDS+1)], *p =
> buf;
> 
This is very large, I think you should dynamically allocate it.

johannes

^ permalink raw reply

* Re: [PATCH v2] cfg80211: Remove deprecated create_singlethread_workqueue
From: Johannes Berg @ 2016-09-12  9:21 UTC (permalink / raw)
  To: Bhaktipriya Shridhar, David S. Miller
  Cc: Tejun Heo, linux-wireless, netdev, linux-kernel
In-Reply-To: <20160830190507.GA11493@Karyakshetra>

On Wed, 2016-08-31 at 00:35 +0530, Bhaktipriya Shridhar wrote:
> The workqueue "cfg80211_wq" is involved in cleanup, scan and event
> related
> works. It queues multiple work items &rdev->event_work,
> &rdev->dfs_update_channels_wk,
> &wiphy_to_rdev(request->wiphy)->scan_done_wk,
> &wiphy_to_rdev(wiphy)->sched_scan_results_wk, which require strict
> execution ordering.
> Hence, an ordered dedicated workqueue has been used.
> 
> Since it's a wireless driver, WQ_MEM_RECLAIM has been set to ensure
> forward progress under memory pressure.
> 

Applied, thanks.

johannes

^ permalink raw reply

* Re: [PATCH 00/26] constify local structures
From: Julia Lawall @ 2016-09-12  8:54 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Julia Lawall, linux-renesas-soc, joe, kernel-janitors,
	Sergei Shtylyov, linux-pm, platform-driver-x86, linux-media,
	linux-can, Tatyana Nikolova, Shiraz Saleem, Mustafa Ismail,
	Chien Tin Tung, linux-rdma, netdev, devel, alsa-devel,
	linux-kernel, linux-fbdev, linux-wireless, Jason Gunthorpe,
	tpmdd-devel, linux-scsi, linux-spi, linux-usb, linux-acpi
In-Reply-To: <20160911172105.GB5493@intel.com>



On Sun, 11 Sep 2016, Jarkko Sakkinen wrote:

> On Sun, Sep 11, 2016 at 03:05:42PM +0200, Julia Lawall wrote:
> > Constify local structures.
> >
> > The semantic patch that makes this change is as follows:
> > (http://coccinelle.lip6.fr/)
>
> Just my two cents but:
>
> 1. You *can* use a static analysis too to find bugs or other issues.
> 2. However, you should manually do the commits and proper commit
>    messages to subsystems based on your findings. And I generally think
>    that if one contributes code one should also at least smoke test changes
>    somehow.
>
> I don't know if I'm alone with my opinion. I just think that one should
> also do the analysis part and not blindly create and submit patches.

All of the patches are compile tested.  And the individual patches are
submitted to the relevant maintainers.  The individual commit messages
give a more detailed explanation of the strategy used to decide that the
structure was constifiable.  It seemed redundant to put that in the cover
letter, which will not be committed anyway.

julia

>
> Anyway, I'll apply the TPM change at some point. As I said they were
> for better. Thanks.
>
> /Jarkko
>
> > // <smpl>
> > // The first rule ignores some cases that posed problems
> > @r disable optional_qualifier@
> > identifier s != {peri_clk_data,threshold_attr,tracer_flags,tracer};
> > identifier i != {s5k5baf_cis_rect,smtcfb_fix};
> > position p;
> > @@
> > static struct s i@p = { ... };
> >
> > @lstruct@
> > identifier r.s;
> > @@
> > struct s { ... };
> >
> > @used depends on lstruct@
> > identifier r.i;
> > @@
> > i
> >
> > @bad1@
> > expression e;
> > identifier r.i;
> > assignment operator a;
> > @@
> >  (<+...i...+>) a e
> >
> > @bad2@
> > identifier r.i;
> > @@
> >  &(<+...i...+>)
> >
> > @bad3@
> > identifier r.i;
> > declarer d;
> > @@
> >  d(...,<+...i...+>,...);
> >
> > @bad4@
> > identifier r.i;
> > type T;
> > T[] e;
> > identifier f;
> > position p;
> > @@
> >
> > f@p(...,
> > (
> >   (<+...i...+>)
> > &
> >   e
> > )
> > ,...)
> >
> > @bad4a@
> > identifier r.i;
> > type T;
> > T *e;
> > identifier f;
> > position p;
> > @@
> >
> > f@p(...,
> > (
> >   (<+...i...+>)
> > &
> >   e
> > )
> > ,...)
> >
> > @ok5@
> > expression *e;
> > identifier r.i;
> > position p;
> > @@
> > e =@p i
> >
> > @bad5@
> > expression *e;
> > identifier r.i;
> > position p != ok5.p;
> > @@
> > e =@p (<+...i...+>)
> >
> > @rr depends on used && !bad1 && !bad2 && !bad3 && !bad4 && !bad4a && !bad5@
> > identifier s,r.i;
> > position r.p;
> > @@
> >
> > static
> > +const
> >  struct s i@p = { ... };
> >
> > @depends on used && !bad1 && !bad2 && !bad3 && !bad4 && !bad4a && !bad5
> >  disable optional_qualifier@
> > identifier rr.s,r.i;
> > @@
> >
> > static
> > +const
> >  struct s i;
> > // </smpl>
> >
> > ---
> >
> >  drivers/acpi/acpi_apd.c                              |    8 +++---
> >  drivers/char/tpm/tpm-interface.c                     |   10 ++++----
> >  drivers/char/tpm/tpm-sysfs.c                         |    2 -
> >  drivers/cpufreq/intel_pstate.c                       |    8 +++---
> >  drivers/infiniband/hw/i40iw/i40iw_uk.c               |    6 ++---
> >  drivers/media/i2c/tvp514x.c                          |    2 -
> >  drivers/media/pci/ddbridge/ddbridge-core.c           |   18 +++++++--------
> >  drivers/media/pci/ngene/ngene-cards.c                |   14 ++++++------
> >  drivers/media/pci/smipcie/smipcie-main.c             |    8 +++---
> >  drivers/misc/sgi-xp/xpc_uv.c                         |    2 -
> >  drivers/net/arcnet/com20020-pci.c                    |   10 ++++----
> >  drivers/net/can/c_can/c_can_pci.c                    |    4 +--
> >  drivers/net/can/sja1000/plx_pci.c                    |   20 ++++++++---------
> >  drivers/net/ethernet/mellanox/mlx4/main.c            |    4 +--
> >  drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c |    2 -
> >  drivers/net/ethernet/renesas/sh_eth.c                |   14 ++++++------
> >  drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c     |    2 -
> >  drivers/net/wireless/ath/dfs_pattern_detector.c      |    2 -
> >  drivers/net/wireless/intel/iwlegacy/3945.c           |    4 +--
> >  drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c  |    2 -
> >  drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c  |    2 -
> >  drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c  |    2 -
> >  drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c  |    2 -
> >  drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c  |    2 -
> >  drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c  |    2 -
> >  drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c  |    2 -
> >  drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c  |    2 -
> >  drivers/platform/chrome/chromeos_laptop.c            |   22 +++++++++----------
> >  drivers/platform/x86/intel_scu_ipc.c                 |    6 ++---
> >  drivers/platform/x86/intel_telemetry_debugfs.c       |    2 -
> >  drivers/scsi/esas2r/esas2r_flash.c                   |    2 -
> >  drivers/scsi/hptiop.c                                |    6 ++---
> >  drivers/spi/spi-dw-pci.c                             |    4 +--
> >  drivers/staging/rtl8192e/rtl8192e/rtl_core.c         |    2 -
> >  drivers/usb/misc/ezusb.c                             |    2 -
> >  drivers/video/fbdev/matrox/matroxfb_g450.c           |    2 -
> >  lib/crc64_ecma.c                                     |    2 -
> >  sound/pci/ctxfi/ctatc.c                              |    2 -
> >  sound/pci/hda/patch_ca0132.c                         |   10 ++++----
> >  sound/pci/riptide/riptide.c                          |    2 -
> >  40 files changed, 110 insertions(+), 110 deletions(-)
>

^ permalink raw reply

* Re: [PATCH v2 1/6] rtl8723au: remove declaration of unimplemented functions
From: Greg Kroah-Hartman @ 2016-09-12  8:14 UTC (permalink / raw)
  To: Luca Ceresoli
  Cc: devel, Jes Sorensen, linux-wireless, linux-kernel, Larry Finger
In-Reply-To: <1472821069-5437-1-git-send-email-luca@lucaceresoli.net>

On Fri, Sep 02, 2016 at 02:57:44PM +0200, Luca Ceresoli wrote:
> These functions have been declared without any implementation since
> the first commit (364e30ebd2dbaccba430c603da03e68746eb932a) and there
> has been no mention of them in following commits.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: devel@driverdev.osuosl.org
> Cc: linux-kernel@vger.kernel.org
> 
> ---
> 
> Changes v1 -> v2:
> - improve the commit message.
> ---
>  drivers/staging/rtl8723au/include/recv_osdep.h | 3 ---
>  1 file changed, 3 deletions(-)

File is no longer in my tree.

^ permalink raw reply

* Re: [PATCH v3 1/6] staging: rtl8723au: remove unimplemented functions declaration
From: Greg Kroah-Hartman @ 2016-09-12  8:14 UTC (permalink / raw)
  To: Luca Ceresoli
  Cc: devel, Jes Sorensen, linux-wireless, linux-kernel, Larry Finger
In-Reply-To: <1473179817-7277-1-git-send-email-luca@lucaceresoli.net>

On Tue, Sep 06, 2016 at 06:36:52PM +0200, Luca Ceresoli wrote:
> These functions have been declared without any implementation since
> the first commit (364e30ebd2dbaccba430c603da03e68746eb932a) and there
> has been no mention of them in following commits.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: devel@driverdev.osuosl.org
> Cc: linux-kernel@vger.kernel.org
> 
> ---
> 
> Changes v2 -> v3:
> - add "staging: " prefix to commit message title.
> 
> Changes v1 -> v2:
> - improve the commit message.
> ---
>  drivers/staging/rtl8723au/include/recv_osdep.h | 3 ---

File is no longer in my tree :(

^ permalink raw reply

* Re: [PATCH] rtlbt: Add RTL8822BE Bluetooth device
From: Marcel Holtmann @ 2016-09-12  7:27 UTC (permalink / raw)
  To: Larry Finger
  Cc: Kalle Valo, devel, linux-wireless, linux-bluetooth,
	陆朱伟
In-Reply-To: <1473433325-25311-1-git-send-email-Larry.Finger@lwfinger.net>

Hi Larry,

> The RTL8822BE is a new Realtek wifi and BT device. Support for the BT
> part is hereby added.
> 
> As this device is similar to most of the other Realtek BT devices, the
> changes are minimal. The main difference is that the 8822BE needs a
> configuration file for enabling and disabling features. Thus code is
> added to select and load this configuration file. Although not needed
> at the moment, hooks are added for the other devices that might need
> such configuration files.
> 
> One additional change is to the routine that tests that the project
> ID contained in the firmware matches the hardware. As the project IDs
> are not sequential, continuing to use the position in the array as the
> expected value of the ID would require adding extra unused entries in
> the table, and any subsequant rearrangment of the array would break the
> code. To fix these problems, the array elements now contain both the
> hardware ID and the expected value for the project ID.
> 
> Signed-off-by: 陆朱伟 <alex_lu@realsil.com.cn>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> drivers/bluetooth/btrtl.c | 104 ++++++++++++++++++++++++++++++++++++++++------
> drivers/bluetooth/btrtl.h |   5 +++
> 2 files changed, 97 insertions(+), 12 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

^ permalink raw reply

* Re: support for QCA9377 SDIO (ath10k or ath6kl)
From: Valo, Kalle @ 2016-09-12  7:18 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: ath10k@lists.infradead.org, ath6kl@lists.infradead.org,
	linux-wireless@vger.kernel.org
In-Reply-To: <CAFBinCCObRokj=1rja7nZ6DKMgFWDZAtoWMBJrxmsuq0mLUxkg@mail.gmail.com>

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> is QCA planning to add SDIO support to ath10k or would this have to be
> done by a community developer?

I cannot really comment about company plans.

--=20
Kalle Valo=

^ permalink raw reply

* Re: [PATCH] cfg80211: cap 20MHz VHT bitrate at MCS 8
From: Johannes Berg @ 2016-09-12  6:43 UTC (permalink / raw)
  To: Pedersen, Thomas, Ben Greear, linux-wireless
In-Reply-To: <38049c4f-da5b-a6ec-bcc4-c803197abcd7@qca.qualcomm.com>

On Wed, 2016-09-07 at 18:20 +0000, Pedersen, Thomas wrote:
> On 09/06/2016 12:07 PM, Ben Greear wrote:
> > 
> > On 09/06/2016 12:00 PM, Thomas Pedersen wrote:
> > > 
> > > Some drivers (ath10k) report MCS 9 @ 20MHz, which
> > > technically isn't allowed. To get more meaningful value
> > > than 0 out of this however, just cap the bitrate for 20MHz
> > > to MCS 8.
> > 
> > If it is actually reporting MCS9, why lie about it?  Report it up
> > the stack as a proper value instead of hiding the issue?
> 
> Good point, will send a v2 extrapolating the value to 86.5Mb/s.

That makes no sense either, IMHO.

Are you saying that ath10k actually somehow manages to use an invalid
bitrate over the air?!

It seems more likely that it's actually just misreporting what it's
doing, and thus the issue should be fixed in ath10k.

johannes

^ permalink raw reply

* Re: [PATCH 2/3] ath10k:  Grab rcu_read_lock before the txqs spinlock.
From: Johannes Berg @ 2016-09-12  6:41 UTC (permalink / raw)
  To: Ben Greear, Valo, Kalle
  Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
In-Reply-To: <57D2CB92.3020407@candelatech.com>


> > > -	rcu_read_unlock();
> > >   	spin_unlock_bh(&ar->txqs_lock);
> > > +	rcu_read_unlock();
> > 
> > I'm no RCU expert but this isn't making any sense. Maybe it changes
> > timings on your kernel so that it hides the real problem?
> 
> I'm not sure this fixed anything or not, it just seemed weird so I
> changed it.
> 
> I was hoping someone that understood rcu locking would comment...
> 

RCU is no "locking". The sooner you get over that notion, the better.

This therefore make no sense whatsoever.

In fact, you want to keep the RCU protected section *small*, so having
the spinlock inside hurts overall system performance.

johannes

^ permalink raw reply

* Request for brcmfmac4366c-pcie.bin
From: Rafał Miłecki @ 2016-09-12  5:22 UTC (permalink / raw)
  To: Hante Meuleman, Arend Van Spriel, bcm-kernel-feedback-list
  Cc: linux-wireless@vger.kernel.org, Hauke Mehrtens, Nathan Grennan

Hi,

Few months ago Hante added support for 4366c0 to the brcmfmac. There
are already few devices with this chipset on the market. We even have
some related bug report at kernel:
https://bugzilla.kernel.org/show_bug.cgi?id=3D135321

Unfortunately the firmware for this chipset is still missing. Can you
build it and submit to linux-firmware.git, please?

--=20
Rafa=C5=82

^ permalink raw reply

* Re: [PATCH 00/26] constify local structures
From: Julia Lawall @ 2016-09-11 19:11 UTC (permalink / raw)
  To: Joe Perches
  Cc: Julia Lawall, linux-renesas-soc, kernel-janitors, Sergei Shtylyov,
	linux-pm, platform-driver-x86, linux-media, linux-can,
	Tatyana Nikolova, Shiraz Saleem, Mustafa Ismail, Chien Tin Tung,
	linux-rdma, netdev, devel, alsa-devel, linux-kernel, linux-fbdev,
	linux-wireless, Jason Gunthorpe, tpmdd-devel, linux-scsi,
	linux-spi, linux-usb, linux-acpi
In-Reply-To: <1473616576.19464.10.camel@perches.com>


On Sun, 11 Sep 2016, Joe Perches wrote:

> On Sun, 2016-09-11 at 15:05 +0200, Julia Lawall wrote:
> > Constify local structures.
>
> Thanks Julia.
>
> A few suggestions & questions:
>
> Perhaps the script should go into scripts/coccinelle/
> so that future cases could be caught by the robot
> and commit message referenced by the patch instances.

OK.

> Can you please compile the files modified using the
> appropriate defconfig/allyesconfig and show the

I currently send patches for this issue only for files that compile using
the x86 allyesconfig.

> movement from data to const by using
> 	$ size <object>.new/old
> and include that in the changelogs (maybe next time)?

OK, thanks for the suggestion.

> Is it possible for a rule to trace the instances where
> an address of a struct or struct member is taken by
> locally defined and declared function call where the
> callee does not modify any dereferenced object?
>
> ie:
>
> struct foo {
> 	int bar;
> 	char *baz;
> };
>
> struct foo qux[] = {
> 	{ 1, "description 1" },
> 	{ 2, "dewcription 2" },
> 	[ n, "etc" ]...,
> };
>
> void message(struct foo *msg)
> {
> 	printk("%d %s\n", msg->bar, msg->baz);
> }
>
> where some code uses
>
> 	message(qux[index]);
>
> So could a coccinelle script change:
>
> struct foo qux[] = { to const struct foo quz[] = {
>
> and
>
> void message(struct foo *msg) to void message(const struct foo *msg)

Yes, this could be possible too.

Thanks for the feedback.

julia

^ permalink raw reply

* Re: [PATCH 00/26] constify local structures
From: Joe Perches @ 2016-09-11 17:56 UTC (permalink / raw)
  To: Julia Lawall, linux-renesas-soc
  Cc: kernel-janitors, Sergei Shtylyov, linux-pm, platform-driver-x86,
	linux-media, linux-can, Tatyana Nikolova, Shiraz Saleem,
	Mustafa Ismail, Chien Tin Tung, linux-rdma, netdev, devel,
	alsa-devel, linux-kernel, linux-fbdev, linux-wireless,
	Jason Gunthorpe, tpmdd-devel, linux-scsi, linux-spi, linux-usb,
	linux-acpi
In-Reply-To: <1473599168-30561-1-git-send-email-Julia.Lawall@lip6.fr>

On Sun, 2016-09-11 at 15:05 +0200, Julia Lawall wrote:
> Constify local structures.

Thanks Julia.

A few suggestions & questions:

Perhaps the script should go into scripts/coccinelle/
so that future cases could be caught by the robot
and commit message referenced by the patch instances.

Can you please compile the files modified using the
appropriate defconfig/allyesconfig and show the
movement from data to const by using
	$ size <object>.new/old
and include that in the changelogs (maybe next time)?

Is it possible for a rule to trace the instances where
an address of a struct or struct member is taken by
locally defined and declared function call where the
callee does not modify any dereferenced object?

ie:

struct foo {
	int bar;
	char *baz;
};

struct foo qux[] = {
	{ 1, "description 1" },
	{ 2, "dewcription 2" },
	[ n, "etc" ]...,
};

void message(struct foo *msg)
{
	printk("%d %s\n", msg->bar, msg->baz);
}

where some code uses

	message(qux[index]);

So could a coccinelle script change:

struct foo qux[] = { to const struct foo quz[] = {

and

void message(struct foo *msg) to void message(const struct foo *msg)

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox