Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ struct wilc_vif *wilc_get_wl_to_vif(struct wilc *wl)
}

static int set_channel(struct wiphy *wiphy,
struct net_device *netdev,
struct cfg80211_chan_def *chandef)
{
struct wilc *wl = wiphy_priv(wiphy);
Expand Down Expand Up @@ -912,7 +913,7 @@ static int change_bss(struct wiphy *wiphy, struct net_device *dev,
return 0;
}

static int set_wiphy_params(struct wiphy *wiphy, u32 changed)
static int set_wiphy_params(struct wiphy *wiphy, int radio_idx, u32 changed)
{
int ret = -EINVAL;
struct cfg_param_attr cfg_param_val;
Expand Down Expand Up @@ -2008,6 +2009,7 @@ static void wilc_set_wakeup(struct wiphy *wiphy, bool enabled)
}

static int set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
int radio_idx,
enum nl80211_tx_power_setting type, int mbm)
{
int ret;
Expand Down Expand Up @@ -2040,6 +2042,7 @@ static int set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
}

static int get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
int radio_idx, unsigned int link_id,
int *dbm)
{
int ret;
Expand All @@ -2059,7 +2062,7 @@ static int get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
return ret;
}

static int set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant)
static int set_antenna(struct wiphy *wiphy, int radio_idx, u32 tx_ant, u32 rx_ant)
{
int ret;
struct wilc *wl = wiphy_priv(wiphy);
Expand Down Expand Up @@ -2315,7 +2318,7 @@ void wilc_deinit_host_int(struct net_device *net)
mutex_destroy(&priv->scan_req_lock);
ret = wilc_deinit(vif);

del_timer_sync(&priv->eap_buff_timer);
timer_delete_sync(&priv->eap_buff_timer);

if (ret)
netdev_err(net, "Error while deinitializing host interface\n");
Expand Down
34 changes: 17 additions & 17 deletions hif.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ static inline void host_int_parse_assoc_resp_info(struct wilc_vif *vif,
}
}

del_timer(&hif_drv->connect_timer);
timer_delete(&hif_drv->connect_timer);
conn_info->conn_result(CONN_DISCONN_EVENT_CONN_RESP, mac_status,
hif_drv->conn_info.arg);

Expand Down Expand Up @@ -813,7 +813,7 @@ void wilc_handle_disconnect(struct wilc_vif *vif)
if (hif_drv->usr_scan_req.scan_result) {
PRINT_INFO(vif->ndev, HOSTINF_DBG,
"\n\n<< Abort the running OBSS Scan >>\n\n");
del_timer(&hif_drv->scan_timer);
timer_delete(&hif_drv->scan_timer);
handle_scan_done(vif, SCAN_EVENT_ABORTED);
}

Expand Down Expand Up @@ -867,7 +867,7 @@ static void handle_rcvd_gnrl_async_info(struct work_struct *work)
} else if (hif_drv->usr_scan_req.scan_result) {
PRINT_WRN(vif->ndev, HOSTINF_DBG,
"Received WILC_MAC_STATUS_DISCONNECTED. Abort the running Scan");
del_timer(&hif_drv->scan_timer);
timer_delete(&hif_drv->scan_timer);
handle_scan_done(vif, SCAN_EVENT_ABORTED);
}
}
Expand Down Expand Up @@ -900,7 +900,7 @@ int wilc_disconnect(struct wilc_vif *vif)
PRINT_INFO(vif_tmp->ndev, GENERIC_DBG,
"Abort scan from disconnect. state [%d]\n",
hif_drv_tmp->hif_state);
del_timer(&hif_drv_tmp->scan_timer);
timer_delete(&hif_drv_tmp->scan_timer);
handle_scan_done(vif_tmp, SCAN_EVENT_ABORTED);
}
}
Expand All @@ -923,15 +923,15 @@ int wilc_disconnect(struct wilc_vif *vif)
conn_info = &hif_drv->conn_info;

if (scan_req->scan_result) {
del_timer(&hif_drv->scan_timer);
timer_delete(&hif_drv->scan_timer);
scan_req->scan_result(SCAN_EVENT_ABORTED, NULL, scan_req->arg);
scan_req->scan_result = NULL;
}

if (conn_info->conn_result) {
if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP ||
hif_drv->hif_state == HOST_IF_EXTERNAL_AUTH) {
del_timer(&hif_drv->connect_timer);
timer_delete(&hif_drv->connect_timer);
conn_info->conn_result(CONN_DISCONN_EVENT_CONN_RESP,
WILC_MAC_STATUS_DISCONNECTED,
conn_info->arg);
Expand Down Expand Up @@ -1190,13 +1190,13 @@ static void wilc_handle_listen_state_expired(struct work_struct *work)

static void listen_timer_cb(struct timer_list *t)
{
struct host_if_drv *hif_drv = from_timer(hif_drv, t,
struct host_if_drv *hif_drv = timer_container_of(hif_drv, t,
remain_on_ch_timer);
struct wilc_vif *vif = hif_drv->remain_on_ch_timer_vif;
int result;
struct host_if_msg *msg;

del_timer(&vif->hif_drv->remain_on_ch_timer);
timer_delete(&vif->hif_drv->remain_on_ch_timer);

msg = wilc_alloc_work(vif, wilc_handle_listen_state_expired, false);
if (IS_ERR(msg))
Expand Down Expand Up @@ -1309,7 +1309,7 @@ static void handle_scan_complete(struct work_struct *work)
{
struct host_if_msg *msg = container_of(work, struct host_if_msg, work);

del_timer(&msg->vif->hif_drv->scan_timer);
timer_delete(&msg->vif->hif_drv->scan_timer);
PRINT_INFO(msg->vif->ndev, HOSTINF_DBG, "scan completed\n");

handle_scan_done(msg->vif, SCAN_EVENT_DONE);
Expand All @@ -1319,7 +1319,7 @@ static void handle_scan_complete(struct work_struct *work)

static void timer_scan_cb(struct timer_list *t)
{
struct host_if_drv *hif_drv = from_timer(hif_drv, t, scan_timer);
struct host_if_drv *hif_drv = timer_container_of(hif_drv, t, scan_timer);
struct wilc_vif *vif = hif_drv->scan_timer_vif;
struct host_if_msg *msg;
int result;
Expand All @@ -1335,7 +1335,7 @@ static void timer_scan_cb(struct timer_list *t)

static void timer_connect_cb(struct timer_list *t)
{
struct host_if_drv *hif_drv = from_timer(hif_drv, t,
struct host_if_drv *hif_drv = timer_container_of(hif_drv, t,
connect_timer);
struct wilc_vif *vif = hif_drv->connect_timer_vif;
struct host_if_msg *msg;
Expand Down Expand Up @@ -1790,7 +1790,7 @@ int wilc_hif_set_cfg(struct wilc_vif *vif, struct cfg_param_attr *param)

static void get_periodic_rssi(struct timer_list *t)
{
struct wilc_vif *vif = from_timer(vif, t, periodic_rssi);
struct wilc_vif *vif = timer_container_of(vif, t, periodic_rssi);

if (!vif->hif_drv) {
netdev_err(vif->ndev, "%s: hif driver is NULL", __func__);
Expand Down Expand Up @@ -1842,10 +1842,10 @@ int wilc_deinit(struct wilc_vif *vif)

mutex_lock(&vif->wilc->deinit_lock);

del_timer_sync(&hif_drv->scan_timer);
del_timer_sync(&hif_drv->connect_timer);
del_timer_sync(&vif->periodic_rssi);
del_timer_sync(&hif_drv->remain_on_ch_timer);
timer_delete_sync(&hif_drv->scan_timer);
timer_delete_sync(&hif_drv->connect_timer);
timer_delete_sync(&vif->periodic_rssi);
timer_delete_sync(&hif_drv->remain_on_ch_timer);

if (hif_drv->usr_scan_req.scan_result) {
hif_drv->usr_scan_req.scan_result(SCAN_EVENT_ABORTED, NULL,
Expand Down Expand Up @@ -2025,7 +2025,7 @@ int wilc_listen_state_expired(struct wilc_vif *vif, u64 cookie)
return -EFAULT;
}

del_timer(&vif->hif_drv->remain_on_ch_timer);
timer_delete(&vif->hif_drv->remain_on_ch_timer);

return wilc_handle_roc_expired(vif, cookie);
}
Expand Down
6 changes: 3 additions & 3 deletions netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static int debug_thread(void *arg)
if (hif_drv->usr_scan_req.scan_result) {
PRINT_INFO(vif->ndev, GENERIC_DBG,
"Abort the running OBSS Scan\n");
del_timer(&hif_drv->scan_timer);
timer_delete(&hif_drv->scan_timer);
handle_scan_done(vif,
SCAN_EVENT_ABORTED);
}
Expand Down Expand Up @@ -260,7 +260,7 @@ void eap_buff_timeout(struct timer_list *t)
u8 *assoc_bss;
static u8 timeout = 5;
int status = -1;
struct wilc_priv *priv = from_timer(priv, t, eap_buff_timer);
struct wilc_priv *priv = timer_container_of(priv, t, eap_buff_timer);
struct wilc_vif *vif = netdev_priv(priv->dev);

assoc_bss = priv->associated_bss;
Expand All @@ -269,7 +269,7 @@ void eap_buff_timeout(struct timer_list *t)
(jiffies + msecs_to_jiffies(10)));
return;
}
del_timer(&priv->eap_buff_timer);
timer_delete(&priv->eap_buff_timer);
timeout = 5;

status = wilc_send_buffered_eap(vif, wilc_frmw_to_host,
Expand Down
6 changes: 4 additions & 2 deletions power.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ int wilc_of_parse_power_pins(struct wilc *wilc)
!gpio_is_valid(power->gpios.reset))
return -EINVAL;

ret = devm_gpio_request(wilc->dev, power->gpios.chip_en, "CHIP_EN");
ret = devm_gpio_request_one(wilc->dev, power->gpios.chip_en,
GPIOF_OUT_INIT_LOW, "CHIP_EN");
if (ret)
return ret;

ret = devm_gpio_request(wilc->dev, power->gpios.reset, "RESET");
ret = devm_gpio_request_one(wilc->dev, power->gpios.reset,
GPIOF_OUT_INIT_HIGH, "RESET");
return ret;
}

Expand Down