usr/src/lib/libwladm/common/libwladm.c (not including the smf changes)

1. I don't like the fact that do_connect() and do_disconnect() takes two arguments fd and link which refers to basically the same object. I understand that the fundamental problem behind this is libwladm trying to reuse fd for every operation, but which I think it is unnecessary.

There are some other problems and inconsistencies - we don't need to reuse gbuf in every functioins libwladm calls. Another example is some of do_xxx() function returns wladm_status_t and some of them returns int.

So ideally, for example, I prefer the do_get_capability() function to be in the form of:

  wladm_status_t do_get_capability(const char *link, wl_capability_t *cap);

I understand some of these problems already existed before your changes, but as you are the same project team working on the libwladm code before, I hope you can make the necessary changes so that this project and the future ones won't add some strange code to work around these problems.

| DEFER
| As you said, these problems exist before this project, so I suggest we open a bug to track
| this issue, and fix in another build.


Please let me know the bugid. As I am also doing changes o libwladm (now libdlwlan), I might just take over that bug.

2. do_connect()

Why not call wpa_instance_delete() when connecting attempt fails or timeout on L602 and L608?

| EXPLAIN
| When dladm disconnect-wifi, it will call do_disconnect(), and do_disconnect() will call wpa_instance_delete(). | When do_connect() fails, it will call do_disconnect(), so the wpa_instance_delete() will be executed.


I see. Although it is a little unexpected that do_disconnect() *needs* to be called even do_connect fails.

the change webrev is at: http://cr.grommit.com/~zf162725/cr_0322/

Looks good.

- Cathy
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to