[PATCH 1/4] Staging: rtl8192u: Space not allowed after

2015-09-10 Thread mike dupuis
This is a change to ieee80211_softmac_wx.c to remove spaces after unary
& operators.

Signed-off-by: Mike Dupuis 
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
index 3e502520..80130a5d 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
@@ -32,7 +32,7 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, 
struct iw_request_info
 union iwreq_data *wrqu, char *b)
 {
int ret;
-   struct iw_freq *fwrq = & wrqu->freq;
+   struct iw_freq *fwrq = >freq;
 
down(>wx_sem);
 
@@ -89,7 +89,7 @@ int ieee80211_wx_get_freq(struct ieee80211_device *ieee,
 struct iw_request_info *a,
 union iwreq_data *wrqu, char *b)
 {
-   struct iw_freq *fwrq = & wrqu->freq;
+   struct iw_freq *fwrq = >freq;
 
if (ieee->current_network.channel == 0)
return -1;
-- 
2.1.4


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/4] Staging: rtl8192u: space required before open braces

2015-09-10 Thread mike dupuis
This is a change to add spaces before open braces to
ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis 
---
 .../staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c  | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
index 80130a5d..57acab2 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
@@ -57,7 +57,7 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, 
struct iw_request_info
}
}
 
-   if (fwrq->e > 0 || fwrq->m > 14 || fwrq->m < 1 ){
+   if (fwrq->e > 0 || fwrq->m > 14 || fwrq->m < 1 ) {
ret = -EOPNOTSUPP;
goto out;
 
@@ -71,7 +71,7 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, 
struct iw_request_info
ieee->set_chan(ieee->dev, ieee->current_network.channel);
 
if(ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == 
IW_MODE_MASTER)
-   if(ieee->state == IEEE80211_LINKED){
+   if(ieee->state == IEEE80211_LINKED) {
 
ieee80211_stop_send_beacons(ieee);
ieee80211_start_send_beacons(ieee);
@@ -191,14 +191,14 @@ EXPORT_SYMBOL(ieee80211_wx_set_wap);
spin_lock_irqsave(>lock, flags);
 
if (ieee->current_network.ssid[0] == '\0' ||
-   ieee->current_network.ssid_len == 0){
+   ieee->current_network.ssid_len == 0) {
ret = -1;
goto out;
}
 
if (ieee->state != IEEE80211_LINKED &&
ieee->state != IEEE80211_LINKED_SCANNING &&
-   ieee->ssid_set == 0){
+   ieee->ssid_set == 0) {
ret = -1;
goto out;
}
@@ -280,16 +280,16 @@ int ieee80211_wx_set_mode(struct ieee80211_device *ieee, 
struct iw_request_info
if (wrqu->mode == ieee->iw_mode)
goto out;
 
-   if (wrqu->mode == IW_MODE_MONITOR){
+   if (wrqu->mode == IW_MODE_MONITOR) {
 
ieee->dev->type = ARPHRD_IEEE80211;
-   }else{
+   }else {
ieee->dev->type = ARPHRD_ETHER;
}
 
-   if (!ieee->proto_started){
+   if (!ieee->proto_started) {
ieee->iw_mode = wrqu->mode;
-   }else{
+   }else {
ieee80211_stop_protocol(ieee);
ieee->iw_mode = wrqu->mode;
ieee80211_start_protocol(ieee);
@@ -426,7 +426,7 @@ int ieee80211_wx_set_essid(struct ieee80211_device *ieee,
ieee->current_network.ssid_len = len+1;
ieee->ssid_set = 1;
}
-   else{
+   else {
ieee->ssid_set = 0;
ieee->current_network.ssid[0] = '\0';
ieee->current_network.ssid_len = 0;
-- 
2.1.4


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 4/4] Staging: rtl8192u: space prohibited before close parenthesis

2015-09-10 Thread mike dupuis
This is a style change to remove whitespace before close parentheses in
ieee80211_softmac_wx.c

Signed-off-by: Mike Dupuis 
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
index 45d710e..3662925 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
@@ -57,7 +57,7 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, 
struct iw_request_info
}
}
 
-   if (fwrq->e > 0 || fwrq->m > 14 || fwrq->m < 1 ) {
+   if (fwrq->e > 0 || fwrq->m > 14 || fwrq->m < 1) {
ret = -EOPNOTSUPP;
goto out;
 
@@ -345,7 +345,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
ieee->state = IEEE80211_LINKED;
ieee->link_change(ieee->dev);
// To prevent the immediately calling watch_dog after scan.
-   if 
(ieee->LinkDetectInfo.NumRecvBcnInPeriod==0||ieee->LinkDetectInfo.NumRecvDataInPeriod==0
 )
+   if 
(ieee->LinkDetectInfo.NumRecvBcnInPeriod==0||ieee->LinkDetectInfo.NumRecvDataInPeriod==0)
{
ieee->LinkDetectInfo.NumRecvBcnInPeriod = 1;
ieee->LinkDetectInfo.NumRecvDataInPeriod= 1;
-- 
2.1.4


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/4] Staging: rtl8192u: space required after close braces

2015-09-10 Thread mike dupuis
This is a style change to insert spaces before closed braces in
ieee80211_softmac_wx.c

Signed-off-by: Mike Dupuis 
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
index 57acab2..45d710e 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
@@ -61,7 +61,7 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, 
struct iw_request_info
ret = -EOPNOTSUPP;
goto out;
 
-   }else { /* Set the channel */
+   } else { /* Set the channel */
 
if (!(GET_DOT11D_INFO(ieee)->channel_map)[fwrq->m]) {
ret = -EINVAL;
@@ -283,13 +283,13 @@ int ieee80211_wx_set_mode(struct ieee80211_device *ieee, 
struct iw_request_info
if (wrqu->mode == IW_MODE_MONITOR) {
 
ieee->dev->type = ARPHRD_IEEE80211;
-   }else {
+   } else {
ieee->dev->type = ARPHRD_ETHER;
}
 
if (!ieee->proto_started) {
ieee->iw_mode = wrqu->mode;
-   }else {
+   } else {
ieee80211_stop_protocol(ieee);
ieee->iw_mode = wrqu->mode;
ieee80211_start_protocol(ieee);
-- 
2.1.4


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/5] staging: wilc1000: remove STATIC_MACADDRESS

2015-09-10 Thread Tony Cho
This patch removes unused definition, STATIC_MACADDRESS from the
linux_wlan.c file.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/linux_wlan.c | 77 ---
 1 file changed, 77 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 335335a..df5ee26 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -37,13 +37,6 @@
 #include "linux_wlan_spi.h"
 #endif
 
-#ifdef STATIC_MACADDRESS /* brandy_0724 [[ */
-#include 
-#include 
-struct task_struct *wilc_mac_thread;
-unsigned char mac_add[] = {0x00, 0x80, 0xC2, 0x5E, 0xa2, 0xb2};
-#endif /* brandy_0724 ]] */
-
 #if defined(CUSTOMER_PLATFORM)
 /*
  TODO : Write power control functions as customer platform.
@@ -862,19 +855,15 @@ static int linux_wlan_init_test_config(struct net_device 
*dev, linux_wlan_t *p_n
 {
 
unsigned char c_val[64];
-   #ifndef STATIC_MACADDRESS
unsigned char mac_add[] = {0x00, 0x80, 0xC2, 0x5E, 0xa2, 0xff};
-   #endif
 
/*BugID_5077*/
struct WILC_WFI_priv *priv;
tstrWILC_WFIDrv *pstrWFIDrv;
 
PRINT_D(TX_DBG, "Start configuring Firmware\n");
-   #ifndef STATIC_MACADDRESS
get_random_bytes(_add[5], 1);
get_random_bytes(_add[4], 1);
-   #endif
priv = wiphy_priv(dev->ieee80211_ptr->wiphy);
pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv;
PRINT_D(INIT_DBG, "Host = %p\n", pstrWFIDrv);
@@ -1415,66 +1404,6 @@ static void wlan_deinitialize_threads(linux_wlan_t *nic)
#endif
 }
 
-#ifdef STATIC_MACADDRESS
-const char *path_string[] = {
-   "/etc/wlan",
-   "/data/wlan",
-};
-
-static int linux_wlan_read_mac_addr(void *vp)
-{
-   int ret = 0;
-   struct file *fp = (struct file *)-ENOENT;
-   mm_segment_t old_fs;
-   loff_t pos = 0;
-   int index;
-   int array_size = ARRAY_SIZE(path_string);
-
-   /* change to KERNEL_DS address limit */
-   old_fs = get_fs();
-   set_fs(KERNEL_DS);
-
-   for (index = 0; index < array_size; index++) {
-   fp = filp_open(path_string[index], O_WRONLY, 0640);
-   if (!fp) {
-   ret = -1;
-   goto exit;
-   }
-
-   /*No such file or directory */
-   if (IS_ERR(fp) || !fp->f_op) {
-   get_random_bytes(_add[3], 3);
-   /* open file to write */
-   fp = filp_open(path_string[index], O_WRONLY | O_CREAT, 
0640);
-
-   if (!fp || IS_ERR(fp)) {
-   ret = -1;
-   continue;
-   } else {
-   /* write buf to file */
-   fp->f_op->write(fp, mac_add, 6, );
-   break;
-   }
-   } else {
-   /* read file to buf */
-   fp->f_op->read(fp, mac_add, 6, );
-   break;
-   }
-   }
-
-   if (index == array_size)
-   PRINT_ER("random MAC\n");
-
-exit:
-   if (fp && !IS_ERR(fp))
-   filp_close(fp, NULL);
-
-   set_fs(old_fs);
-
-   return ret;
-}
-#endif
-
 #ifdef COMPLEMENT_BOOT
 
 extern volatile int probe;
@@ -1581,12 +1510,6 @@ int wilc1000_wlan_init(struct net_device *dev, 
perInterface_wlan_t *p_nic)
 
wlan_init_locks(g_linux_wlan);
 
-#ifdef STATIC_MACADDRESS
-   wilc_mac_thread = kthread_run(linux_wlan_read_mac_addr, NULL, 
"wilc_mac_thread");
-   if (wilc_mac_thread < 0)
-   PRINT_ER("couldn't create Mac addr thread\n");
-#endif
-
linux_to_wlan(, g_linux_wlan);
 
ret = wilc_wlan_init(, );
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/5] staging: wilc1000: remove unused global variables

2015-09-10 Thread Tony Cho
This patch removes the followings from the driver because they are in
debugging purpose but not used anymore.
- int_clrd
- int_rcvdU
- int_rcvdB
- android_wifi_priv_cmd structure

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/linux_wlan.c | 17 -
 drivers/staging/wilc1000/wilc_sdio.c  |  3 ---
 drivers/staging/wilc1000/wilc_spi.c   |  3 ---
 3 files changed, 23 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 8e19095..63f44f8 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -101,12 +101,6 @@ static struct notifier_block g_dev_notifier = {
if (g_linux_wlan->oup.wlan_cleanup != NULL) \
g_linux_wlan->oup.wlan_cleanup(); }
 
-typedef struct android_wifi_priv_cmd {
-   char *buf;
-   int used_len;
-   int total_len;
-} android_wifi_priv_cmd;
-
 #define IRQ_WAIT   1
 #define IRQ_NO_WAIT0
 /*
@@ -116,9 +110,6 @@ typedef struct android_wifi_priv_cmd {
  *  deinitialized from mdoule_exit
  */
 static struct semaphore close_exit_sync;
-unsigned int int_rcvdU;
-unsigned int int_rcvdB;
-unsigned int int_clrd;
 
 static int wlan_deinit_locks(linux_wlan_t *nic);
 static void wlan_deinitialize_threads(linux_wlan_t *nic);
@@ -340,7 +331,6 @@ void linux_wlan_disable_irq(int wait)
 #if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
 static irqreturn_t isr_uh_routine(int irq, void *user_data)
 {
-   int_rcvdU++;
 #if (RX_BH_TYPE != RX_BH_THREADED_IRQ)
linux_wlan_disable_irq(IRQ_NO_WAIT);
 #endif
@@ -395,7 +385,6 @@ static void isr_bh_routine(struct work_struct *work)
#endif
}
 
-   int_rcvdB++;
PRINT_D(INT_DBG, "Interrupt received BH\n");
if (g_linux_wlan->oup.wlan_handle_rx_isr != 0)
g_linux_wlan->oup.wlan_handle_rx_isr();
@@ -422,7 +411,6 @@ static int isr_bh_routine(void *vp)
 
break;
}
-   int_rcvdB++;
PRINT_D(INT_DBG, "Interrupt received BH\n");
if (g_linux_wlan->oup.wlan_handle_rx_isr != 0)
g_linux_wlan->oup.wlan_handle_rx_isr();
@@ -1792,7 +1780,6 @@ int mac_xmit(struct sk_buff *skb, struct net_device *ndev)
 
nic = netdev_priv(ndev);
 
-   PRINT_D(INT_DBG, "\n\n IntUH: %d - IntBH: %d - IntCld: 
%d\n\n", int_rcvdU, int_rcvdB, int_clrd);
PRINT_D(TX_DBG, "Sending packet just received from TCP/IP\n");
 
/* Stop the network interface queue */
@@ -2096,10 +2083,6 @@ int wilc_netdev_init(void)
if (!g_linux_wlan)
return -ENOMEM;
 
-   /*Reset interrupt count debug*/
-   int_rcvdU = 0;
-   int_rcvdB = 0;
-   int_clrd = 0;
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
register_inetaddr_notifier(_dev_notifier);
#endif
diff --git a/drivers/staging/wilc1000/wilc_sdio.c 
b/drivers/staging/wilc1000/wilc_sdio.c
index 5a18148..79aa4a1 100644
--- a/drivers/staging/wilc1000/wilc_sdio.c
+++ b/drivers/staging/wilc1000/wilc_sdio.c
@@ -32,7 +32,6 @@ static wilc_sdio_t g_sdio;
 static int sdio_write_reg(uint32_t addr, uint32_t data);
 static int sdio_read_reg(uint32_t addr, uint32_t *data);
 #endif
-extern unsigned int int_clrd;
 
 /
  *
@@ -167,7 +166,6 @@ static int sdio_clear_int(void)
cmd.address = 0x4;
cmd.data = 0;
g_sdio.sdio_cmd52();
-   int_clrd++;
 
return cmd.data;
 #else
@@ -179,7 +177,6 @@ static int sdio_clear_int(void)
}
reg &= ~0x1;
sdio_write_reg(WILC_HOST_RX_CTRL_0, reg);
-   int_clrd++;
return 1;
 #endif
 
diff --git a/drivers/staging/wilc1000/wilc_spi.c 
b/drivers/staging/wilc1000/wilc_spi.c
index d7bb204..d9ccca9 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -10,8 +10,6 @@
 #include "wilc_wlan_if.h"
 #include "wilc_wlan.h"
 
-extern unsigned int int_clrd;
-
 /*
  * #include 
  * #include 
@@ -1030,7 +1028,6 @@ static int spi_clear_int(void)
}
reg &= ~0x1;
spi_write_reg(WILC_HOST_RX_CTRL_0, reg);
-   int_clrd++;
return 1;
 }
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 4/5] staging: wilc1000: remove unused enum

2015-09-10 Thread Tony Cho
From: Glen Lee 

This patch removes a unused enum tenuFrameClass.

Signed-off-by: Glen Lee 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/coreconfigurator.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index 58e6108..450c3ff 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -88,14 +88,6 @@ typedef enum {
FRAME_SUBTYPE_FORCE_32BIT  = 0x
 } tenuFrmSubtype;
 
-/* Basic Frame Classes */
-typedef enum {
-   CLASS1_FRAME_TYPE  = 0x00,
-   CLASS2_FRAME_TYPE  = 0x01,
-   CLASS3_FRAME_TYPE  = 0x02,
-   FRAME_CLASS_FORCE_32BIT  = 0x
-} tenuFrameClass;
-
 /* Element ID  of various Information Elements */
 typedef enum {
ISSID   = 0,   /* Service Set Identifier */
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/5] staging: wilc1000: remove firmware definition

2015-09-10 Thread Tony Cho
This patch removes the firmware definitions, STA_FIRMWARE, AP_FIRMWARE, and
P2P_CONCURRENCY_FIRMWARE from the linux_wlan.c file because they are
defined in the Makefile.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/linux_wlan.c | 12 
 1 file changed, 12 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index df5ee26..8e19095 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -101,18 +101,6 @@ static struct notifier_block g_dev_notifier = {
if (g_linux_wlan->oup.wlan_cleanup != NULL) \
g_linux_wlan->oup.wlan_cleanup(); }
 
-#ifndef STA_FIRMWARE
-#define STA_FIRMWARE   "wifi_firmware.bin"
-#endif
-
-#ifndef AP_FIRMWARE
-#define AP_FIRMWARE"wifi_firmware_ap.bin"
-#endif
-
-#ifndef P2P_CONCURRENCY_FIRMWARE
-#define P2P_CONCURRENCY_FIRMWARE   "wifi_firmware_p2p_concurrency.bin"
-#endif
-
 typedef struct android_wifi_priv_cmd {
char *buf;
int used_len;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 5/5] staging: wilc1000: coreconfigurator.c: remove unused functions

2015-09-10 Thread Tony Cho
From: Glen Lee 

This patch removes following unused funtions which will not be used anymore.

ascii_hex_to_dec
get_hex_char
extract_mac_addr
create_mac_addr
conv_ip_to_int
conv_int_to_ip
get_wid_type
get_type
CreateConfigPacket
ConfigWaitResponse
ConfigProvideResponse
ConfigPktReceived
ParseWriteResponse
CreatePacketHeader
ParseResponse
ProcessBinWid
ProcessAdrWid
ProcessStrWid
ProcessIPwid
ProcessIntWid
ProcessShortWid
ProcessCharWid

As a result, four global variable causes defined but not used compile warnings.
So just remove unused varialbs g_seqno, g_wid_num, Res_Len and g_oper_mode.

Signed-off-by: Glen Lee 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/coreconfigurator.c | 151 
 1 file changed, 151 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index 450c3ff..f339085 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -1789,157 +1789,6 @@ s32 CreatePacketHeader(char *pcpacket, s32 
*ps32PacketLength)
 }
 
 /**
- *  @brief  creates Configuration packet based on the Input WIDs
- *  @details
- *  @param[in]  pstrWIDs WIDs to be sent in the configuration packet
- *  @param[in]  u32WIDsCount number of WIDs to be sent in the configuration 
packet
- *  @param[out] ps8packet The created Configuration Packet
- *  @param[out] ps32PacketLength Length of the created Configuration 
Packet
- *  @return Error code indicating success/failure
- *  @note
- *  @author
- *  @date  1 Mar 2012
- *  @version   1.0
- */
-
-s32 CreateConfigPacket(s8 *ps8packet, s32 *ps32PacketLength,
-  tstrWID *pstrWIDs, u32 u32WIDsCount)
-{
-   s32 s32Error = WILC_SUCCESS;
-   u32 u32idx = 0;
-   *ps32PacketLength = MSG_HEADER_LEN;
-   for (u32idx = 0; u32idx < u32WIDsCount; u32idx++) {
-   switch (pstrWIDs[u32idx].enuWIDtype) {
-   case WID_CHAR:
-   ProcessCharWid(ps8packet, ps32PacketLength, 
[u32idx],
-  pstrWIDs[u32idx].ps8WidVal);
-   break;
-
-   case WID_SHORT:
-   ProcessShortWid(ps8packet, ps32PacketLength, 
[u32idx],
-   pstrWIDs[u32idx].ps8WidVal);
-   break;
-
-   case WID_INT:
-   ProcessIntWid(ps8packet, ps32PacketLength, 
[u32idx],
- pstrWIDs[u32idx].ps8WidVal);
-   break;
-
-   case WID_STR:
-   ProcessStrWid(ps8packet, ps32PacketLength, 
[u32idx],
- pstrWIDs[u32idx].ps8WidVal, 
pstrWIDs[u32idx].s32ValueSize);
-   break;
-
-   case WID_IP:
-   ProcessIPwid(ps8packet, ps32PacketLength, 
[u32idx],
-pstrWIDs[u32idx].ps8WidVal);
-   break;
-
-   case WID_BIN_DATA:
-   ProcessBinWid(ps8packet, ps32PacketLength, 
[u32idx],
- pstrWIDs[u32idx].ps8WidVal, 
pstrWIDs[u32idx].s32ValueSize);
-   break;
-
-   default:
-   PRINT_ER("ERROR: Check Config database\n");
-   }
-   }
-
-   CreatePacketHeader(ps8packet, ps32PacketLength);
-
-   return s32Error;
-}
-
-s32 ConfigWaitResponse(char *pcRespBuffer, s32 s32MaxRespBuffLen, s32 
*ps32BytesRead,
-  bool bRespRequired)
-{
-   s32 s32Error = WILC_SUCCESS;
-   /*bug 3878*/
-   /*removed to caller function*/
-   /*gstrConfigPktInfo.pcRespBuffer = pcRespBuffer;
-* gstrConfigPktInfo.s32MaxRespBuffLen = s32MaxRespBuffLen;
-* gstrConfigPktInfo.bRespRequired = bRespRequired;*/
-
-
-   if (gstrConfigPktInfo.bRespRequired) {
-   down();
-
-   *ps32BytesRead = gstrConfigPktInfo.s32BytesRead;
-   }
-
-   memset((void *)(), 0, sizeof(tstrConfigPktInfo));
-
-   return s32Error;
-}
-
-s32 ConfigProvideResponse(char *pcRespBuffer, s32 s32RespLen)
-{
-   s32 s32Error = WILC_SUCCESS;
-
-   if (gstrConfigPktInfo.bRespRequired) {
-   if (s32RespLen <= gstrConfigPktInfo.s32MaxRespBuffLen) {
-   memcpy(gstrConfigPktInfo.pcRespBuffer, pcRespBuffer, 
s32RespLen);
-   gstrConfigPktInfo.s32BytesRead = s32RespLen;
-   } else {
-   memcpy(gstrConfigPktInfo.pcRespBuffer, pcRespBuffer, 
gstrConfigPktInfo.s32MaxRespBuffLen);
-   gstrConfigPktInfo.s32BytesRead = 
gstrConfigPktInfo.s32MaxRespBuffLen;
-   PRINT_ER("BusProvideResponse() Response greater than 
the prepared Buffer Size\n");
-   

Re: [PATCH] staging: slicoss: remove unused variables

2015-09-10 Thread Sudip Mukherjee
On Wed, Sep 09, 2015 at 11:31:37AM -0700, Greg Kroah-Hartman wrote:
> On Fri, Sep 04, 2015 at 06:53:18PM +0530, Sudip Mukherjee wrote:
> > These variables were only assigned some values but they were never used.
> > 
> > Signed-off-by: Sudip Mukherjee 
> > ---
> >  drivers/staging/slicoss/slicoss.c | 27 ++-
> >  1 file changed, 6 insertions(+), 21 deletions(-)
> > 
> > diff --git a/drivers/staging/slicoss/slicoss.c 
> > b/drivers/staging/slicoss/slicoss.c
> > index 8585970..1536ca0 100644
> > --- a/drivers/staging/slicoss/slicoss.c
> > +++ b/drivers/staging/slicoss/slicoss.c

> > @@ -1730,15 +1727,13 @@ static void slic_link_event_handler(struct adapter 
> > *adapter)
> > pshmem = (struct slic_shmem *)(unsigned long)adapter->phys_shmem;
> >  
> >  #if BITS_PER_LONG == 64
> > -   status = slic_upr_request(adapter,
> > - SLIC_UPR_RLSR,
> > - SLIC_GET_ADDR_LOW(>linkstatus),
> > - SLIC_GET_ADDR_HIGH(>linkstatus),
> > - 0, 0);
> > +   slic_upr_request(adapter, SLIC_UPR_RLSR,
> > +SLIC_GET_ADDR_LOW(>linkstatus),
> > +SLIC_GET_ADDR_HIGH(>linkstatus), 0, 0);
> >  #else
> > -   status = slic_upr_request(adapter, SLIC_UPR_RLSR,
> > -   (u32) >linkstatus,  /* no 4GB wrap guaranteed */
> > - 0, 0, 0);
> > +   slic_upr_request(adapter, SLIC_UPR_RLSR,
> > +(u32)>linkstatus, /* no 4GB wrap guaranteed */
> > +0, 0, 0);
> 
> Shouldn't we do something with status instead of just ignoring it?
I can think of 3 possibilities.
1) Ignore it as this is writing READ_LINK_STATUS command to the device
asynchronously, and then writing UP configuration command. So if status
is error here then the device will not be UP.

2) loop here with a delay until the call succeeds. (will be a very bad
design, but there are some codes doing that). But this functions is also
called from an ISR so we should not be doing that.

3) return the error code and do the error handling properly by clearing
and releasing all resources acquired by the function which called it.

Which one will you suggest? I am sure you will say : 3.  :)

regards
sudip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 3/5] staging: wilc1000: use id value as argument

2015-09-10 Thread Shin, Austin
Team, Thanks for all you hardworking on complex problem. Thanks Johnny, Tony, 
Nicolas, and especially Greg.
Best regards,
Austin

-Original Message-
From: Greg KH [mailto:gre...@linuxfoundation.org] 
Sent: Saturday, September 05, 2015 1:24 AM
To: Kim, Johnny
Cc: Cho, Tony; de...@driverdev.osuosl.org; linux-wirel...@vger.kernel.org; 
Park, Chris; Kim, Rachel; Lee, Glen; Kim, Leo; Lee, Jude; Hwang, Robin; Shin, 
Austin; Noureldin, Adel; Abozaeid, Adham; Ferre, Nicolas
Subject: Re: [PATCH 3/5] staging: wilc1000: use id value as argument

On Fri, Sep 04, 2015 at 03:01:55PM +0900, johnny.kim wrote:
> 
> 
> On 2015년 09월 04일 12:51, Greg KH wrote:
> >On Fri, Sep 04, 2015 at 12:24:29PM +0900, johnny.kim wrote:
> >>
> >>On 2015년 09월 04일 00:47, Greg KH wrote:
> >>>On Thu, Sep 03, 2015 at 04:00:08PM +0900, johnny.kim wrote:
> Hello Greg.
> 
> On 2015년 09월 03일 10:33, Greg KH wrote:
> >On Thu, Aug 20, 2015 at 04:32:52PM +0900, Tony Cho wrote:
> >>From: Johnny Kim 
> >>
> >>The driver communicates with the chipset via the address of 
> >>handlers to distinguish async data frame. The SendConfigPkt 
> >>function gets the pointer address indicating the handlers as the 
> >>last argument, but this requires redundant typecasting and does not 
> >>support the 64 bit machine.
> >>
> >>This patch adds the function which assigns ID values instead of 
> >>pointer representing the driver handler to the address and then 
> >>uses the ID instead of pointer as the last argument of 
> >>SendConfigPkt. The driver also gets the handler's address from 
> >>the ID in the data frame when it receives them.
> >>
> >I don't understand this code at all.  You are randomly adding 
> >values to a list, and then assuming that you can use the index 
> >into that list for some type of representation?  As this is a 
> >local list, why not just use the real variables instead of having 
> >a list and dealing with them in this very ackward manner?
> >
> >In other words, I don't see the need for the list at all, just 
> >use the real types here, you have all the needed information 
> >(hint, if you know the index, you really know the data as 
> >well...)
> >
> The value is needed to send it to chipset and to distinguish async 
> data packet mutually.
> >>>What is the value, the index or some random pointer?
> >>The value of current patch substitutes the corresponding index for 
> >>some random pointer(= address of device handler).
> >Ok.
> >
> The length of the data field is 4byte and the data field has been 
> filled with the address of pointer so far.
> >>>So the data field can just be any random number, as long as it is 
> >>>consistent?  What does the chip do with the random number?
> >>Current driver normally create a couple of network interface.
> >Multiple network interfaces for the same hardware?
> Yes. A chipset supports multiple network interface.
> >>The driver can send some commands(data frame) to the network 
> >>interfaces at the same time and wait the results. Both driver and 
> >>chipset need unique value to distinguish whom the interface owner of 
> >>the commands is.
> >>And the value always has same value while the interface is alive.
> >But as you created the interfaces, just use a unique number for each.
> >It could be a #define, as you know how many interfaces you will 
> >create, that's not a dynamic thing.  No need to keep looking up 
> >something in an index and converting to a structure.
> I think your opinion is right only if the driver send some commands to 
> chipset. The driver should look for the network interface 
> corresponding to the #define value to know owner of data frame which 
> received from chipset. Network interface structure dynamically is 
> allocated as 'ifconfig up'
> command of shell. As a result, look-up table is needed.
> 
> But this patch changes it to unique index value corresponding to 
> the address for 64bit address machine. If real type is used as 
> your opinion, new patch will have the same meaning with current code.
> >>>index now, but was using a pointer before?  That sounds like you 
> >>>are changing the functionality.
> >>>
> >>>confused,
> >>There is a reserved field to distinguish the data frames in chipset.
> >>Because the field has 4byte space, this patch creates the index 
> >>corresponding to the pointer and uses the index to input the 
> >>identifier in the size instead of the pointer value.
> >>
> >>I'm sorry, too. It's not easy to explain it in English.
> >It's not easy to explain that in any language :)
> Thanks for your generous mind.
> >As you "know" the interfaces you create, just use a "fixed" number 
> >for them, and refer to them that way.  No need to have an array and 
> >iterate over the whole array every time.
> >
> >There are lots of wrapper functions and pointers in this driver that 
> >need to be 

[PATCH 1/2] staging: dgap: fix possible NULL dereference

2015-09-10 Thread Sudip Mukherjee
The return pointer from dgap_getword() is used in strcmp() where it is
dereferenced. But dgap_getword() can return NULL.
Lets put a check there and return 0 as error.

Signed-off-by: Sudip Mukherjee 
---
 drivers/staging/dgap/dgap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index 9112dd2..20ba258 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -349,6 +349,8 @@ static int dgap_gettok(char **in)
 
if (strstr(dgap_cword, "board")) {
w = dgap_getword(in);
+   if (!w)
+   return 0;
snprintf(dgap_cword, MAXCWORD, "%s", w);
for (t = dgap_brdtype; t->token != 0; t++) {
if (!strcmp(w, t->string))
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: dgap: remove unused variable

2015-09-10 Thread Sudip Mukherjee
These variables were assigned some values but they were never used.
Removed them but kept one call to ioread8() as it might affect the
hardware.

Signed-off-by: Sudip Mukherjee 
---
 drivers/staging/dgap/dgap.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index 20ba258..ee37938 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -1866,7 +1866,6 @@ static int dgap_event(struct board_t *bd)
int port;
int reason;
int modem;
-   int b1;
 
if (!bd || bd->magic != DGAP_BOARD_MAGIC)
return -EIO;
@@ -1911,7 +1910,7 @@ static int dgap_event(struct board_t *bd)
port   = ioread8(event);
reason = ioread8(event + 1);
modem  = ioread8(event + 2);
-   b1 = ioread8(event + 3);
+   ioread8(event + 3);
 
/*
 * Make sure the interrupt is valid.
@@ -4570,7 +4569,6 @@ static int dgap_tty_open(struct tty_struct *tty, struct 
file *file)
  */
 static void dgap_tty_close(struct tty_struct *tty, struct file *file)
 {
-   struct ktermios *ts;
struct board_t *bd;
struct channel_t *ch;
struct un_t *un;
@@ -4591,8 +4589,6 @@ static void dgap_tty_close(struct tty_struct *tty, struct 
file *file)
if (!bd || bd->magic != DGAP_BOARD_MAGIC)
return;
 
-   ts = >termios;
-
spin_lock_irqsave(>ch_lock, lock_flags);
 
/*
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v8 10/55] [media] media: rename the function that create pad links

2015-09-10 Thread Javier Martinez Canillas
On Sun, Aug 30, 2015 at 5:06 AM, Mauro Carvalho Chehab
 wrote:
> With the new API, a link can be either between two PADs or between an 
> interface
> and an entity. So, we need to use a better name for the function that create
> links between two pads.
>
> So, rename the such function to media_create_pad_link().
>
> No functional changes.
>
> This patch was created via this shell script:
> for i in $(find drivers/media -name '*.[ch]' -type f) $(find 
> drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' 
> -type f) ; do sed s,media_entity_create_link,media_create_pad_link,g <$i >a 
> && mv a $i; done
>
> Signed-off-by: Mauro Carvalho Chehab 
> Acked-by: Hans Verkuil 
> Signed-off-by: Mauro Carvalho Chehab 
>

Reviewed-by: Javier Martinez Canillas 
Tested-by: Javier Martinez Canillas 

Best regards,
Javier
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCHv2 2/3] devicetree: Add new ANX7814 SlimPort transmitter binding.

2015-09-10 Thread Enric Balletbo Serra
Hi Rob,

2015-09-09 2:40 GMT+02:00 Rob Herring :
> On 09/08/2015 02:25 AM, Enric Balletbo i Serra wrote:
>> The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter
>> designed for portable devices.
>>
>> You can add support to your board with current binding.
>>
>> Example:
>>
>>   anx7814: anx7814@38 {
>>   compatible = "analogix,anx7814";
>>   reg = <0x38>;
>>   pd-gpios = < 1 GPIO_ACTIVE_HIGH>;
>>   reset-gpios = < 2 GPIO_ACTIVE_HIGH>;
>>   };
>>
>> Signed-off-by: Enric Balletbo i Serra 
>> ---
>>  .../devicetree/bindings/video/anx7814.txt  | 22 
>> ++
>>  1 file changed, 22 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/video/anx7814.txt
>>
>> diff --git a/Documentation/devicetree/bindings/video/anx7814.txt 
>> b/Documentation/devicetree/bindings/video/anx7814.txt
>> new file mode 100644
>> index 000..a8cc746
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/video/anx7814.txt
>> @@ -0,0 +1,22 @@
>> +Analogix ANX7814 SlimPort (Full-HD Transmitter)
>> +---
>> +
>> +The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter
>> +designed for portable devices.
>> +
>> +Required properties:
>> +
>> + - compatible: "analogix,anx7814"
>> + - reg   : I2C address of the device
>> + - pd-gpios  : Which GPIO to use for power down
>> + - reset-gpios   : Which GPIO to use for reset
>> +
>> +Example:
>> +
>> + anx7814: anx7814@38 {
>> + compatible = "analogix,anx7814";
>> + reg = <0x38>;
>> + pd-gpios = < 1 GPIO_ACTIVE_HIGH>;
>> + reset-gpios = < 2 GPIO_ACTIVE_HIGH>;
>
> No ports needed for describing data connections?
>

IMHO I'm not sure if this is applicable here, in this case the bridge
is transparent so it's not required another device node. For example,
I've an evaluation board, whre I connect in one side an HDMI input
signal an in the other side a DP monitor, the driver only configures
the chip and waits for different events (cable plug, cable unplug, etc
..)

Cheers,
Enric

> Rob
>
>> + };
>> +
>>
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCHv2 2/3] devicetree: Add new ANX7814 SlimPort transmitter binding.

2015-09-10 Thread Laurent Pinchart
Hi Enric,

On Thursday 10 September 2015 16:11:03 Enric Balletbo Serra wrote:
> 2015-09-09 2:40 GMT+02:00 Rob Herring :
> > On 09/08/2015 02:25 AM, Enric Balletbo i Serra wrote:
> >> The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter
> >> designed for portable devices.
> >> 
> >> You can add support to your board with current binding.
> >> 
> >> Example:
> >>   anx7814: anx7814@38 {
> >>   compatible = "analogix,anx7814";
> >>   reg = <0x38>;
> >>   pd-gpios = < 1 GPIO_ACTIVE_HIGH>;
> >>   reset-gpios = < 2 GPIO_ACTIVE_HIGH>;
> >>   };
> >> 
> >> Signed-off-by: Enric Balletbo i Serra 
> >> ---
> >> 
> >>  .../devicetree/bindings/video/anx7814.txt  | 22 
> >>  1 file changed, 22 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/video/anx7814.txt
> >> 
> >> diff --git a/Documentation/devicetree/bindings/video/anx7814.txt
> >> b/Documentation/devicetree/bindings/video/anx7814.txt new file mode
> >> 100644
> >> index 000..a8cc746
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/video/anx7814.txt
> >> @@ -0,0 +1,22 @@
> >> +Analogix ANX7814 SlimPort (Full-HD Transmitter)
> >> +---
> >> +
> >> +The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter
> >> +designed for portable devices.
> >> +
> >> +Required properties:
> >> +
> >> + - compatible: "analogix,anx7814"
> >> + - reg   : I2C address of the device
> >> + - pd-gpios  : Which GPIO to use for power down
> >> + - reset-gpios   : Which GPIO to use for reset
> >> +
> >> +Example:
> >> +
> >> + anx7814: anx7814@38 {
> >> + compatible = "analogix,anx7814";
> >> + reg = <0x38>;
> >> + pd-gpios = < 1 GPIO_ACTIVE_HIGH>;
> >> + reset-gpios = < 2 GPIO_ACTIVE_HIGH>;
> > 
> > No ports needed for describing data connections?
> 
> IMHO I'm not sure if this is applicable here, in this case the bridge
> is transparent so it's not required another device node. For example,
> I've an evaluation board, whre I connect in one side an HDMI input
> signal an in the other side a DP monitor, the driver only configures
> the chip and waits for different events (cable plug, cable unplug, etc
> ..)

But what if the chip is connected to a display controller, for instance to the 
HDMI output of an SoC ? Is that a use case for the hardware ?

-- 
Regards,

Laurent Pinchart

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: ion: fix corruption of ion_import_dma_buf

2015-09-10 Thread Laura Abbott

On 09/09/2015 10:41 PM, Colin Cross wrote:

On Wed, Sep 9, 2015 at 10:19 AM, Laura Abbott  wrote:

(adding Colin and John)


On 09/09/2015 12:41 AM, Shawn Lin wrote:


we found this issue but still exit in lastest kernel. Simply
keep ion_handle_create under mutex_lock to avoid this race.

WARNING: CPU: 2 PID: 2648 at drivers/staging/android/ion/ion.c:512
ion_handle_add+0xb4/0xc0()
ion_handle_add: buffer already found.
Modules linked in: iwlmvm iwlwifi mac80211 cfg80211 compat
CPU: 2 PID: 2648 Comm: TimedEventQueue Tainted: GW3.14.0 #7
     9a3efd2c 80faf273 9a3efd6c 9a3efd5c 80935dc9 811d7fd3
   9a3efd88 0a58 812208a0 0200 80e128d4 80e128d4 8d4ae00c a8cd8600
   a8cd8094 9a3efd74 80935e0e 0009 9a3efd6c 811d7fd3 9a3efd88 9a3efd9c
Call Trace:
[<80faf273>] dump_stack+0x48/0x69
[<80935dc9>] warn_slowpath_common+0x79/0x90
[<80e128d4>] ? ion_handle_add+0xb4/0xc0
[<80e128d4>] ? ion_handle_add+0xb4/0xc0
[<80935e0e>] warn_slowpath_fmt+0x2e/0x30
[<80e128d4>] ion_handle_add+0xb4/0xc0
[<80e144cc>] ion_import_dma_buf+0x8c/0x110
[<80c517c4>] reg_init+0x364/0x7d0
[<80993363>] ? futex_wait+0x123/0x210
[<80992e0e>] ? get_futex_key+0x16e/0x1e0
[<8099308f>] ? futex_wake+0x5f/0x120
[<80c51e19>] vpu_service_ioctl+0x1e9/0x500
[<80994aec>] ? do_futex+0xec/0x8e0
[<80971080>] ? prepare_to_wait_event+0xc0/0xc0
[<80c51c30>] ? reg_init+0x7d0/0x7d0
[<80a22562>] do_vfs_ioctl+0x2d2/0x4c0
[<80b198ad>] ? inode_has_perm.isra.41+0x2d/0x40
[<80b199cf>] ? file_has_perm+0x7f/0x90
[<80b1a5f7>] ? selinux_file_ioctl+0x47/0xf0
[<80a227a8>] SyS_ioctl+0x58/0x80
[<80fb45e8>] syscall_call+0x7/0x7
[<80fb>] ? mmc_do_calc_max_discard+0xab/0xe4

Fixes: 83271f626 ("ion: hold reference to handle...")
Signed-off-by: Shawn Lin 
---

   drivers/staging/android/ion/ion.c | 6 +++---
   1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c
b/drivers/staging/android/ion/ion.c
index eec878e..32e7b5c 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -1179,13 +1179,13 @@ struct ion_handle *ion_import_dma_buf(struct
ion_client *client, int fd)
 mutex_unlock(>lock);
 goto end;
 }
-   mutex_unlock(>lock);

 handle = ion_handle_create(client, buffer);
-   if (IS_ERR(handle))
+   if (IS_ERR(handle)) {
+   mutex_unlock(>lock);
 goto end;
+   }

-   mutex_lock(>lock);
 ret = ion_handle_add(client, handle);
 mutex_unlock(>lock);
 if (ret) {



So the patch looks correct but the locking change there seems like it was
added
deliberately. Colin/John, do you remember why the locking for
ion_import_dma_buf
changed? Was there a deadlock condition somewhere?

Thanks,
Laura


I can't see any reason to not hold the mutex across ion_handle_create.
The patch that introduced the bug
(83271f6262c91a49df325c52bec8f00f4de294ca, ion: hold reference to
handle after ion_uhandle_get) required that the mutex not be held
around the call to ion_handle_put, but didn't affect
ion_handle_create.


Thanks for confirming. With that,

Reviewed-by: Laura Abbott 

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCHv3 3/3] drm: bridge: anx78xx: Add anx78xx driver support by analogix.

2015-09-10 Thread Enric Balletbo i Serra
At the moment it only supports ANX7814.

The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter
designed for portable devices.

This driver adds initial support and supports HDMI to DP pass-through mode.

Signed-off-by: Enric Balletbo i Serra 
---
 drivers/gpu/drm/bridge/Kconfig   |2 +
 drivers/gpu/drm/bridge/Makefile  |1 +
 drivers/gpu/drm/bridge/anx78xx/Kconfig   |7 +
 drivers/gpu/drm/bridge/anx78xx/Makefile  |4 +
 drivers/gpu/drm/bridge/anx78xx/anx78xx.h |   44 +
 drivers/gpu/drm/bridge/anx78xx/anx78xx_main.c|  241 ++
 drivers/gpu/drm/bridge/anx78xx/slimport_tx_drv.c | 3198 ++
 drivers/gpu/drm/bridge/anx78xx/slimport_tx_drv.h |  215 ++
 drivers/gpu/drm/bridge/anx78xx/slimport_tx_reg.h |  786 ++
 9 files changed, 4498 insertions(+)
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/Kconfig
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/Makefile
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/anx78xx.h
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/anx78xx_main.c
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/slimport_tx_drv.c
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/slimport_tx_drv.h
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/slimport_tx_reg.h

diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
index 2de52a5..aa6fe12 100644
--- a/drivers/gpu/drm/bridge/Kconfig
+++ b/drivers/gpu/drm/bridge/Kconfig
@@ -29,4 +29,6 @@ config DRM_PARADE_PS8622
---help---
  Parade eDP-LVDS bridge chip driver.
 
+source "drivers/gpu/drm/bridge/anx78xx/Kconfig"
+
 endmenu
diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile
index e2eef1c..e5bd38b 100644
--- a/drivers/gpu/drm/bridge/Makefile
+++ b/drivers/gpu/drm/bridge/Makefile
@@ -3,3 +3,4 @@ ccflags-y := -Iinclude/drm
 obj-$(CONFIG_DRM_DW_HDMI) += dw_hdmi.o
 obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o
 obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o
+obj-$(CONFIG_DRM_ANX78XX) += anx78xx/
diff --git a/drivers/gpu/drm/bridge/anx78xx/Kconfig 
b/drivers/gpu/drm/bridge/anx78xx/Kconfig
new file mode 100644
index 000..08f9c08
--- /dev/null
+++ b/drivers/gpu/drm/bridge/anx78xx/Kconfig
@@ -0,0 +1,7 @@
+config DRM_ANX78XX
+   tristate "Analogix ANX78XX bridge"
+   help
+   ANX78XX is a HD video transmitter chip over micro-USB
+   connector for smartphone device.
+
+
diff --git a/drivers/gpu/drm/bridge/anx78xx/Makefile 
b/drivers/gpu/drm/bridge/anx78xx/Makefile
new file mode 100644
index 000..a843733
--- /dev/null
+++ b/drivers/gpu/drm/bridge/anx78xx/Makefile
@@ -0,0 +1,4 @@
+obj-${CONFIG_DRM_ANX78XX} :=  anx78xx.o
+
+anx78xx-y += anx78xx_main.o
+anx78xx-y += slimport_tx_drv.o
diff --git a/drivers/gpu/drm/bridge/anx78xx/anx78xx.h 
b/drivers/gpu/drm/bridge/anx78xx/anx78xx.h
new file mode 100644
index 000..4f6dd1d
--- /dev/null
+++ b/drivers/gpu/drm/bridge/anx78xx/anx78xx.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright(c) 2015, Analogix Semiconductor. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __ANX78xx_H
+#define __ANX78xx_H
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define AUX_ERR  1
+#define AUX_OK   0
+
+struct anx78xx_platform_data {
+   struct gpio_desc *gpiod_pd;
+   struct gpio_desc *gpiod_reset;
+   spinlock_t lock;
+};
+
+struct anx78xx {
+   struct i2c_client *client;
+   struct anx78xx_platform_data *pdata;
+   struct delayed_work work;
+   struct workqueue_struct *workqueue;
+   struct mutex lock;
+};
+
+void anx78xx_poweron(struct anx78xx *data);
+void anx78xx_poweroff(struct anx78xx *data);
+
+#endif
diff --git a/drivers/gpu/drm/bridge/anx78xx/anx78xx_main.c 
b/drivers/gpu/drm/bridge/anx78xx/anx78xx_main.c
new file mode 100644
index 000..b92d2bc
--- /dev/null
+++ b/drivers/gpu/drm/bridge/anx78xx/anx78xx_main.c
@@ -0,0 +1,241 @@
+/*
+ * Copyright(c) 2015, Analogix Semiconductor. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+#include 

[PATCHv3 2/3] devicetree: Add new ANX7814 SlimPort transmitter binding.

2015-09-10 Thread Enric Balletbo i Serra
The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter
designed for portable devices.

You can add support to your board with current binding.

Example:

anx7814: anx7814@38 {
compatible = "analogix,anx7814";
reg = <0x38>;
pd-gpios = < 1 GPIO_ACTIVE_HIGH>;
reset-gpios = < 2 GPIO_ACTIVE_HIGH>;
};

Signed-off-by: Enric Balletbo i Serra 
---
 .../devicetree/bindings/video/bridge/anx7814.txt   | 22 ++
 1 file changed, 22 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/bridge/anx7814.txt

diff --git a/Documentation/devicetree/bindings/video/bridge/anx7814.txt 
b/Documentation/devicetree/bindings/video/bridge/anx7814.txt
new file mode 100644
index 000..a8cc746
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/bridge/anx7814.txt
@@ -0,0 +1,22 @@
+Analogix ANX7814 SlimPort (Full-HD Transmitter)
+---
+
+The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter
+designed for portable devices.
+
+Required properties:
+
+ - compatible  : "analogix,anx7814"
+ - reg : I2C address of the device
+ - pd-gpios: Which GPIO to use for power down
+ - reset-gpios : Which GPIO to use for reset
+
+Example:
+
+   anx7814: anx7814@38 {
+   compatible = "analogix,anx7814";
+   reg = <0x38>;
+   pd-gpios = < 1 GPIO_ACTIVE_HIGH>;
+   reset-gpios = < 2 GPIO_ACTIVE_HIGH>;
+   };
+
-- 
2.1.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCHv3 1/3] of: Add vendor prefix for Analogix Semiconductor, Inc.

2015-09-10 Thread Enric Balletbo i Serra
Analogix Semiconductor develops analog and mixed-signal devices for digital
media and communications interconnect applications.

Signed-off-by: Enric Balletbo i Serra 
Acked-by: Rob Herring 
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt 
b/Documentation/devicetree/bindings/vendor-prefixes.txt
index ac5f0c3..e914a02 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -22,6 +22,7 @@ ampireAmpire Co., Ltd.
 amsAMS AG
 amstaosAMS-Taos Inc.
 apmApplied Micro Circuits Corporation (APM)
+analogix   Analogix Semiconductor, Inc.
 aptina Aptina Imaging
 arasan Arasan Chip Systems
 armARM Ltd.
-- 
2.1.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/3] staging: fbtft: use pr_fmt

2015-09-10 Thread Noralf Trønnes


10.09.2015 06:54, skrev Sudip Mukherjee:

On Wed, Sep 09, 2015 at 11:20:08PM +0200, Noralf Trønnes wrote:

Den 09.09.2015 20:35, skrev Greg Kroah-Hartman:

On Sat, Sep 05, 2015 at 07:13:45PM +0530, Sudip Mukherjee wrote:

Instead of defining DRVNAME and using it in all calls to pr_* family of
macros lets start using pr_fmt.

Signed-off-by: Sudip Mukherjee 
---
  drivers/staging/fbtft/fbtft_device.c | 79 
  1 file changed, 35 insertions(+), 44 deletions(-)

[...]


If a driver is working properly, nothing should show up in the kernel
log at all, otherwise it's just noise that everyone ignores.

This isn't a device driver, it's a module for adding "fbtft" devices
(spi/platform with pdata). When I created fbtft, the Raspberry Pi didn't
have Device Tree support, so I made this module as a way for the end user
to add devices without having to build a kernel.
I haven't seen any module like this in the kernel, so maybe it
really doesn't
belong here at all?

Is this driver only for Raspberry Pi?
I have seen someone submitted a drm driver for Raspberry Pi. And I guess
that is already merged.
Tomi (fbdev maintainer) said "Fremebuffer  driver will be obsolete
immediately when there's a DRM driver for that device". And if a drm
driver is already there for Raspberry Pi then ?


Not sure what you refer to as driver here.

The fbtft module presents a simplistic view of fbdev through
'struct fbtft_par' which the various fbtft drivers use.

fbtft_device is just a kernel module that can add spi and platform
devices to the kernel and it can be used on all platforms. It's not a
driver of any kind. It really does what Device Tree does, it adds devices.

vc4 is an upcoming DRM driver for the BCM2835 display hardware (hdmi).
This has nothing to do with the fbtft drivers which target SPI/parallel
bus connected displays with onboard video memory.


Noralf.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCHv3 0/3] Add initial support for slimport anx78xx

2015-09-10 Thread Enric Balletbo i Serra
Hi all,

This is the third version with more changes requested by Dan.

The following series add initial support for the Slimport ANX7814 transmitter, a
ultra-low power Full-HD (1080p60) transmitter designed for portable device.

The driver was originally created and based from the work of Junhua Xia from
Analogix. This driver is a refactor of the original driver and fixes different
coding style lines, and different errors/warnings reported by checkpatch. Also
there were things that I noticed that we need to change like:

 - Convert the numbered GPIO API to the new descriptor based GPIO API.
 - Review the DT binding
 - Add missing MODULE_DEVICE_TABLE(of, ...);
 - Fix Makefiles and Kconfig to build conditionally.
 - Use SIMPLE_DEV_PM_OPS() instead of the deprecated i2c .suspend and
  .resume callbacks.
 - Move to use managed device resources.
 - Remove dead/unused code.
 - And others ...

Changes since v2 (requested by Daniel Kurtz)
 - clean up the typos, and little nits requested by Dan.
 - move to the drm/bridge directory
 - rename the files, variables, types, etc. to anx78xx
 - plumb through the context struct to all functions that act on the device
 - use proper messaging (dev_ rather than pr_, _dbg/_err rather than _info)

Changes since v1:
 - As requested by Greg, move from staging to a subsystem.

Best regards,

Enric Balletbo i Serra (3):
  of: Add vendor prefix for Analogix Semiconductor, Inc.
  devicetree: Add new ANX7814 SlimPort transmitter binding.
  drm: bridge: anx78xx: Add anx78xx driver support by analogix.

 .../devicetree/bindings/vendor-prefixes.txt|1 +
 .../devicetree/bindings/video/bridge/anx7814.txt   |   22 +
 drivers/gpu/drm/bridge/Kconfig |2 +
 drivers/gpu/drm/bridge/Makefile|1 +
 drivers/gpu/drm/bridge/anx78xx/Kconfig |7 +
 drivers/gpu/drm/bridge/anx78xx/Makefile|4 +
 drivers/gpu/drm/bridge/anx78xx/anx78xx.h   |   44 +
 drivers/gpu/drm/bridge/anx78xx/anx78xx_main.c  |  241 ++
 drivers/gpu/drm/bridge/anx78xx/slimport_tx_drv.c   | 3198 
 drivers/gpu/drm/bridge/anx78xx/slimport_tx_drv.h   |  215 ++
 drivers/gpu/drm/bridge/anx78xx/slimport_tx_reg.h   |  786 +
 11 files changed, 4521 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/bridge/anx7814.txt
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/Kconfig
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/Makefile
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/anx78xx.h
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/anx78xx_main.c
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/slimport_tx_drv.c
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/slimport_tx_drv.h
 create mode 100644 drivers/gpu/drm/bridge/anx78xx/slimport_tx_reg.h

-- 
2.1.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCHv3 2/3] devicetree: Add new ANX7814 SlimPort transmitter binding.

2015-09-10 Thread Enric Balletbo Serra
2015-09-10 18:35 GMT+02:00 Enric Balletbo i Serra :
> The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter
> designed for portable devices.
>
> You can add support to your board with current binding.
>
> Example:
>
> anx7814: anx7814@38 {
> compatible = "analogix,anx7814";
> reg = <0x38>;
> pd-gpios = < 1 GPIO_ACTIVE_HIGH>;
> reset-gpios = < 2 GPIO_ACTIVE_HIGH>;
> };
>
> Signed-off-by: Enric Balletbo i Serra 
> ---
>  .../devicetree/bindings/video/bridge/anx7814.txt   | 22 
> ++
>  1 file changed, 22 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/video/bridge/anx7814.txt
>
> diff --git a/Documentation/devicetree/bindings/video/bridge/anx7814.txt 
> b/Documentation/devicetree/bindings/video/bridge/anx7814.txt
> new file mode 100644
> index 000..a8cc746
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/video/bridge/anx7814.txt
> @@ -0,0 +1,22 @@
> +Analogix ANX7814 SlimPort (Full-HD Transmitter)
> +---
> +
> +The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter
> +designed for portable devices.
> +
> +Required properties:
> +
> + - compatible  : "analogix,anx7814"
> + - reg : I2C address of the device
> + - pd-gpios: Which GPIO to use for power down
> + - reset-gpios : Which GPIO to use for reset
> +
> +Example:
> +
> +   anx7814: anx7814@38 {
> +   compatible = "analogix,anx7814";
> +   reg = <0x38>;
> +   pd-gpios = < 1 GPIO_ACTIVE_HIGH>;
> +   reset-gpios = < 2 GPIO_ACTIVE_HIGH>;
> +   };
> +
> --
> 2.1.0
>

I saw after sending the series that there was some discussion here,
let me paste to not forget it.

> > No ports needed for describing data connections?
>
> IMHO I'm not sure if this is applicable here, in this case the bridge
> is transparent so it's not required another device node. For example,
> I've an evaluation board, whre I connect in one side an HDMI input
> signal an in the other side a DP monitor, the driver only configures
> the chip and waits for different events (cable plug, cable unplug, etc
> ..)

But what if the chip is connected to a display controller, for instance to the
HDMI output of an SoC ? Is that a use case for the hardware ?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 11/11] drivers:pci:hv: New paravirtual PCI front-end for Hyper-V VMs

2015-09-10 Thread jakeo
From: Jake Oshins 

This patch introduces a new driver which exposes a root PCI bus whenever a PCI
Express device is passed through to a guest VM under Hyper-V.  The device can
be single- or multi-function.  The interrupts for the devices are managed by an
IRQ domain, implemented within the driver.

This version incorporates feedback from Thomas Gleixner, Dan Carpenter and Paul
Bolle.

Signed-off-by: Jake Oshins 
---
 MAINTAINERS|1 +
 drivers/pci/Kconfig|7 +
 drivers/pci/host/Makefile  |1 +
 drivers/pci/host/hv_pcifront.c | 2244 
 4 files changed, 2253 insertions(+)
 create mode 100644 drivers/pci/host/hv_pcifront.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 16397bc..6b3f09b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5011,6 +5011,7 @@ F:arch/x86/kernel/cpu/mshyperv.c
 F: drivers/hid/hid-hyperv.c
 F: drivers/hv/
 F: drivers/input/serio/hyperv-keyboard.c
+F: drivers/pci/host/hv_pcifront.c
 F: drivers/net/hyperv/
 F: drivers/scsi/storvsc_drv.c
 F: drivers/video/fbdev/hyperv_fb.c
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 73de4ef..9b82d93 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -118,4 +118,11 @@ config PCI_LABEL
def_bool y if (DMI || ACPI)
select NLS
 
+config HYPERV_VPCI
+tristate "Hyper-V PCI Frontend"
+depends on PCI && X86 && HYPERV && PCI_MSI && PCI_MSI_IRQ_DOMAIN
+help
+  The PCI device frontend driver allows the kernel to import arbitrary
+  PCI devices from a PCI backend to support PCI driver domains.
+
 source "drivers/pci/host/Kconfig"
diff --git a/drivers/pci/host/Makefile b/drivers/pci/host/Makefile
index 140d66f..39581fb 100644
--- a/drivers/pci/host/Makefile
+++ b/drivers/pci/host/Makefile
@@ -2,6 +2,7 @@ obj-$(CONFIG_PCIE_DW) += pcie-designware.o
 obj-$(CONFIG_PCI_DRA7XX) += pci-dra7xx.o
 obj-$(CONFIG_PCI_EXYNOS) += pci-exynos.o
 obj-$(CONFIG_PCI_IMX6) += pci-imx6.o
+obj-$(CONFIG_HYPERV_VPCI) += hv_pcifront.o
 obj-$(CONFIG_PCI_MVEBU) += pci-mvebu.o
 obj-$(CONFIG_PCI_TEGRA) += pci-tegra.o
 obj-$(CONFIG_PCI_RCAR_GEN2) += pci-rcar-gen2.o
diff --git a/drivers/pci/host/hv_pcifront.c b/drivers/pci/host/hv_pcifront.c
new file mode 100644
index 000..923a46f
--- /dev/null
+++ b/drivers/pci/host/hv_pcifront.c
@@ -0,0 +1,2244 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ *
+ * Author:
+ *   Jake Oshins 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
+ * NON INFRINGEMENT.  See the GNU General Public License for more
+ * details.
+ *
+ */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/*
+ * Protocol versions. The low word is the minor version, the high word the 
major
+ * version.
+ */
+
+#define PCI_MAKE_VERSION(major, minor) ((__u32)(((major) << 16) | (major)))
+#define PCI_MAJOR_VERSION(version) ((__u32)(version) >> 16)
+#define PCI_MINOR_VERSION(version) ((__u32)(version) & 0xff)
+
+enum {
+   PCI_PROTOCOL_VERSION_1_1 = PCI_MAKE_VERSION(1, 1),
+   PCI_PROTOCOL_VERSION_CURRENT = PCI_PROTOCOL_VERSION_1_1
+};
+
+#define PCI_CONFIG_MMIO_LENGTH 0x2000
+#define MAX_SUPPORTED_MSI_MESSAGES 0x400
+
+/*
+ * Message Types
+ */
+
+enum pci_message_type {
+   /*
+* Version 1.1
+*/
+   PCI_MESSAGE_BASE= 0x4249,
+   PCI_BUS_RELATIONS   = PCI_MESSAGE_BASE + 0,
+   PCI_QUERY_BUS_RELATIONS = PCI_MESSAGE_BASE + 1,
+   PCI_POWER_STATE_CHANGE  = PCI_MESSAGE_BASE + 4,
+   PCI_QUERY_RESOURCE_REQUIREMENTS = PCI_MESSAGE_BASE + 5,
+   PCI_QUERY_RESOURCE_RESOURCES= PCI_MESSAGE_BASE + 6,
+   PCI_BUS_D0ENTRY = PCI_MESSAGE_BASE + 7,
+   PCI_BUS_D0EXIT  = PCI_MESSAGE_BASE + 8,
+   PCI_READ_BLOCK  = PCI_MESSAGE_BASE + 9,
+   PCI_WRITE_BLOCK = PCI_MESSAGE_BASE + 0xA,
+   PCI_EJECT   = PCI_MESSAGE_BASE + 0xB,
+   PCI_QUERY_STOP  = PCI_MESSAGE_BASE + 0xC,
+   PCI_REENABLE= PCI_MESSAGE_BASE + 0xD,
+   PCI_QUERY_STOP_FAILED   = PCI_MESSAGE_BASE + 0xE,
+   PCI_EJECTION_COMPLETE   = PCI_MESSAGE_BASE + 0xF,
+   PCI_RESOURCES_ASSIGNED  = PCI_MESSAGE_BASE + 0x10,
+   PCI_RESOURCES_RELEASED  = PCI_MESSAGE_BASE + 0x11,
+   PCI_INVALIDATE_BLOCK= PCI_MESSAGE_BASE + 0x12,
+   

[PATCH v2 07/12] drivers:x86:pci: Make it possible to implement a PCI MSI IRQ Domain in a module.

2015-09-10 Thread jakeo
From: Jake Oshins 

The Linux kernel already has the concept of IRQ domain, wherein a component
can expose a set of IRQs which are managed by a particular interrupt controller
chip or other subsystem.  The PCI driver exposes the notion of an IRQ domain
for Message-Signaled Interrupts (MSI) from PCI Express devices.  This patch
exposes the functions which are necessary for making an MSI IRQ domain within
a module.

The same goal could be accomplished by building an MSI IRQ domain for Hyper-V
into the kernel itself, but this would have required pulling in a lot of other
code which currently exists in modules, and it seemed cleaner to avoid that.

Signed-off-by: Jake Oshins 
---
 arch/x86/include/asm/msi.h| 4 
 arch/x86/kernel/apic/msi.c| 5 +++--
 arch/x86/kernel/apic/vector.c | 2 ++
 drivers/pci/msi.c | 2 ++
 kernel/irq/chip.c | 1 +
 5 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/msi.h b/arch/x86/include/asm/msi.h
index 93724cc..e8b7924 100644
--- a/arch/x86/include/asm/msi.h
+++ b/arch/x86/include/asm/msi.h
@@ -1,7 +1,11 @@
 #ifndef _ASM_X86_MSI_H
 #define _ASM_X86_MSI_H
 #include 
+#include 
 
 typedef struct irq_alloc_info msi_alloc_info_t;
 
+int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec,
+   msi_alloc_info_t *arg);
+
 #endif /* _ASM_X86_MSI_H */
diff --git a/arch/x86/kernel/apic/msi.c b/arch/x86/kernel/apic/msi.c
index 5f1feb6..bdb28fc 100644
--- a/arch/x86/kernel/apic/msi.c
+++ b/arch/x86/kernel/apic/msi.c
@@ -96,8 +96,8 @@ static irq_hw_number_t pci_msi_get_hwirq(struct 
msi_domain_info *info,
return arg->msi_hwirq;
 }
 
-static int pci_msi_prepare(struct irq_domain *domain, struct device *dev,
-  int nvec, msi_alloc_info_t *arg)
+int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec,
+   msi_alloc_info_t *arg)
 {
struct pci_dev *pdev = to_pci_dev(dev);
struct msi_desc *desc = first_pci_msi_entry(pdev);
@@ -113,6 +113,7 @@ static int pci_msi_prepare(struct irq_domain *domain, 
struct device *dev,
 
return 0;
 }
+EXPORT_SYMBOL_GPL(pci_msi_prepare);
 
 static void pci_msi_set_desc(msi_alloc_info_t *arg, struct msi_desc *desc)
 {
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
index 1bbd0fe..b16d915 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -29,6 +29,7 @@ struct apic_chip_data {
 };
 
 struct irq_domain *x86_vector_domain;
+EXPORT_SYMBOL_GPL(x86_vector_domain);
 static DEFINE_RAW_SPINLOCK(vector_lock);
 static cpumask_var_t vector_cpumask;
 static struct irq_chip lapic_controller;
@@ -66,6 +67,7 @@ struct irq_cfg *irqd_cfg(struct irq_data *irq_data)
 
return data ? >cfg : NULL;
 }
+EXPORT_SYMBOL_GPL(irqd_cfg);
 
 struct irq_cfg *irq_cfg(unsigned int irq)
 {
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index c7ad8ce..1aaa26d 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -1119,6 +1119,7 @@ struct pci_dev *msi_desc_to_pci_dev(struct msi_desc *desc)
 {
return to_pci_dev(desc->dev);
 }
+EXPORT_SYMBOL(msi_desc_to_pci_dev);
 
 void *msi_desc_to_pci_sysdata(struct msi_desc *desc)
 {
@@ -1274,6 +1275,7 @@ struct irq_domain *pci_msi_create_irq_domain(struct 
device_node *node,
domain->bus_token = DOMAIN_BUS_PCI_MSI;
return domain;
 }
+EXPORT_SYMBOL_GPL(pci_msi_create_irq_domain);
 
 /**
  * pci_msi_domain_alloc_irqs - Allocate interrupts for @dev in @domain
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 6e40a95..b0d9ecd 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -935,6 +935,7 @@ void irq_chip_ack_parent(struct irq_data *data)
data = data->parent_data;
data->chip->irq_ack(data);
 }
+EXPORT_SYMBOL_GPL(irq_chip_ack_parent);
 
 /**
  * irq_chip_mask_parent - Mask the parent interrupt
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 06/12] drivers:hv: Export do_hypercall()

2015-09-10 Thread jakeo
From: Jake Oshins 

This patch exposes the function that hv_vmbus.ko uses to make hypercalls.  This
is necessary for retargeting an interrupt when it is given a new affinity.

Signed-off-by: Jake Oshins 
---
 drivers/hv/hv.c| 3 ++-
 include/linux/hyperv.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 6341be8..6d01649 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -91,7 +91,7 @@ static int query_hypervisor_info(void)
 /*
  * do_hypercall- Invoke the specified hypercall
  */
-static u64 do_hypercall(u64 control, void *input, void *output)
+u64 do_hypercall(u64 control, void *input, void *output)
 {
u64 input_address = (input) ? virt_to_phys(input) : 0;
u64 output_address = (output) ? virt_to_phys(output) : 0;
@@ -132,6 +132,7 @@ static u64 do_hypercall(u64 control, void *input, void 
*output)
return hv_status_lo | ((u64)hv_status_hi << 32);
 #endif /* !x86_64 */
 }
+EXPORT_SYMBOL_GPL(do_hypercall);
 
 #ifdef CONFIG_X86_64
 static cycle_t read_hv_clock_tsc(struct clocksource *arg)
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 02393b6..033fe59 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -983,6 +983,7 @@ int vmbus_allocate_mmio(struct resource **new, struct 
hv_device *device_obj,
bool fb_overlap_ok);
 
 int vmbus_cpu_number_to_vp_number(int cpu_number);
+u64 do_hypercall(u64 control, void *input, void *output);
 
 /**
  * VMBUS_DEVICE - macro used to describe a specific hyperv vmbus device
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 10/11] drivers:hv: Define the channel type for Hyper-V PCI Express pass-through

2015-09-10 Thread jakeo
From: Jake Oshins 

This defines the channel type for PCI front-ends in Hyper-V VMs.

Signed-off-by: Jake Oshins 
---
 include/linux/hyperv.h | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 033fe59..af0f2e7 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1140,6 +1140,17 @@ u64 do_hypercall(u64 control, void *input, void *output);
}
 
 /*
+ * PCI Express Pass Through
+ * {44C4F61D--4400-9D52-802E27EDE19F}
+ */
+
+#define HV_PCIE_GUID \
+   .guid = { \
+   0x1D, 0xF6, 0xC4, 0x44, 0x44, 0x44, 0x00, 0x44, \
+   0x9D, 0x52, 0x80, 0x2E, 0x27, 0xED, 0xE1, 0x9F \
+   }
+
+/*
  * Common header for Hyper-V ICs
  */
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 09/11] kernel:irq: Implement msi match function

2015-09-10 Thread jakeo
From: Jake Oshins 

Previous patches in this series introduced the concept of ranked matches of
IRQ domains, where a default implementation ranks low and a specific
implementation might rank higher, overriding the default.

This patch supplies a match function for use by any IRQ domain derived from
the default MSI IRQ domain.  It returns a rank of '1' when the IRQ domain
does not ask for a match based on PCI domain and a rank of '2' if the IRQ
domain does set the flag indicating that it wants a more specific match.

At this point in the patch series, there is no implementation of an MSI IRQ
domain which asks for a more specific match.  That's found in the final patch,
introducing a new driver.

Signed-off-by: Jake Oshins 
---
 include/linux/msi.h |  2 ++
 kernel/irq/msi.c| 24 
 2 files changed, 26 insertions(+)

diff --git a/include/linux/msi.h b/include/linux/msi.h
index 7370225..a8ee7a1 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -259,6 +259,8 @@ enum {
MSI_FLAG_MULTI_PCI_MSI  = (1 << 3),
/* Support PCI MSIX interrupts */
MSI_FLAG_PCI_MSIX   = (1 << 4),
+   /* Require exact match for PCI domain */
+   MSI_FLAG_PCI_DOMAIN_MATCH   = (1 << 5),
 };
 
 int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask,
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index 7e6512b..5fcd68c 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -141,11 +141,35 @@ static void msi_domain_free(struct irq_domain *domain, 
unsigned int virq,
irq_domain_free_irqs_top(domain, virq, nr_irqs);
 }
 
+/*
+ * Return a higher rank for exact matches against PCI domain (segment)
+ * so that generic MSI IRQ domains can be overridden by more specific
+ * implementations.
+ */
+static int msi_domain_match(struct irq_domain *d, struct device_node *node,
+   enum irq_domain_bus_token bus_token,
+   void *bus_data)
+{
+   struct msi_domain_info *info = d->host_data;
+
+   if (bus_token != d->bus_token)
+   return 0;
+
+   if (bus_token == DOMAIN_BUS_PCI_MSI) {
+   if (!(info->flags & MSI_FLAG_PCI_DOMAIN_MATCH))
+   return 1;
+   if (bus_data && (info->pci_domain == *(int *)bus_data))
+   return 2;
+   }
+   return 0;
+}
+
 static const struct irq_domain_ops msi_domain_ops = {
.alloc  = msi_domain_alloc,
.free   = msi_domain_free,
.activate   = msi_domain_activate,
.deactivate = msi_domain_deactivate,
+   .match  = msi_domain_match,
 };
 
 #ifdef GENERIC_MSI_DOMAIN_OPS
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 01/12] kernel:irq: Change signature of irq_domain_ops match() method, adding *bus_data

2015-09-10 Thread jakeo
From: Jake Oshins 

The current irq_domain_ops allows an IRQ domain to match on bus type, but not
a specific PCI bus heirarchy.  This patch introduces a bus_data parameter,
intended to allow a more specific match.  This patch does nothing more than 
introduce that parameter and change all the implementations' signatures.

Signed-off-by: Jake Oshins 
---
 arch/powerpc/platforms/512x/mpc5121_ads_cpld.c   | 2 +-
 arch/powerpc/platforms/cell/interrupt.c  | 2 +-
 arch/powerpc/platforms/embedded6xx/flipper-pic.c | 3 ++-
 arch/powerpc/platforms/powermac/pic.c| 3 ++-
 arch/powerpc/platforms/powernv/opal-irqchip.c| 2 +-
 arch/powerpc/platforms/ps3/interrupt.c   | 2 +-
 arch/powerpc/sysdev/ehv_pic.c| 3 ++-
 arch/powerpc/sysdev/i8259.c  | 2 +-
 arch/powerpc/sysdev/ipic.c   | 2 +-
 arch/powerpc/sysdev/mpic.c   | 2 +-
 arch/powerpc/sysdev/qe_lib/qe_ic.c   | 2 +-
 arch/powerpc/sysdev/xics/xics-common.c   | 2 +-
 include/linux/irqdomain.h| 2 +-
 kernel/irq/irqdomain.c   | 2 +-
 14 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c 
b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
index 11090ab..1d12a63 100644
--- a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
+++ b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
@@ -124,7 +124,7 @@ cpld_pic_cascade(unsigned int irq, struct irq_desc *desc)
 
 static int
 cpld_pic_host_match(struct irq_domain *h, struct device_node *node,
-   enum irq_domain_bus_token bus_token)
+   enum irq_domain_bus_token bus_token, void *bus_data)
 {
return cpld_pic_node == node;
 }
diff --git a/arch/powerpc/platforms/cell/interrupt.c 
b/arch/powerpc/platforms/cell/interrupt.c
index a15f1ef..3450bb8 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -223,7 +223,7 @@ void iic_request_IPIs(void)
 
 
 static int iic_host_match(struct irq_domain *h, struct device_node *node,
- enum irq_domain_bus_token bus_token)
+ enum irq_domain_bus_token bus_token, void *bus_data)
 {
return of_device_is_compatible(node,
"IBM,CBEA-Internal-Interrupt-Controller");
diff --git a/arch/powerpc/platforms/embedded6xx/flipper-pic.c 
b/arch/powerpc/platforms/embedded6xx/flipper-pic.c
index b7866e0..1615990 100644
--- a/arch/powerpc/platforms/embedded6xx/flipper-pic.c
+++ b/arch/powerpc/platforms/embedded6xx/flipper-pic.c
@@ -109,7 +109,8 @@ static int flipper_pic_map(struct irq_domain *h, unsigned 
int virq,
 }
 
 static int flipper_pic_match(struct irq_domain *h, struct device_node *np,
-enum irq_domain_bus_token bus_token)
+enum irq_domain_bus_token bus_token,
+void *bus_data)
 {
return 1;
 }
diff --git a/arch/powerpc/platforms/powermac/pic.c 
b/arch/powerpc/platforms/powermac/pic.c
index 6f4f8b0..035766a 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -269,7 +269,8 @@ static struct irqaction gatwick_cascade_action = {
 };
 
 static int pmac_pic_host_match(struct irq_domain *h, struct device_node *node,
-  enum irq_domain_bus_token bus_token)
+  enum irq_domain_bus_token bus_token,
+  void *bus_data)
 {
/* We match all, we don't always have a node anyway */
return 1;
diff --git a/arch/powerpc/platforms/powernv/opal-irqchip.c 
b/arch/powerpc/platforms/powernv/opal-irqchip.c
index 2c91ee7..f83097e 100644
--- a/arch/powerpc/platforms/powernv/opal-irqchip.c
+++ b/arch/powerpc/platforms/powernv/opal-irqchip.c
@@ -135,7 +135,7 @@ static void opal_handle_irq_work(struct irq_work *work)
 }
 
 static int opal_event_match(struct irq_domain *h, struct device_node *node,
-   enum irq_domain_bus_token bus_token)
+   enum irq_domain_bus_token bus_token, void *bus_data)
 {
return h->of_node == node;
 }
diff --git a/arch/powerpc/platforms/ps3/interrupt.c 
b/arch/powerpc/platforms/ps3/interrupt.c
index 638c406..049fb23 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -679,7 +679,7 @@ static int ps3_host_map(struct irq_domain *h, unsigned int 
virq,
 }
 
 static int ps3_host_match(struct irq_domain *h, struct device_node *np,
- enum irq_domain_bus_token bus_token)
+ enum irq_domain_bus_token bus_token, void *bus_data)
 {
/* Match all */
return 1;
diff --git a/arch/powerpc/sysdev/ehv_pic.c b/arch/powerpc/sysdev/ehv_pic.c
index eca0b00..4d10a2c 100644
--- 

[PATCH v2 02/12] kernel:irq: Change signature of irq_find_matching_host()

2015-09-10 Thread jakeo
From: Jake Oshins 

In order to use the facility introduced in the last patch (the ability to
match on both bus type and something that identifies the specific bus of that
type,) irq_find_matching_host() needs to take that bus-specific parameter.

Signed-off-by: Jake Oshins 
---
 drivers/irqchip/irq-gic-v3-its-pci-msi.c  | 2 +-
 drivers/irqchip/irq-gic-v3-its-platform-msi.c | 2 +-
 drivers/of/irq.c  | 2 +-
 drivers/pci/of.c  | 2 +-
 include/linux/irqdomain.h | 5 +++--
 kernel/irq/irqdomain.c| 6 --
 6 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c 
b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
index cf351c6..51521b5 100644
--- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c
+++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
@@ -118,7 +118,7 @@ static int __init its_pci_msi_init(void)
if (!of_property_read_bool(np, "msi-controller"))
continue;
 
-   parent = irq_find_matching_host(np, DOMAIN_BUS_NEXUS);
+   parent = irq_find_matching_host(np, DOMAIN_BUS_NEXUS, NULL);
if (!parent || !msi_get_domain_info(parent)) {
pr_err("%s: unable to locate ITS domain\n",
   np->full_name);
diff --git a/drivers/irqchip/irq-gic-v3-its-platform-msi.c 
b/drivers/irqchip/irq-gic-v3-its-platform-msi.c
index a865505..5a3ac02 100644
--- a/drivers/irqchip/irq-gic-v3-its-platform-msi.c
+++ b/drivers/irqchip/irq-gic-v3-its-platform-msi.c
@@ -71,7 +71,7 @@ static int __init its_pmsi_init(void)
if (!of_property_read_bool(np, "msi-controller"))
continue;
 
-   parent = irq_find_matching_host(np, DOMAIN_BUS_NEXUS);
+   parent = irq_find_matching_host(np, DOMAIN_BUS_NEXUS, NULL);
if (!parent || !msi_get_domain_info(parent)) {
pr_err("%s: unable to locate ITS domain\n",
   np->full_name);
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 55317fa..1c9c944 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -593,7 +593,7 @@ void of_msi_configure(struct device *dev, struct 
device_node *np)
if (!msi_np)
return;
 
-   d = irq_find_matching_host(msi_np, DOMAIN_BUS_PLATFORM_MSI);
+   d = irq_find_matching_host(msi_np, DOMAIN_BUS_PLATFORM_MSI, NULL);
if (!d)
d = irq_find_host(msi_np);
dev_set_msi_domain(dev, d);
diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index 2e99a50..0da3bce 100644
--- a/drivers/pci/of.c
+++ b/drivers/pci/of.c
@@ -80,7 +80,7 @@ struct irq_domain *pci_host_bridge_of_msi_domain(struct 
pci_bus *bus)
if (!np)
np = bus->dev.of_node;
 
-   d = irq_find_matching_host(np, DOMAIN_BUS_PCI_MSI);
+   d = irq_find_matching_host(np, DOMAIN_BUS_PCI_MSI, NULL);
if (d)
return d;
 
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 4d89f98..12acddb 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -178,12 +178,13 @@ struct irq_domain *irq_domain_add_legacy(struct 
device_node *of_node,
 const struct irq_domain_ops *ops,
 void *host_data);
 extern struct irq_domain *irq_find_matching_host(struct device_node *node,
-enum irq_domain_bus_token 
bus_token);
+enum irq_domain_bus_token 
bus_token,
+void *bus_data);
 extern void irq_set_default_host(struct irq_domain *host);
 
 static inline struct irq_domain *irq_find_host(struct device_node *node)
 {
-   return irq_find_matching_host(node, DOMAIN_BUS_ANY);
+   return irq_find_matching_host(node, DOMAIN_BUS_ANY, NULL);
 }
 
 /**
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 8a8ef31..b4c15af 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -190,9 +190,11 @@ EXPORT_SYMBOL_GPL(irq_domain_add_legacy);
  * irq_find_matching_host() - Locates a domain for a given device node
  * @node: device-tree node of the interrupt controller
  * @bus_token: domain-specific data
+ * @bus_data: bus-specific data
  */
 struct irq_domain *irq_find_matching_host(struct device_node *node,
- enum irq_domain_bus_token bus_token)
+ enum irq_domain_bus_token bus_token,
+ void *bus_data)
 {
struct irq_domain *h, *found = NULL;
int rc;
@@ -209,7 +211,7 @@ struct irq_domain *irq_find_matching_host(struct 
device_node *node,
mutex_lock(_domain_mutex);
list_for_each_entry(h, _domain_list, 

[PATCH v2 00/12] New paravirtual PCI front-end for Hyper-V VMs

2015-09-10 Thread jakeo
From: Jake Oshins 

The patch series updates the one sent about a month ago in three ways.  It
integrated with other IRQ domain work done in linux-next in that time, it
distributes interrupts to multiple virtual processors in the guest VM, and it
incorporates feedback from Thomas Gleixner and others.

These patches change the IRQ domain code so that an IRQ domain can match on both
bus type and on the PCI domain.  The IRQ domain match code is modified so that
IRQ domains can have a "rank," allowing for a default one which matches every
x86 PC and more specific ones that replace the default.

The next step is to make it possible to implement an IRQ domain in a module,
by exporting a few functions.  This seems to make sense here, rather than
linking it into the kernel, because pulling it into the kernel would involve
pulling a lot of other Hyper-V-related code into the kernel, since the IRQ
domain implementation has to send messages to and receive messages from the
hypervisor, and those facilities are currently built as modules.

After that, a couple of new Hyper-V-related facilities are exported from 
hv_vmbus.ko, so that the PCI front end can correlate Linux CPUs with virtual
processor IDs and to make hypercalls.

The last patch is a new front-end driver that exposes new root PCI buses that
(virtually) contain devices being passed through into the VM.

Jake Oshins (12):
  kernel:irq:  Change signature of irq_domain_ops match() method, adding
*bus_data
  kernel:irq: Change signature of irq_find_matching_host()
  kernel:irq: Allow for ranked matches on IRQ domains
  drivers:pci: Add IRQ domain lookup by PCI domain
  drivers:hv: Export a function that maps Linux CPU num onto Hyper-V
proc num
  drivers:hv: Export do_hypercall()
  drivers:x86:pci: Make it possible to implement a PCI MSI IRQ Domain in
a module.
  drivers:pci:msi: Store PCI domain (segment) as part of IRQ domain
  kernel:irq: Implement msi match function
  kernel:irq: Return a higher ranked match when the IRQ domain matches a
specific PCI domain
  drivers:hv: Define the channel type for Hyper-V PCI Express
pass-through
  drivers:pci:hv: New paravirtual PCI front-end for Hyper-V VMs

 MAINTAINERS  |1 +
 arch/powerpc/platforms/512x/mpc5121_ads_cpld.c   |2 +-
 arch/powerpc/platforms/cell/interrupt.c  |2 +-
 arch/powerpc/platforms/embedded6xx/flipper-pic.c |3 +-
 arch/powerpc/platforms/powermac/pic.c|3 +-
 arch/powerpc/platforms/powernv/opal-irqchip.c|2 +-
 arch/powerpc/platforms/ps3/interrupt.c   |2 +-
 arch/powerpc/sysdev/ehv_pic.c|3 +-
 arch/powerpc/sysdev/i8259.c  |2 +-
 arch/powerpc/sysdev/ipic.c   |2 +-
 arch/powerpc/sysdev/mpic.c   |2 +-
 arch/powerpc/sysdev/qe_lib/qe_ic.c   |2 +-
 arch/powerpc/sysdev/xics/xics-common.c   |2 +-
 arch/x86/include/asm/msi.h   |4 +
 arch/x86/kernel/apic/msi.c   |5 +-
 arch/x86/kernel/apic/vector.c|2 +
 drivers/hv/hv.c  |3 +-
 drivers/hv/vmbus_drv.c   |   17 +
 drivers/irqchip/irq-gic-v3-its-pci-msi.c |2 +-
 drivers/irqchip/irq-gic-v3-its-platform-msi.c|2 +-
 drivers/of/irq.c |2 +-
 drivers/pci/Kconfig  |7 +
 drivers/pci/host/Makefile|1 +
 drivers/pci/host/hv_pcifront.c   | 2244 ++
 drivers/pci/msi.c|2 +
 drivers/pci/of.c |2 +-
 drivers/pci/probe.c  |   11 +
 include/linux/hyperv.h   |   14 +
 include/linux/irqdomain.h|9 +-
 include/linux/msi.h  |4 +
 kernel/irq/chip.c|1 +
 kernel/irq/irqdomain.c   |   48 +-
 kernel/irq/msi.c |   24 +
 33 files changed, 2394 insertions(+), 38 deletions(-)
 create mode 100644 drivers/pci/host/hv_pcifront.c

-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH RESEND 04/16] staging: rtl8188eu: remove unused macro GEN_DRV_CMD_HANDLER

2015-09-10 Thread Luca Ceresoli
Signed-off-by: Luca Ceresoli 
Cc: Larry Finger 
Cc: Greg Kroah-Hartman 
---
 drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
index cc3857dbfe09..8a5a50e3c935 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
@@ -626,8 +626,6 @@ u8 led_blink_hdl(struct adapter *padapter, unsigned char 
*pbuf);
 u8 set_csa_hdl(struct adapter *padapter, unsigned char *pbuf);
 u8 tdls_hdl(struct adapter *padapter, unsigned char *pbuf);
 
-#define GEN_DRV_CMD_HANDLER(size, cmd) {size,  ## _hdl},
-
 #ifdef _RTW_CMD_C_
 
 static struct cmd_hdl wlancmds[] = {
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 2/2] staging: wilc1000: coreconfigurator.c: remove unused functions

2015-09-10 Thread Tony Cho
From: Glen Lee 

This patch removes following unused funtions which will not be used anymore.

ascii_hex_to_dec
get_hex_char
extract_mac_addr
create_mac_addr
conv_ip_to_int
conv_int_to_ip
get_wid_type
get_type
CreateConfigPacket
ConfigWaitResponse
ConfigProvideResponse
ConfigPktReceived
ParseWriteResponse
CreatePacketHeader
ParseResponse
ProcessBinWid
ProcessAdrWid
ProcessStrWid
ProcessIPwid
ProcessIntWid
ProcessShortWid
ProcessCharWid

As a result, four global variable causes defined but not used compile warnings.
So just remove unused varialbs g_seqno, g_wid_num, Res_Len and g_oper_mode.

Signed-off-by: Glen Lee 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/coreconfigurator.c | 1051 ---
 1 file changed, 1051 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index 450c3ff..f393424 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -163,14 +163,6 @@ static struct semaphore SemHandlePktResp;
 
 static tstrConfigPktInfo gstrConfigPktInfo;
 
-static u8 g_seqno;
-
-static s16 g_wid_num  = -1;
-
-static u16 Res_Len;
-
-static u8 g_oper_mode= SET_CFG;
-
 /* WID Switches */
 static tstrWID gastrWIDs[] = {
{WID_FIRMWARE_VERSION,  WID_STR},
@@ -307,160 +299,6 @@ u16 g_num_total_switches = (sizeof(gastrWIDs) / 
sizeof(tstrWID));
 /*/
 /* Functions */
 /*/
-INLINE u8 ascii_hex_to_dec(u8 num)
-{
-   if ((num >= '0') && (num <= '9'))
-   return (num - '0');
-   else if ((num >= 'A') && (num <= 'F'))
-   return (10 + (num - 'A'));
-   else if ((num >= 'a') && (num <= 'f'))
-   return (10 + (num - 'a'));
-
-   return INVALID;
-}
-
-INLINE u8 get_hex_char(u8 inp)
-{
-   u8 *d2htab = "0123456789ABCDEF";
-
-   return d2htab[inp & 0xF];
-}
-
-/* This function extracts the MAC address held in a string in standard format 
*/
-/* into another buffer as integers.   
*/
-INLINE u16 extract_mac_addr(char *str, u8 *buff)
-{
-   *buff = 0;
-   while (*str != '\0') {
-   if ((*str == ':') || (*str == '-'))
-   *(++buff) = 0;
-   else
-   *buff = (*buff << 4) + ascii_hex_to_dec(*str);
-
-   str++;
-   }
-
-   return MAC_ADDR_LEN;
-}
-
-/* This function creates MAC address in standard format from a buffer of  
*/
-/* integers.  
*/
-INLINE void create_mac_addr(u8 *str, u8 *buff)
-{
-   u32 i = 0;
-   u32 j = 0;
-
-   for (i = 0; i < MAC_ADDR_LEN; i++) {
-   str[j++] = get_hex_char((u8)((buff[i] >> 4) & 0x0F));
-   str[j++] = get_hex_char((u8)(buff[i] & 0x0F));
-   str[j++] = ':';
-   }
-   str[--j] = '\0';
-}
-
-/* This function converts the IP address string in dotted decimal format to */
-/* unsigned integer. This functionality is similar to the library function  */
-/* inet_addr() but is reimplemented here since I could not confirm that */
-/* inet_addr is platform independent.   */
-/* ips=>IP Address String in dotted decimal format  */
-/* ipn=>Pointer to IP Address in integer format */
-INLINE u8 conv_ip_to_int(u8 *ips, u32 *ipn)
-{
-   u8 i   = 0;
-   u8 ipb = 0;
-   *ipn = 0;
-   /* Integer to string for each component */
-   while (ips[i] != '\0') {
-   if (ips[i] == '.') {
-   *ipn = ((*ipn) << 8) | ipb;
-   ipb = 0;
-   } else {
-   ipb = ipb * 10 + ascii_hex_to_dec(ips[i]);
-   }
-
-   i++;
-   }
-
-   /* The last byte of the IP address is read in here */
-   *ipn = ((*ipn) << 8) | ipb;
-
-   return 0;
-}
-
-/* This function converts the IP address from integer format to dotted*/
-/* decimal string format. Alternative to std library fn inet_ntoa().  */
-/* ips=>Buffer to hold IP Address String dotted decimal format (Min 17B)  */
-/* ipn=>IP Address in integer format  */
-INLINE u8 conv_int_to_ip(u8 *ips, u32 ipn)
-{
-   u8 i   = 0;
-   u8 ipb = 0;
-   u8 cnt = 0;
-   u8 ipbsize = 0;
-
-   for (cnt = 4; cnt > 0; cnt--) {
-   ipb = (ipn >> (8 * (cnt - 1))) & 0xFF;
-
-   if (ipb >= 100)
-   ipbsize = 2;
-   else if (ipb >= 10)
-   ipbsize = 1;
-   else
-   

[PATCH 0/2] resending v2 of the patch for coreconfigurator.c file

2015-09-10 Thread Tony Cho
This is the version 2 for the series of the patch which removes unused
functions from the coreconfigurator.c file. Some of functions was not included
in the first patch.

Glen Lee (2):
  staging: wilc1000: remove unused enum
  staging: wilc1000: coreconfigurator.c: remove unused functions

 drivers/staging/wilc1000/coreconfigurator.c | 1059 ---
 1 file changed, 1059 deletions(-)

-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 1/2] staging: wilc1000: remove unused enum

2015-09-10 Thread Tony Cho
From: Glen Lee 

This patch removes a unused enum tenuFrameClass.

Signed-off-by: Glen Lee 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/coreconfigurator.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index 58e6108..450c3ff 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -88,14 +88,6 @@ typedef enum {
FRAME_SUBTYPE_FORCE_32BIT  = 0x
 } tenuFrmSubtype;
 
-/* Basic Frame Classes */
-typedef enum {
-   CLASS1_FRAME_TYPE  = 0x00,
-   CLASS2_FRAME_TYPE  = 0x01,
-   CLASS3_FRAME_TYPE  = 0x02,
-   FRAME_CLASS_FORCE_32BIT  = 0x
-} tenuFrameClass;
-
 /* Element ID  of various Information Elements */
 typedef enum {
ISSID   = 0,   /* Service Set Identifier */
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 09/31] staging: wilc1000: rename WILC_WFI_add_virt_intf

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_add_virt_intf with wilc_add_virt_intf to
avoid CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index ca7a36f..01d6e4d 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -3498,7 +3498,7 @@ static int WILC_WFI_change_station(struct wiphy *wiphy, 
struct net_device *dev,
 
 
 /**
- *  @brief  WILC_WFI_add_virt_intf
+ *  @brief  wilc_add_virt_intf
  *  @details
  *  @param[in]
  *  @return int : Return 0 on Success.
@@ -3506,10 +3506,10 @@ static int WILC_WFI_change_station(struct wiphy *wiphy, 
struct net_device *dev,
  *  @date  01 JUL 2012
  *  @version   1.0
  */
-struct wireless_dev *WILC_WFI_add_virt_intf(struct wiphy *wiphy, const char 
*name,
-   unsigned char name_assign_type,
-   enum nl80211_iftype type, u32 
*flags,
-   struct vif_params *params)
+struct wireless_dev *wilc_add_virt_intf(struct wiphy *wiphy, const char *name,
+   unsigned char name_assign_type,
+   enum nl80211_iftype type, u32 *flags,
+   struct vif_params *params)
 {
perInterface_wlan_t *nic;
struct WILC_WFI_priv *priv;
@@ -3567,7 +3567,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.get_key = wilc_get_key,
.set_default_key = wilc_set_default_key,
#ifdef WILC_AP_EXTERNAL_MLME
-   .add_virtual_intf = WILC_WFI_add_virt_intf,
+   .add_virtual_intf = wilc_add_virt_intf,
.del_virtual_intf = WILC_WFI_del_virt_intf,
.change_virtual_intf = WILC_WFI_change_virt_intf,
 
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 08/31] staging: wilc1000: rename WILC_WFI_set_default_key

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_set_default_key with wilc_set_default_key
to avoid CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 8f90e48..ca7a36f 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1566,7 +1566,7 @@ static int wilc_get_key(struct wiphy *wiphy, struct 
net_device *netdev, u8 key_i
 }
 
 /**
- *  @brief  WILC_WFI_set_default_key
+ *  @brief  wilc_set_default_key
  *  @detailsSet the default management frame key on an interface
  *  @param[in]
  *  @return int : Return 0 on Success.
@@ -1574,8 +1574,8 @@ static int wilc_get_key(struct wiphy *wiphy, struct 
net_device *netdev, u8 key_i
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int WILC_WFI_set_default_key(struct wiphy *wiphy, struct net_device 
*netdev, u8 key_index,
-   bool unicast, bool multicast)
+static int wilc_set_default_key(struct wiphy *wiphy, struct net_device 
*netdev, u8 key_index,
+   bool unicast, bool multicast)
 {
s32 s32Error = WILC_SUCCESS;
struct WILC_WFI_priv *priv;
@@ -3565,7 +3565,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.add_key = wilc_add_key,
.del_key = wilc_del_key,
.get_key = wilc_get_key,
-   .set_default_key = WILC_WFI_set_default_key,
+   .set_default_key = wilc_set_default_key,
#ifdef WILC_AP_EXTERNAL_MLME
.add_virtual_intf = WILC_WFI_add_virt_intf,
.del_virtual_intf = WILC_WFI_del_virt_intf,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 07/31] staging: wilc1000: rename WILC_WFI_get_key

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_get_key with wilc_get_key to avoid
CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index ba5d790..8f90e48 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1511,7 +1511,7 @@ static int wilc_del_key(struct wiphy *wiphy, struct 
net_device *netdev,
 }
 
 /**
- *  @brief  WILC_WFI_get_key
+ *  @brief  wilc_get_key
  *  @detailsGet information about the key with the given parameters.
  *  @mac_addr will be %NULL when requesting information 
for a group
  *  key. All pointers given to the @callback function need 
not be valid
@@ -1523,9 +1523,9 @@ static int wilc_del_key(struct wiphy *wiphy, struct 
net_device *netdev,
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int WILC_WFI_get_key(struct wiphy *wiphy, struct net_device *netdev, u8 
key_index,
-   bool pairwise,
-   const u8 *mac_addr, void *cookie, void 
(*callback)(void *cookie, struct key_params *))
+static int wilc_get_key(struct wiphy *wiphy, struct net_device *netdev, u8 
key_index,
+   bool pairwise,
+   const u8 *mac_addr, void *cookie, void (*callback)(void 
*cookie, struct key_params *))
 {
 
s32 s32Error = WILC_SUCCESS;
@@ -3564,7 +3564,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.disconnect = wilc_disconnect,
.add_key = wilc_add_key,
.del_key = wilc_del_key,
-   .get_key = WILC_WFI_get_key,
+   .get_key = wilc_get_key,
.set_default_key = WILC_WFI_set_default_key,
#ifdef WILC_AP_EXTERNAL_MLME
.add_virtual_intf = WILC_WFI_add_virt_intf,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 05/31] staging: wilc1000: rename WILC_WFI_add_key

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_add_key with wilc_add_key to avoid
CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index e301372..db327f7 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1112,7 +1112,7 @@ static int wilc_disconnect(struct wiphy *wiphy, struct 
net_device *dev, u16 reas
 }
 
 /**
- *  @brief  WILC_WFI_add_key
+ *  @brief  wilc_add_key
  *  @detailsAdd a key with the given parameters. @mac_addr will be %NULL
  *  when adding a group key.
  *  @param[in] key : key buffer; TKIP: 16-byte temporal key, 8-byte Tx Mic 
key, 8-byte Rx Mic Key
@@ -1121,9 +1121,9 @@ static int wilc_disconnect(struct wiphy *wiphy, struct 
net_device *dev, u16 reas
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 
key_index,
-   bool pairwise,
-   const u8 *mac_addr, struct key_params *params)
+static int wilc_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 
key_index,
+   bool pairwise,
+   const u8 *mac_addr, struct key_params *params)
 
 {
s32 s32Error = WILC_SUCCESS, KeyLen = params->key_len;
@@ -2933,14 +2933,14 @@ static int WILC_WFI_change_virt_intf(struct wiphy 
*wiphy, struct net_device *dev
PRINT_D(CFG80211_DBG, "gtk %x %x %x\n", 
g_key_gtk_params.key[0],
g_key_gtk_params.key[1],
g_key_gtk_params.key[2]);
-   
WILC_WFI_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy,
+   
wilc_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy,
 
g_linux_wlan->strInterfaceInfo[0].wilc_netdev,
 g_add_ptk_key_params.key_idx,
 g_add_ptk_key_params.pairwise,
 g_add_ptk_key_params.mac_addr,
 (struct key_params 
*)(_key_ptk_params));
 
-   
WILC_WFI_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy,
+   
wilc_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy,
 
g_linux_wlan->strInterfaceInfo[0].wilc_netdev,
 g_add_gtk_key_params.key_idx,
 g_add_gtk_key_params.pairwise,
@@ -3019,14 +3019,14 @@ static int WILC_WFI_change_virt_intf(struct wiphy 
*wiphy, struct net_device *dev
PRINT_D(CFG80211_DBG, "gtk %x %x %x\n", 
g_key_gtk_params.key[0],
g_key_gtk_params.key[1],
g_key_gtk_params.key[2]);
-   
WILC_WFI_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy,
+   
wilc_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy,
 
g_linux_wlan->strInterfaceInfo[0].wilc_netdev,
 g_add_ptk_key_params.key_idx,
 g_add_ptk_key_params.pairwise,
 g_add_ptk_key_params.mac_addr,
 (struct key_params 
*)(_key_ptk_params));
 
-   
WILC_WFI_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy,
+   
wilc_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy,
 
g_linux_wlan->strInterfaceInfo[0].wilc_netdev,
 g_add_gtk_key_params.key_idx,
 g_add_gtk_key_params.pairwise,
@@ -3150,14 +3150,14 @@ static int WILC_WFI_change_virt_intf(struct wiphy 
*wiphy, struct net_device *dev
g_key_gtk_params.key[2],
g_key_gtk_params.cipher);
#if 1
-   
WILC_WFI_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy,
+   

[PATCH V2 03/31] staging: wilc1000: rename WILC_WFI_CfgConnect

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_CfgConnect with wilc_connect to avoid
CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 8adc26a..0337a29 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -806,7 +806,7 @@ static int wilc_scan(struct wiphy *wiphy, struct 
cfg80211_scan_request *request)
 }
 
 /**
- *  @brief  WILC_WFI_CfgConnect
+ *  @brief  wilc_connect
  *  @detailsConnect to the ESS with the specified parameters. When 
connected,
  *  call cfg80211_connect_result() with status code 
%WLAN_STATUS_SUCCESS.
  *  If the connection fails for some reason, call 
cfg80211_connect_result()
@@ -817,8 +817,8 @@ static int wilc_scan(struct wiphy *wiphy, struct 
cfg80211_scan_request *request)
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev,
-  struct cfg80211_connect_params *sme)
+static int wilc_connect(struct wiphy *wiphy, struct net_device *dev,
+   struct cfg80211_connect_params *sme)
 {
s32 s32Error = WILC_SUCCESS;
u32 i;
@@ -3560,7 +3560,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
 
.set_monitor_channel = wilc_set_channel,
.scan = wilc_scan,
-   .connect = WILC_WFI_CfgConnect,
+   .connect = wilc_connect,
.disconnect = WILC_WFI_disconnect,
.add_key = WILC_WFI_add_key,
.del_key = WILC_WFI_del_key,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 01/31] staging: wilc1000: rename WILC_WFI_CfgSetChannel

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_CfgSetChannel with
wilc_set_channel to avoid CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index cf76a33..3149fd8 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -677,7 +677,7 @@ static void CfgConnectResult(tenuConnDisconnEvent 
enuConnDisconnEvent,
 
 
 /**
- *  @brief  WILC_WFI_CfgSetChannel
+ *  @brief  wilc_set_channel
  *  @detailsSet channel for a given wireless interface. Some devices
  *  may support multi-channel operation (by channel 
hopping) so cfg80211
  *  doesn't verify much. Note, however, that the passed 
netdev may be
@@ -689,8 +689,8 @@ static void CfgConnectResult(tenuConnDisconnEvent 
enuConnDisconnEvent,
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int WILC_WFI_CfgSetChannel(struct wiphy *wiphy,
- struct cfg80211_chan_def *chandef)
+static int wilc_set_channel(struct wiphy *wiphy,
+   struct cfg80211_chan_def *chandef)
 {
 
u32 channelnum = 0;
@@ -3230,7 +3230,7 @@ static int WILC_WFI_start_ap(struct wiphy *wiphy, struct 
net_device *dev,
PRINT_D(HOSTAPD_DBG, "Interval = %d\n DTIM period = %d\n Head length = 
%zu Tail length = %zu\n",
settings->beacon_interval, settings->dtim_period, 
beacon->head_len, beacon->tail_len);
 
-   s32Error = WILC_WFI_CfgSetChannel(wiphy, >chandef);
+   s32Error = wilc_set_channel(wiphy, >chandef);
 
if (s32Error != WILC_SUCCESS)
PRINT_ER("Error in setting channel\n");
@@ -3558,7 +3558,7 @@ int WILC_WFI_del_virt_intf(struct wiphy *wiphy, struct 
wireless_dev *wdev)
 #endif /*WILC_AP_EXTERNAL_MLME*/
 static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
 
-   .set_monitor_channel = WILC_WFI_CfgSetChannel,
+   .set_monitor_channel = wilc_set_channel,
.scan = WILC_WFI_CfgScan,
.connect = WILC_WFI_CfgConnect,
.disconnect = WILC_WFI_disconnect,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 04/31] staging: wilc1000: rename WILC_WFI_disconnect

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_disconnect with wilc_disconnect to avoid
CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 0337a29..e301372 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1064,7 +1064,7 @@ done:
 
 
 /**
- *  @brief  WILC_WFI_disconnect
+ *  @brief  wilc_disconnect
  *  @detailsDisconnect from the BSS/ESS.
  *  @param[in]
  *  @return int : Return 0 on Success
@@ -1072,7 +1072,7 @@ done:
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int WILC_WFI_disconnect(struct wiphy *wiphy, struct net_device *dev, 
u16 reason_code)
+static int wilc_disconnect(struct wiphy *wiphy, struct net_device *dev, u16 
reason_code)
 {
s32 s32Error = WILC_SUCCESS;
struct WILC_WFI_priv *priv;
@@ -3561,7 +3561,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.set_monitor_channel = wilc_set_channel,
.scan = wilc_scan,
.connect = wilc_connect,
-   .disconnect = WILC_WFI_disconnect,
+   .disconnect = wilc_disconnect,
.add_key = WILC_WFI_add_key,
.del_key = WILC_WFI_del_key,
.get_key = WILC_WFI_get_key,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 02/31] staging: wilc1000: rename WILC_WFI_CfgScan

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_CfgScan with wilc_scan to avoid CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 3149fd8..8adc26a 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -712,7 +712,7 @@ static int wilc_set_channel(struct wiphy *wiphy,
 }
 
 /**
- *  @brief  WILC_WFI_CfgScan
+ *  @brief  wilc_scan
  *  @detailsRequest to do a scan. If returning zero, the scan request is 
given
  *  the driver, and will be valid until passed to 
cfg80211_scan_done().
  *  For scan results, call cfg80211_inform_bss(); you can 
call this outside
@@ -728,7 +728,7 @@ static int wilc_set_channel(struct wiphy *wiphy,
  * kernel version 3.8.8 supported
  * tony, sswd, WILC-KR, 2013-10-29
  */
-static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request 
*request)
+static int wilc_scan(struct wiphy *wiphy, struct cfg80211_scan_request 
*request)
 {
struct WILC_WFI_priv *priv;
u32 i;
@@ -3559,7 +3559,7 @@ int WILC_WFI_del_virt_intf(struct wiphy *wiphy, struct 
wireless_dev *wdev)
 static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
 
.set_monitor_channel = wilc_set_channel,
-   .scan = WILC_WFI_CfgScan,
+   .scan = wilc_scan,
.connect = WILC_WFI_CfgConnect,
.disconnect = WILC_WFI_disconnect,
.add_key = WILC_WFI_add_key,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 26/31] staging: wilc1000: rename WILC_WFI_cancel_remain_on_channel

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_cancel_remain_on_channel with
wilc_cancel_remain_on_channel to avoid CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 824fba0..6b84821 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -2444,7 +2444,7 @@ static int  wilc_remain_on_channel(struct wiphy *wiphy,
 }
 
 /**
- *  @brief  WILC_WFI_cancel_remain_on_channel
+ *  @brief  wilc_cancel_remain_on_channel
  *  @detailsCancel an on-going remain-on-channel operation.
  *  This allows the operation to be terminated prior to 
timeout based on
  *  the duration value.
@@ -2456,9 +2456,9 @@ static int  wilc_remain_on_channel(struct wiphy *wiphy,
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int   WILC_WFI_cancel_remain_on_channel(struct wiphy *wiphy,
-  struct wireless_dev *wdev,
-  u64 cookie)
+static int   wilc_cancel_remain_on_channel(struct wiphy *wiphy,
+  struct wireless_dev *wdev,
+  u64 cookie)
 {
s32 s32Error = WILC_SUCCESS;
struct WILC_WFI_priv *priv;
@@ -3588,7 +3588,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.flush_pmksa = wilc_flush_pmksa,
 #ifdef WILC_P2P
.remain_on_channel = wilc_remain_on_channel,
-   .cancel_remain_on_channel = WILC_WFI_cancel_remain_on_channel,
+   .cancel_remain_on_channel = wilc_cancel_remain_on_channel,
.mgmt_tx_cancel_wait = WILC_WFI_mgmt_tx_cancel_wait,
.mgmt_tx = WILC_WFI_mgmt_tx,
.mgmt_frame_register = WILC_WFI_frame_register,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 19/31] staging: wilc1000: rename WILC_WFI_dump_station

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_dump_station with wilc_dump_station to
avoid CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index afacda5..06276de 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -2760,7 +2760,7 @@ static intWILC_WFI_set_cqm_rssi_config(struct wiphy 
*wiphy,
 
 }
 /**
- *  @brief  WILC_WFI_dump_station
+ *  @brief  wilc_dump_station
  *  @detailsConfigure connection quality monitor RSSI threshold.
  *  @param[in]   struct wiphy *wiphy:
  *  @param[in] struct net_device *dev
@@ -2772,8 +2772,8 @@ static intWILC_WFI_set_cqm_rssi_config(struct wiphy 
*wiphy,
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int WILC_WFI_dump_station(struct wiphy *wiphy, struct net_device *dev,
-int idx, u8 *mac, struct station_info *sinfo)
+static int wilc_dump_station(struct wiphy *wiphy, struct net_device *dev,
+int idx, u8 *mac, struct station_info *sinfo)
 {
struct WILC_WFI_priv *priv;
 
@@ -3579,7 +3579,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.change_station = wilc_change_station,
#endif /* WILC_AP_EXTERNAL_MLME*/
.get_station = wilc_get_station,
-   .dump_station = WILC_WFI_dump_station,
+   .dump_station = wilc_dump_station,
.change_bss = WILC_WFI_change_bss,
.set_wiphy_params = WILC_WFI_set_wiphy_params,
 
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 17/31] staging: wilc1000: rename WILC_WFI_change_station

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_change_station with wilc_change_station to
avoid CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index ff78497..76556a0 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -3427,7 +3427,7 @@ static int wilc_del_station(struct wiphy *wiphy, struct 
net_device *dev,
 }
 
 /**
- *  @brief  WILC_WFI_change_station
+ *  @brief  wilc_change_station
  *  @detailsModify a given station.
  *  @param[in]
  *  @return int : Return 0 on Success.
@@ -3435,8 +3435,8 @@ static int wilc_del_station(struct wiphy *wiphy, struct 
net_device *dev,
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int WILC_WFI_change_station(struct wiphy *wiphy, struct net_device *dev,
-  const u8 *mac, struct station_parameters 
*params)
+static int wilc_change_station(struct wiphy *wiphy, struct net_device *dev,
+  const u8 *mac, struct station_parameters *params)
 {
s32 s32Error = WILC_SUCCESS;
struct WILC_WFI_priv *priv;
@@ -3576,7 +3576,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.stop_ap = wilc_stop_ap,
.add_station = wilc_add_station,
.del_station = wilc_del_station,
-   .change_station = WILC_WFI_change_station,
+   .change_station = wilc_change_station,
#endif /* WILC_AP_EXTERNAL_MLME*/
.get_station = WILC_WFI_get_station,
.dump_station = WILC_WFI_dump_station,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 14/31] staging: wilc1000: rename WILC_WFI_stop_ap

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_stop_ap with wilc_stop_ap to avoid
CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 69df5a0..1f21a83 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -3278,7 +3278,7 @@ static int  wilc_change_beacon(struct wiphy *wiphy, 
struct net_device *dev,
 }
 
 /**
- *  @brief  WILC_WFI_stop_ap
+ *  @brief  wilc_stop_ap
  *  @detailsRemove beacon configuration and stop sending the beacon.
  *  @param[in]
  *  @return int : Return 0 on Success.
@@ -3286,7 +3286,7 @@ static int  wilc_change_beacon(struct wiphy *wiphy, 
struct net_device *dev,
  *  @date  23 JUL 2013
  *  @version   1.0
  */
-static int  WILC_WFI_stop_ap(struct wiphy *wiphy, struct net_device *dev)
+static int  wilc_stop_ap(struct wiphy *wiphy, struct net_device *dev)
 {
s32 s32Error = WILC_SUCCESS;
struct WILC_WFI_priv *priv;
@@ -3573,7 +3573,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
 
.start_ap = wilc_start_ap,
.change_beacon = wilc_change_beacon,
-   .stop_ap = WILC_WFI_stop_ap,
+   .stop_ap = wilc_stop_ap,
.add_station = WILC_WFI_add_station,
.del_station = WILC_WFI_del_station,
.change_station = WILC_WFI_change_station,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 15/31] staging: wilc1000: rename WILC_WFI_add_station

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_add_station with wilc_add_station to avoid
CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 1f21a83..03dd87f 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -3313,7 +3313,7 @@ static int  wilc_stop_ap(struct wiphy *wiphy, struct 
net_device *dev)
 }
 
 /**
- *  @brief  WILC_WFI_add_station
+ *  @brief  wilc_add_station
  *  @detailsAdd a new station.
  *  @param[in]
  *  @return int : Return 0 on Success.
@@ -3321,8 +3321,8 @@ static int  wilc_stop_ap(struct wiphy *wiphy, struct 
net_device *dev)
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int  WILC_WFI_add_station(struct wiphy *wiphy, struct net_device *dev,
-const u8 *mac, struct station_parameters 
*params)
+static int  wilc_add_station(struct wiphy *wiphy, struct net_device *dev,
+const u8 *mac, struct station_parameters *params)
 {
s32 s32Error = WILC_SUCCESS;
struct WILC_WFI_priv *priv;
@@ -3574,7 +3574,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.start_ap = wilc_start_ap,
.change_beacon = wilc_change_beacon,
.stop_ap = wilc_stop_ap,
-   .add_station = WILC_WFI_add_station,
+   .add_station = wilc_add_station,
.del_station = WILC_WFI_del_station,
.change_station = WILC_WFI_change_station,
#endif /* WILC_AP_EXTERNAL_MLME*/
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 21/31] staging: wilc1000: rename WILC_WFI_set_wiphy_params

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_set_wiphy_params with wilc_set_wiphy_params
to avoid CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 8a71027..fb98534 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1802,7 +1802,7 @@ static int  WILC_WFI_disassoc(struct wiphy *wiphy, struct 
net_device *dev,
 }
 
 /**
- *  @brief  WILC_WFI_set_wiphy_params
+ *  @brief  wilc_set_wiphy_params
  *  @detailsNotify that wiphy parameters have changed;
  *  @param[in]   Changed bitfield (see  wiphy_params_flags) describes 
which values
  *  have changed.
@@ -1811,7 +1811,7 @@ static int  WILC_WFI_disassoc(struct wiphy *wiphy, struct 
net_device *dev,
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int WILC_WFI_set_wiphy_params(struct wiphy *wiphy, u32 changed)
+static int wilc_set_wiphy_params(struct wiphy *wiphy, u32 changed)
 {
s32 s32Error = WILC_SUCCESS;
tstrCfgParamVal pstrCfgParamVal;
@@ -3581,7 +3581,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.get_station = wilc_get_station,
.dump_station = wilc_dump_station,
.change_bss = wilc_change_bss,
-   .set_wiphy_params = WILC_WFI_set_wiphy_params,
+   .set_wiphy_params = wilc_set_wiphy_params,
 
.set_pmksa = WILC_WFI_set_pmksa,
.del_pmksa = WILC_WFI_del_pmksa,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 12/31] staging: wilc1000: rename WILC_WFI_start_ap

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_start_ap with wilc_start_ap to avoid
CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 3c82f2a..eba2d56 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -3206,7 +3206,7 @@ static int wilc_change_virt_intf(struct wiphy *wiphy, 
struct net_device *dev,
  */
 
 /**
- *  @brief  WILC_WFI_start_ap
+ *  @brief  wilc_start_ap
  *  @detailsAdd a beacon with given parameters, @head, @interval
  *  and @dtim_period will be valid, @tail is optional.
  *  @param[in]   wiphy
@@ -3217,8 +3217,8 @@ static int wilc_change_virt_intf(struct wiphy *wiphy, 
struct net_device *dev,
  *  @date  23 JUL 2013
  *  @version   1.0
  */
-static int WILC_WFI_start_ap(struct wiphy *wiphy, struct net_device *dev,
-struct cfg80211_ap_settings *settings)
+static int wilc_start_ap(struct wiphy *wiphy, struct net_device *dev,
+struct cfg80211_ap_settings *settings)
 {
struct cfg80211_beacon_data *beacon = &(settings->beacon);
struct WILC_WFI_priv *priv;
@@ -3571,7 +3571,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.del_virtual_intf = wilc_del_virt_intf,
.change_virtual_intf = wilc_change_virt_intf,
 
-   .start_ap = WILC_WFI_start_ap,
+   .start_ap = wilc_start_ap,
.change_beacon = WILC_WFI_change_beacon,
.stop_ap = WILC_WFI_stop_ap,
.add_station = WILC_WFI_add_station,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 24/31] staging: wilc1000: rename WILC_WFI_flush_pmksa

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_flush_pmksa with wilc_flush_pmksa to avoid
CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 96c94e59..c7cc1a2 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1981,7 +1981,7 @@ static int wilc_del_pmksa(struct wiphy *wiphy, struct 
net_device *netdev,
 }
 
 /**
- *  @brief  WILC_WFI_flush_pmksa
+ *  @brief  wilc_flush_pmksa
  *  @detailsFlush all cached PMKIDs.
  *  @param[in]
  *  @return int : Return 0 on Success
@@ -1989,7 +1989,7 @@ static int wilc_del_pmksa(struct wiphy *wiphy, struct 
net_device *netdev,
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int  WILC_WFI_flush_pmksa(struct wiphy *wiphy, struct net_device 
*netdev)
+static int  wilc_flush_pmksa(struct wiphy *wiphy, struct net_device *netdev)
 {
struct WILC_WFI_priv *priv = wiphy_priv(wiphy);
 
@@ -3585,7 +3585,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
 
.set_pmksa = wilc_set_pmksa,
.del_pmksa = wilc_del_pmksa,
-   .flush_pmksa = WILC_WFI_flush_pmksa,
+   .flush_pmksa = wilc_flush_pmksa,
 #ifdef WILC_P2P
.remain_on_channel = WILC_WFI_remain_on_channel,
.cancel_remain_on_channel = WILC_WFI_cancel_remain_on_channel,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 25/31] staging: wilc1000: rename WILC_WFI_remain_on_channel

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_remain_on_channel with
wilc_remain_on_channel to avoid CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index c7cc1a2..824fba0 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -2391,7 +2391,7 @@ static void WILC_WFI_RemainOnChannelExpired(void 
*pUserVoid, u32 u32SessionID)
 
 
 /**
- *  @brief  WILC_WFI_remain_on_channel
+ *  @brief  wilc_remain_on_channel
  *  @detailsRequest the driver to remain awake on the specified
  *  channel for the specified duration to complete an 
off-channel
  *  operation (e.g., public action frame exchange). When 
the driver is
@@ -2403,10 +2403,10 @@ static void WILC_WFI_RemainOnChannelExpired(void 
*pUserVoid, u32 u32SessionID)
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int  WILC_WFI_remain_on_channel(struct wiphy *wiphy,
-  struct wireless_dev *wdev,
-  struct ieee80211_channel *chan,
-  unsigned int duration, u64 *cookie)
+static int  wilc_remain_on_channel(struct wiphy *wiphy,
+  struct wireless_dev *wdev,
+  struct ieee80211_channel *chan,
+  unsigned int duration, u64 *cookie)
 {
s32 s32Error = WILC_SUCCESS;
struct WILC_WFI_priv *priv;
@@ -3587,7 +3587,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.del_pmksa = wilc_del_pmksa,
.flush_pmksa = wilc_flush_pmksa,
 #ifdef WILC_P2P
-   .remain_on_channel = WILC_WFI_remain_on_channel,
+   .remain_on_channel = wilc_remain_on_channel,
.cancel_remain_on_channel = WILC_WFI_cancel_remain_on_channel,
.mgmt_tx_cancel_wait = WILC_WFI_mgmt_tx_cancel_wait,
.mgmt_tx = WILC_WFI_mgmt_tx,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 28/31] staging: wilc1000: rename WILC_WFI_mgmt_tx

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_mgmt_tx with wilc_mgmt_tx to avoid
CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 8ce6721..dc935cb 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -2496,10 +2496,10 @@ void WILC_WFI_add_wilcvendorspec(u8 *buff)
  */
 extern linux_wlan_t *g_linux_wlan;
 extern bool bEnablePS;
-int WILC_WFI_mgmt_tx(struct wiphy *wiphy,
-   struct wireless_dev *wdev,
-   struct cfg80211_mgmt_tx_params *params,
-   u64 *cookie)
+int wilc_mgmt_tx(struct wiphy *wiphy,
+struct wireless_dev *wdev,
+struct cfg80211_mgmt_tx_params *params,
+u64 *cookie)
 {
struct ieee80211_channel *chan = params->chan;
unsigned int wait = params->wait;
@@ -3590,7 +3590,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.remain_on_channel = wilc_remain_on_channel,
.cancel_remain_on_channel = wilc_cancel_remain_on_channel,
.mgmt_tx_cancel_wait = wilc_mgmt_tx_cancel_wait,
-   .mgmt_tx = WILC_WFI_mgmt_tx,
+   .mgmt_tx = wilc_mgmt_tx,
.mgmt_frame_register = WILC_WFI_frame_register,
.set_power_mgmt = WILC_WFI_set_power_mgmt,
.set_cqm_rssi_config = WILC_WFI_set_cqm_rssi_config,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 22/31] staging: wilc1000: rename WILC_WFI_set_pmksa

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_set_pmksa with wilc_set_pmksa to avoid
CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index fb98534..3bac541 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1880,7 +1880,7 @@ static int WILC_WFI_set_bitrate_mask(struct wiphy *wiphy,
 }
 
 /**
- *  @brief  WILC_WFI_set_pmksa
+ *  @brief  wilc_set_pmksa
  *  @detailsCache a PMKID for a BSSID. This is mostly useful for fullmac
  *  devices running firmwares capable of generating the 
(re) association
  *  RSN IE. It allows for faster roaming between WPA2 
BSSIDs.
@@ -1890,8 +1890,8 @@ static int WILC_WFI_set_bitrate_mask(struct wiphy *wiphy,
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static int WILC_WFI_set_pmksa(struct wiphy *wiphy, struct net_device *netdev,
- struct cfg80211_pmksa *pmksa)
+static int wilc_set_pmksa(struct wiphy *wiphy, struct net_device *netdev,
+ struct cfg80211_pmksa *pmksa)
 {
u32 i;
s32 s32Error = WILC_SUCCESS;
@@ -3583,7 +3583,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.change_bss = wilc_change_bss,
.set_wiphy_params = wilc_set_wiphy_params,
 
-   .set_pmksa = WILC_WFI_set_pmksa,
+   .set_pmksa = wilc_set_pmksa,
.del_pmksa = WILC_WFI_del_pmksa,
.flush_pmksa = WILC_WFI_flush_pmksa,
 #ifdef WILC_P2P
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 31/31] staging: wilc1000: rename WILC_WFI_set_cqm_rssi_config

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_set_cqm_rssi_config with
wilc_set_cqm_rssi_config to avoid CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 4967306..ec11f82 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -2741,7 +2741,7 @@ void wilc_mgmt_frame_register(struct wiphy *wiphy,
 #endif /*WILC_P2P*/
 
 /**
- *  @brief  WILC_WFI_set_cqm_rssi_config
+ *  @brief  wilc_set_cqm_rssi_config
  *  @detailsConfigure connection quality monitor RSSI threshold.
  *  @param[in]   struct wiphy *wiphy:
  *  @param[in] struct net_device *dev:
@@ -2752,7 +2752,7 @@ void wilc_mgmt_frame_register(struct wiphy *wiphy,
  *  @date  01 MAR 2012
  *  @version   1.0
  */
-static intWILC_WFI_set_cqm_rssi_config(struct wiphy *wiphy,
+static intwilc_set_cqm_rssi_config(struct wiphy *wiphy,
   struct net_device *dev,  s32 
rssi_thold, u32 rssi_hyst)
 {
PRINT_D(CFG80211_DBG, "Setting CQM RSSi Function\n");
@@ -3593,7 +3593,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
.mgmt_tx = wilc_mgmt_tx,
.mgmt_frame_register = wilc_mgmt_frame_register,
.set_power_mgmt = wilc_set_power_mgmt,
-   .set_cqm_rssi_config = WILC_WFI_set_cqm_rssi_config,
+   .set_cqm_rssi_config = wilc_set_cqm_rssi_config,
 #endif
 
 };
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 27/31] staging: wilc1000: rename WILC_WFI_mgmt_tx_cancel_wait

2015-09-10 Thread Chaehyun Lim
This patch replaces WILC_WFI_mgmt_tx_cancel_wait with
wilc_mgmt_tx_cancel_wait to avoid CamelCase.

Signed-off-by: Chaehyun Lim 
---
V2: to make function name simple

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 6b84821..8ce6721 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -2652,9 +2652,9 @@ int WILC_WFI_mgmt_tx(struct wiphy *wiphy,
return s32Error;
 }
 
-int   WILC_WFI_mgmt_tx_cancel_wait(struct wiphy *wiphy,
-  struct wireless_dev *wdev,
-  u64 cookie)
+int   wilc_mgmt_tx_cancel_wait(struct wiphy *wiphy,
+  struct wireless_dev *wdev,
+  u64 cookie)
 {
struct WILC_WFI_priv *priv;
tstrWILC_WFIDrv *pstrWFIDrv;
@@ -3589,7 +3589,7 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = {
 #ifdef WILC_P2P
.remain_on_channel = wilc_remain_on_channel,
.cancel_remain_on_channel = wilc_cancel_remain_on_channel,
-   .mgmt_tx_cancel_wait = WILC_WFI_mgmt_tx_cancel_wait,
+   .mgmt_tx_cancel_wait = wilc_mgmt_tx_cancel_wait,
.mgmt_tx = WILC_WFI_mgmt_tx,
.mgmt_frame_register = WILC_WFI_frame_register,
.set_power_mgmt = WILC_WFI_set_power_mgmt,
-- 
2.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel