參考 ath6kl_set_ies的實作,他會先把 struct cfg80211_beacon_data *info 的 beacon_ies 和 beacon_ies_len 直接拿來用繼續看到
Jun 30, 2023Contributed by
struct owl_context: 表示最基本的結構體,整個 driver 只會有一個 struct owl_context { /* We may not need this lock, cause vif_list would not change during * the whole lifetime. */ struct mutex lock; /* Indicate the program state */ enum vwifi_state state; /* List for maintaining all interfaces */
May 23, 2023Contributed by
Management Architecture 80211 管理架構由三個元件組成 MAC layer management entity (MLME) physical-layer management entity (PLME) system management entity (SME) SME 是使用者或設備驅動程序跟 802.11 網路界面互動和取得狀態訊息的方式 MAC 與 PHY 協議層皆可訪問 management information base,簡稱 MIB,MIB 簡單來說可供查詢狀態信息。 圖中共有三個 SAP(Service Access Point, 用於資料轉送)
May 09, 2023Contributed by
每一對通訊使用者必須使用一個「頻率範圍」來通話:通訊時不能只使用一個「頻率」,必須使用一個「頻率範圍」,這個頻率範圍稱為「頻寬(Bandwidth)」。我們說話不可能只有一種頻率,而會有高音(高頻)與低音(低頻)的變化,因此我們說話其實是發出某一個頻率範圍(頻寬)的聲音(聲波)。同理,當我們以高頻電磁波來傳送語音訊號時,也必須使用某一個頻率範圍(頻寬)才行。
May 09, 2023Contributed by
contributed by < willwillhi1 > 測驗二 :::warning 逐行解釋程式碼之前,應先探討在記憶體配置器中,使用紅黑樹來處理 free list 的考慮因素。 :notes: jserv ::: free list 的理解 先從最基本的 allocator 講起,可以分為:
Apr 26, 2023Contributed by
大家好,我想分享一個我最近做的筆記,主題是把第三周測驗題的第一題 treesort 整合進第一周作業的 lab0-c,目前主要的修改有: 參考 linux 在 Linked list 的實作,將紅黑數節點的資訊從原本的結構體 node_t 移出到 rb_node 結構體,好處在於只要將 rb_node 納入到新的結構體的成員即可操作,不必另外維護一顆紅黑樹。 加入印出 level order 的功能方便除錯,選擇 level order 的原因是因為比起前、中、後序它可以決定唯一的二元樹。 利用 lab0-c 提供的 list.h 標頭檔改寫 treesort 函式,並將其加入 qtest 中。 引入 memory pool,參考 rv32emu 在 memory pool 的實作,用於執行 treesort 前預先配置好記憶體,之後重用該空間,從而縮減動態記憶體配置的成本。 筆記: https://hackmd.io/@willwillhi/treesort
Apr 16, 2023Contributed by
contributed by < willwillhi1 > treesort.c 程式碼的理解在 willwillhi1 / quiz3 中 修改程式 node_t 結構體 參考作業一的 list_head 的實作,將原本的結構體中用來表示紅黑樹的地方抽離出來單獨使用。 原本的實作為以下,將 uintptr_t color, struct __node *left, *right 從 node_t 裡移出來。
Apr 11, 2023Contributed by
contributed by < willwillhi1 > 測驗 2 Timsort 是 Insertion Sort 和 Merge Sort 的結合,特點是速度快.在最佳狀況只有 $O(n)$,平均和最糟狀況也有 $O(n log (n))$。 整個做法的原理是先把資料分成小區塊(又可以叫做 run),一般來說範圍會在 32 ~ 64 之間,然後把小區塊用 insertion sort 排序,再把這些區塊用 merge sort 合併起來。 參考 Wikipedia: Timsort Timsort was designed to take advantage of runs of consecutive ordered elements that already exist in most real-world data
Mar 29, 2023Contributed by
0000000000000380 <bn_to_string>: 380: e8 00 00 00 00 callq 385 <bn_to_string+0x5> 385: 48 b9 ab aa aa aa aa movabs $0xaaaaaaaaaaaaaaab,%rcx 38c: aa aa aa 38f: 89 f2 mov %esi,%edx 391: 55 push %rbp 392: 48 c1 e2 05 shl $0x5,%rdx 396: 48 89 d0 mov %rdx,%rax 399: 48 f7 e1 mul %rcx 39c: 48 89 e5 mov %rsp,%rbp
Mar 17, 2023Contributed by
contributed by < willwillhi1 > 測驗一 先補一些相關的知識 treesort 基本的做法是對所有要排序的元素建立二元搜尋數,然後就可以從中列出排序數組。經典的使用時機就是用在 online 的情境之中也就是會對這個數組有較多的操作(插入、刪除等)。 所以如果是用在 one-time sort,還是用 quick sort 或 merge sort 就可以了。 red-black tree 規則: 每個節點非黑即白。 root 節點一定是黑色。
Mar 13, 2023Contributed by
contributed by < willwillhi1 >
Mar 04, 2023Contributed by
contributed by < willwillhi1 > 測驗一 uint64_t next_pow2(uint64_t x) { x |= x >> 1; x |= x >> 1; x |= x >> 1; x |= x >> 1; x |= x >> 1;
Feb 28, 2023Contributed by