Re: [v8 4/8] rsi: add coex support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Prameela,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on v4.16-rc2 next-20180223]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Amitkumar-Karwar/rsi-add-bluetooth-and-coex-support/20180226-073244
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sh 

Note: the linux-review/Amitkumar-Karwar/rsi-add-bluetooth-and-coex-support/20180226-073244 HEAD 9c5222af2b3dbf5143bc1fa4dc0af78fcfa3559d builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   drivers/net//wireless/rsi/rsi_91x_main.c: In function 'rsi_read_pkt':
>> drivers/net//wireless/rsi/rsi_91x_main.c:165:5: error: implicit declaration of function 'rsi_coex_recv_pkt'; did you mean 'rsi_read_pkt'? [-Werror=implicit-function-declaration]
        rsi_coex_recv_pkt(common, frame_desc + offset);
        ^~~~~~~~~~~~~~~~~
        rsi_read_pkt
   drivers/net//wireless/rsi/rsi_91x_main.c: In function 'rsi_91x_init':
>> drivers/net//wireless/rsi/rsi_91x_main.c:287:7: error: implicit declaration of function 'rsi_coex_attach'; did you mean 'driver_attach'? [-Werror=implicit-function-declaration]
      if (rsi_coex_attach(common)) {
          ^~~~~~~~~~~~~~~
          driver_attach
   drivers/net//wireless/rsi/rsi_91x_main.c: In function 'rsi_91x_deinit':
>> drivers/net//wireless/rsi/rsi_91x_main.c:323:3: error: implicit declaration of function 'rsi_coex_detach'; did you mean 'rsi_91x_deinit'? [-Werror=implicit-function-declaration]
      rsi_coex_detach(common);
      ^~~~~~~~~~~~~~~
      rsi_91x_deinit
   cc1: some warnings being treated as errors

vim +165 drivers/net//wireless/rsi/rsi_91x_main.c

   133	
   134	/**
   135	 * rsi_read_pkt() - This function reads frames from the card.
   136	 * @common: Pointer to the driver private structure.
   137	 * @rcv_pkt_len: Received pkt length. In case of USB it is 0.
   138	 *
   139	 * Return: 0 on success, -1 on failure.
   140	 */
   141	int rsi_read_pkt(struct rsi_common *common, u8 *rx_pkt, s32 rcv_pkt_len)
   142	{
   143		u8 *frame_desc = NULL, extended_desc = 0;
   144		u32 index, length = 0, queueno = 0;
   145		u16 actual_length = 0, offset;
   146		struct sk_buff *skb = NULL;
   147	
   148		index = 0;
   149		do {
   150			frame_desc = &rx_pkt[index];
   151			actual_length = *(u16 *)&frame_desc[0];
   152			offset = *(u16 *)&frame_desc[2];
   153	
   154			queueno = rsi_get_queueno(frame_desc, offset);
   155			length = rsi_get_length(frame_desc, offset);
   156	
   157			/* Extended descriptor is valid for WLAN queues only */
   158			if (queueno == RSI_WIFI_DATA_Q || queueno == RSI_WIFI_MGMT_Q)
   159				extended_desc = rsi_get_extended_desc(frame_desc,
   160								      offset);
   161	
   162			switch (queueno) {
   163			case RSI_COEX_Q:
   164				if (common->coex_mode > 1)
 > 165					rsi_coex_recv_pkt(common, frame_desc + offset);
   166				else
   167					rsi_mgmt_pkt_recv(common,
   168							  (frame_desc + offset));
   169				break;
   170	
   171			case RSI_WIFI_DATA_Q:
   172				skb = rsi_prepare_skb(common,
   173						      (frame_desc + offset),
   174						      length,
   175						      extended_desc);
   176				if (skb == NULL)
   177					goto fail;
   178	
   179				rsi_indicate_pkt_to_os(common, skb);
   180				break;
   181	
   182			case RSI_WIFI_MGMT_Q:
   183				rsi_mgmt_pkt_recv(common, (frame_desc + offset));
   184				break;
   185	
   186			default:
   187				rsi_dbg(ERR_ZONE, "%s: pkt from invalid queue: %d\n",
   188					__func__,   queueno);
   189				goto fail;
   190			}
   191	
   192			index  += actual_length;
   193			rcv_pkt_len -= actual_length;
   194		} while (rcv_pkt_len > 0);
   195	
   196		return 0;
   197	fail:
   198		return -EINVAL;
   199	}
   200	EXPORT_SYMBOL_GPL(rsi_read_pkt);
   201	
   202	/**
   203	 * rsi_tx_scheduler_thread() - This function is a kernel thread to send the
   204	 *			       packets to the device.
   205	 * @common: Pointer to the driver private structure.
   206	 *
   207	 * Return: None.
   208	 */
   209	static void rsi_tx_scheduler_thread(struct rsi_common *common)
   210	{
   211		struct rsi_hw *adapter = common->priv;
   212		u32 timeout = EVENT_WAIT_FOREVER;
   213	
   214		do {
   215			if (adapter->determine_event_timeout)
   216				timeout = adapter->determine_event_timeout(adapter);
   217			rsi_wait_event(&common->tx_thread.event, timeout);
   218			rsi_reset_event(&common->tx_thread.event);
   219	
   220			if (common->init_done)
   221				rsi_core_qos_processor(common);
   222		} while (atomic_read(&common->tx_thread.thread_done) == 0);
   223		complete_and_exit(&common->tx_thread.completion, 0);
   224	}
   225	
   226	enum rsi_host_intf rsi_get_host_intf(void *priv)
   227	{
   228		struct rsi_common *common = (struct rsi_common *)priv;
   229	
   230		return common->priv->rsi_host_intf;
   231	}
   232	
   233	/**
   234	 * rsi_91x_init() - This function initializes os interface operations.
   235	 * @void: Void.
   236	 *
   237	 * Return: Pointer to the adapter structure on success, NULL on failure .
   238	 */
   239	struct rsi_hw *rsi_91x_init(void)
   240	{
   241		struct rsi_hw *adapter = NULL;
   242		struct rsi_common *common = NULL;
   243		u8 ii = 0;
   244	
   245		adapter = kzalloc(sizeof(*adapter), GFP_KERNEL);
   246		if (!adapter)
   247			return NULL;
   248	
   249		adapter->priv = kzalloc(sizeof(*common), GFP_KERNEL);
   250		if (adapter->priv == NULL) {
   251			rsi_dbg(ERR_ZONE, "%s: Failed in allocation of memory\n",
   252				__func__);
   253			kfree(adapter);
   254			return NULL;
   255		} else {
   256			common = adapter->priv;
   257			common->priv = adapter;
   258		}
   259	
   260		for (ii = 0; ii < NUM_SOFT_QUEUES; ii++)
   261			skb_queue_head_init(&common->tx_queue[ii]);
   262	
   263		rsi_init_event(&common->tx_thread.event);
   264		mutex_init(&common->mutex);
   265		mutex_init(&common->tx_lock);
   266		mutex_init(&common->rx_lock);
   267		mutex_init(&common->tx_bus_mutex);
   268	
   269		if (rsi_create_kthread(common,
   270				       &common->tx_thread,
   271				       rsi_tx_scheduler_thread,
   272				       "Tx-Thread")) {
   273			rsi_dbg(ERR_ZONE, "%s: Unable to init tx thrd\n", __func__);
   274			goto err;
   275		}
   276	
   277		rsi_default_ps_params(adapter);
   278		spin_lock_init(&adapter->ps_lock);
   279		timer_setup(&common->roc_timer, rsi_roc_timeout, 0);
   280		init_completion(&common->wlan_init_completion);
   281		common->init_done = true;
   282	
   283		common->coex_mode = RSI_DEV_COEX_MODE_WIFI_ALONE;
   284		common->oper_mode = RSI_DEV_OPMODE_WIFI_ALONE;
   285		adapter->device_model = RSI_DEV_9113;
   286		if (common->coex_mode > 1) {
 > 287			if (rsi_coex_attach(common)) {
   288				rsi_dbg(ERR_ZONE, "Failed to init coex module\n");
   289				goto err;
   290			}
   291		}
   292	
   293		return adapter;
   294	
   295	err:
   296		kfree(common);
   297		kfree(adapter);
   298		return NULL;
   299	}
   300	EXPORT_SYMBOL_GPL(rsi_91x_init);
   301	
   302	/**
   303	 * rsi_91x_deinit() - This function de-intializes os intf operations.
   304	 * @adapter: Pointer to the adapter structure.
   305	 *
   306	 * Return: None.
   307	 */
   308	void rsi_91x_deinit(struct rsi_hw *adapter)
   309	{
   310		struct rsi_common *common = adapter->priv;
   311		u8 ii;
   312	
   313		rsi_dbg(INFO_ZONE, "%s: Performing deinit os ops\n", __func__);
   314	
   315		rsi_kill_thread(&common->tx_thread);
   316	
   317		for (ii = 0; ii < NUM_SOFT_QUEUES; ii++)
   318			skb_queue_purge(&common->tx_queue[ii]);
   319	
   320		common->init_done = false;
   321	
   322		if (common->coex_mode > 1)
 > 323			rsi_coex_detach(common);
   324	
   325		kfree(common);
   326		kfree(adapter->rsi_dev);
   327		kfree(adapter);
   328	}
   329	EXPORT_SYMBOL_GPL(rsi_91x_deinit);
   330	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux