[PATCH] Prevent unnecessary iteration in __handle_cmd
Break the loop after matching sectcmd is found. Remove redundant variable copying. Signed-off-by: Sunil Shahu --- iw.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/iw.c b/iw.c index 0f511d9..73ae347 100644 --- a/iw.c +++ b/iw.c @@ -376,11 +376,9 @@ static int __handle_cmd(struct nl80211_state *state, enum id_input idby, if (match && sectcmd->idby != command_idby) continue; if (strcmp(sectcmd->name, section) == 0) - match = sectcmd; + break; } - sectcmd = match; - match = NULL; if (!sectcmd) return 1; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Need direction to understand mac80211
Hi, I am currently working on an project that aims to provide multiple 802.11ac radio support on a single node for mesh network. In this both the radios will operate in different channel and will talk to different nodes in mesh network. I need to work with kernel mac80211 driver subsystem for the same. I went through different documentation to understand the theories of 802.11s which can help during working on mac80211 driver. However I am not able to understand the source code properly. Can you please provide some guidance to understand mac80211 and related networking stack in Linux kernel. I am looking for 1) How to create bridge bridge for two Phy radios during initialization/packet forwarding? 2) Also, need some idea about how packets will be routed in mesh_hwmp. 3) How the path request and response should behave in this case? 4) Will there be any changes for mesh path table entries? Any suggestion for document/book/blog will be great help. I already went through following materials. http://kernelnewbies.org/Documents/Kernel-Docbooks?action=AttachFile&do=get&target=mac80211_2.6.29.pdf http://www.campsmur.cat/files/mac80211_intro.pdf https://www.cwnp.com/uploads/802-11s_mesh_networking_v1-0.pdf http://www.ieee802.org/802_tutorials/06-November/802.11s_Tutorial_r5.pdf Any suggestion and directions will be great help. Thanks, Sunil Shahu. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] net:mac80211:mesh_plink: remove redundant sta_info check
Remove unnecessory "if" statement and club it with previos "if" block. Signed-off-by: Sunil Shahu --- net/mac80211/mesh_plink.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index bd3d55e..e5851ae 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -976,6 +976,9 @@ mesh_plink_get_event(struct ieee80211_sub_if_data *sdata, mpl_dbg(sdata, "Mesh plink error: no more free plinks\n"); goto out; } + /* new matching peer */ + event = OPN_ACPT; + goto out; } else { if (!test_sta_flag(sta, WLAN_STA_AUTH)) { mpl_dbg(sdata, "Mesh plink: Action frame from non-authed peer\n"); @@ -985,12 +988,6 @@ mesh_plink_get_event(struct ieee80211_sub_if_data *sdata, goto out; } - /* new matching peer */ - if (!sta) { - event = OPN_ACPT; - goto out; - } - switch (ftype) { case WLAN_SP_MESH_PEERING_OPEN: if (!matches_local) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: wilc1000: host_interface: add spaces around '='
Fix coding style error by placing spaces around '=' as suggested by checkpatch.pl script. Signed-off-by: Sunil Shahu --- drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 6b10bbb..d1fe73d 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -7945,8 +7945,8 @@ s32 host_int_get_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *u16ipadd, u8 idx) strHostIFmsg.u16MsgId = HOST_IF_MSG_GET_IPADDRESS; strHostIFmsg.uniHostIFmsgBody.strHostIfSetIP.au8IPAddr = u16ipadd; - strHostIFmsg.drvHandler=hWFIDrv; - strHostIFmsg.uniHostIFmsgBody.strHostIfSetIP.idx= idx; + strHostIFmsg.drvHandler = hWFIDrv; + strHostIFmsg.uniHostIFmsgBody.strHostIfSetIP.idx = idx; s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in